UI를 빌드 할 때 vaadin clara를 사용하고 있습니다.
1. 나는이 건축 사용하는 경우 :vaadin clara의 내부 html
<?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>
을 내가 가진 오류 :
HTTP Status 500 - com.vaadin.server.ServiceException: org.vaadin.teemu.clara.inflater.LayoutInflaterException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 18; Open quote is expected for attribute "{1}" associated with an element type "caption".
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>
3. 코드를 내부 HTML없이 사용하면 코드가 정상적으로 작동합니다.
...
<Label caption="Register" contentMode="HTML" width=""></Label>
...
내 질문은 내부 HTML을 사용하는 방법입니다. 감사합니다. .
사이드 노트 : CSS를 사용하는 것이 더 좋을 것 같습니다. – cfrick