【发布时间】:2017-06-23 20:35:31
【问题描述】:
我的托管 bean 中有两个 String 属性以及相应的 getter 和 setter。
@ManagedBean
@SessionScoped
public class EditorBean implements Serializable {
private String value="hello how are you";
private String message="hello how are you";
public EditorBean() {
value="hello how are you guys?";
message="dd";
}
// ...
}
我想在单独的行中渲染两个字符串。
<h:outputText value="#{editorBean.message}" />
<h:outputText value="#{editorBean.value}" />
但它们显示在一行中。
你好,你们好吗?
这是怎么引起的,我该如何解决?
【问题讨论】:
-
能不能多放点代码,这个一点用都没有
-
抱歉现在编辑了
-
你的程序运行良好,现在检查我的答案
-
请先学习一些基本的html。
标签: html jsf line-breaks