如何創建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