我尝试在this example之后为一个纸张输入元素添加一个前缀。
<paper-input label="total">
<div prefix>$</div>
<paper-icon-button suffix icon="clear"></paper-icon-button>
</paper-input>我主要担心的是,当我在Example.ui.xml文件中编写这段代码时,eclipse编辑器指出存在以下错误:
"Attribute 'prefix' has no value"此外,如果我尝试执行代码,我会收到以下错误:
Compiling module com.dirigendo.test.Test
Computing all possible rebind results for 'com.dirigendo.test.client.Simulator.SimulatorUiBinder'
Rebinding com.dirigendo.test.client.Simulator.SimulatorUiBinder
Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
[ERROR] Attribute name "prefix" associated with an element type "div" must be followed by the ' = ' character.
[ERROR] Error parsing XML (line 22): Attribute name "prefix" associated with an element type "div" must be followed by the ' = ' character.
[ERROR] Errors in 'com/dirigendo/test/client/Simulator.java'
[ERROR] Line 12: Failed to resolve 'com.dirigendo.test.client.Simulator.SimulatorUiBinder' via deferred binding
[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] com.dirigendo.test.client.Simulator_SimulatorUiBinderImpl
Unification traversed 13255 fields and methods and 1072 types. 1049 are considered part of the current module and 1049 had all of their fields and methods traversed.
[ERROR] Compiler returned false
[WARN] recompile failed
[WARN] continuing to serve previous version您能给我解释一下如何停用这个验证吗?我知道有一些环形交叉口我可以使用,但我真的希望有一个解决方案,其中将涉及不更改示例代码。
发布于 2016-02-03 15:44:45
改为使用
<div prefix="prefix">$</div>或
<div prefix="true">$</div>聚合物只需要属性在那里,对于有效的XML,它需要有一个值。聚合物只是忽略该值。
https://stackoverflow.com/questions/35171105
复制相似问题