Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何添加html粗体<;b>;和break<;br>;在jsf标签中_Jsf - Fatal编程技术网

如何添加html粗体<;b>;和break<;br>;在jsf标签中

如何添加html粗体<;b>;和break<;br>;在jsf标签中,jsf,Jsf,在属性文件中 msg_profile = <b> profile1: </b> <br> Set profile <h:selectOneRadio id="profiles" layout="pageDirection" value="#{bean.selectedProfile}" style="font-size:12px;"> <f:selectItems value="#{bean.profiles}" itemLabelEsca

在属性文件中

msg_profile = <b> profile1: </b> <br> Set profile
<h:selectOneRadio id="profiles" layout="pageDirection" value="#{bean.selectedProfile}" style="font-size:12px;">
<f:selectItems value="#{bean.profiles}" itemLabelEscaped="false"/>                                      
</h:selectOneRadio>
msg_profile=profile1:
设置配置文件
我在上面的属性中给出了Profile1和Set profile之间的粗体和break html标记

Bean

private List<SelectItem> profiles;
this.profiles.add(new SelectItem(new Integer(0), MessageFactory.getString(context, "msg_profile")));
私有列表配置文件;
添加(新的SelectItem(新的整数(0),MessageFactory.getString(上下文,“msg_profile”));
xhtml文件

msg_profile = <b> profile1: </b> <br> Set profile
<h:selectOneRadio id="profiles" layout="pageDirection" value="#{bean.selectedProfile}" style="font-size:12px;">
<f:selectItems value="#{bean.profiles}" itemLabelEscaped="false"/>                                      
</h:selectOneRadio>

我期待着有一天会出炉

'简介1:'以粗体显示
在新行中“设置配置文件”

您应该使用
itemlab
itemValue
,如本例所示(从Mojarra文档中窃取)。我认为您的代码不起作用,因为您没有
var
itemlab
itemValue
属性集:

<f:selectItems value="#{select05NoSelection.hobbitList}"
                 var="n"
                 itemValue="#{n}"
                 itemLabel="#{n.bio}"
                 itemDescription="#{n.description}"
                 itemDisabled="#{n.disabled}"
                 itemLabelEscaped="true"
                 noSelectionValue="#{select05NoSelection.hobbitList[0]}"/>


Hi Handy,私人列表配置文件@文卡特:还有更多吗?当然,你必须适应这个例子。嗨,汉迪,我在下面的msg_property=Profile
设置值私有列表中编写代码概况;添加(新的SelectItem(新的整数(0),MessageFactory.getString(上下文,“msg_propertyvl”));你收到我的要求了吗?我正在从属性文件加载值。并填写bean列表。