0
我有一個單選按鈕,我想要顯示與它相關的幾個選項,一旦它的選擇..選項在相關的bean上。我怎麼做?顯示選項onclicking h:selectOneRadio
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" >
<h:selectOneRadio value="#{managePaymentModel.reportFilter.options}" layout="pageDirection" label="Select Option" disabled="#{managePaymentModel.reportPreview}">
<f:selectItems value="#{managePaymentModel.reportOptions}" var="type" itemValue="#{type.value}" itemLabel="#{type.label}" />
</h:selectOneRadio>
</h:panelGrid>
@Override
public Map reportSelector() {
Map<Integer, String> map = new HashMap<Integer, String>();
map.put(ManagePaymentBeanLocal.LIST_PAYMENTS_SUMMARY, "List of Payments Summary");
map.put(ManagePaymentBeanLocal.LIST_PAYMENTS_DETAIL, "List of Payments Detail");
return map;
}
@Override
public Map reportOptions(ReportFilter filter) {
Map<Integer, String> option = new HashMap<Integer, String>();
// report configurations
switch (filter.getSelect()) {
case ManagePaymentBeanLocal.LIST_PAYMENTS_SUMMARY:
case ManagePaymentBeanLocal.LIST_PAYMENTS_DETAIL:
option.put(ReportFilter.OPTION1, "By Beneficiary");
option.put(ReportFilter.OPTION2, "By Reference");
break;
}
return option;
}
可以請你說出你的問題 – rags
抱歉..只是編輯了這個問題。 – Bryn
我還不知道你具體問什麼。什麼是功能要求? – BalusC