如何创建ofer_has_location对象(加入从位置和奥弗对象)使用当前奥弗以及从H所选项目:selectManyCheckBox如何在jsf中实现foreach?
<h:selectOneMenu id="companyidCompany"
value="#{oferController.selected.companyidCompany}"
title="#{bundle.CreateOferTitle_companyidCompany}"
required="true"
requiredMessage="#{bundle.CreateOferRequiredMessage_companyidCompany}">
<f:ajax event="valueChange" execute="companyidCompany"
render="locationCollection" />
<f:selectItems value="#{companyController.itemsAvailableSelectOne}"/>
</h:selectOneMenu>
<h:outputLabel value="#{bundle.CreateOferLabel_locationCollection}"
for="locationCollection" />
<h:selectManyListbox id="locationCollection" value="locations"
title="#{bundle.CreateOferTitle_locationCollection}">
<c:forEach items="locations">
<f:selectItems var="locations"
value="#{oferController.selected.companyidCompany.locationCollection}" />
</c:forEach>
</h:selectManyListbox>
没有理由使用''。只要摆脱它,提供转换器,在列表框中使用正确的值绑定,并在AJAX监听器方法中准备必要的数据,就是这样。 –
skuntsel
2013-04-30 02:13:12
@skuntsel,你需要打破所有的下降 – kolossus 2013-04-30 02:22:24
@kolossus然后,我会离开OP没有他的个人经验,这可能会对他的写真实世界的应用程序的能力产生负面影响:) – skuntsel 2013-04-30 06:47:47