Java vaadin-clara中的内部html
我正在使用vaadin clara构建UIJava vaadin-clara中的内部html,java,html,vaadin,declarative,Java,Html,Vaadin,Declarative,我正在使用vaadin clara构建UI 1.当我使用此结构时: <?xml version="1.0" encoding="UTF-8"?> <VerticalLayout xmlns="urn:import:com.vaadin.ui" xmlns:p="urn:vaadin:parent" defaultComponentAlignment="MIDDLE_CENTER"> <Label caption=<![CDATA[<b&
1.当我使用此结构时:
<?xml version="1.0" encoding="UTF-8"?>
<VerticalLayout xmlns="urn:import:com.vaadin.ui" xmlns:p="urn:vaadin:parent" defaultComponentAlignment="MIDDLE_CENTER">
<Label caption=<![CDATA[<b>Register</b>]]> contentMode="HTML" width=""></Label>
<Form>
<TextField id="name" caption="Name"></TextField>
<TextField id="login" caption="E-mail"></TextField>
<PasswordField id="password" caption="Pass"></PasswordField>
<PasswordField id="password-check" caption="Pass check"></PasswordField>
</Form>
<HorizontalLayout>
<Button id="register-button" caption="Register"></Button>
<Button id="login-button" caption="Login"></Button>
</HorizontalLayout>
</VerticalLayout>
]]>contentMode=“HTML”width=”“>
我有错误:HTTP Status 500 - com.vaadin.server.ServiceException: org.vaadin.teemu.clara.inflater.LayoutInflaterException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 19; The value of attribute "caption" associated with an element type "null" must not contain the '<' character.<br>
HTTP状态500-com.vaadin.server.ServiceException:
org.vaadin.teemu.clara.inflater.LayoutInflaterException:
org.xml.sax.SAXParseException;行号:3;栏目编号:18;打开
与元素类型关联的属性“{1}”需要引号
“标题”。2.如果我使用这样的构造:
...
<Label caption="<b>Register</b>" contentMode="HTML" width=""></Label>
...
。。。
...
我有错误:HTTP Status 500 - com.vaadin.server.ServiceException: org.vaadin.teemu.clara.inflater.LayoutInflaterException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 19; The value of attribute "caption" associated with an element type "null" must not contain the '<' character.<br>
HTTP Status 500-com.vaadin.server.ServiceException:org.vaadin.teemu.clara.inflater.LayoutInflaterException:org.xml.sax.SAXParseException;行号:3;栏目号:19;与元素类型“null”关联的属性“caption”的值不能包含“必须引用/转义HTML”。在您的情况下,它将是:b注册/b
。XML必须是有效的。一个好的编辑器或IDE会警告您这一点,甚至可能会为您提供转义功能。作为补充说明:您最好使用CSS来处理此类内容