Modify.xhtml
<table border="0" align="left" cellpadding="10" cellspacing="0">
<tr>
<td>通訊地址 : </td>
<td><p:selectOneMenu value="#{modify.comAddressContry}" style="width: 120px">
<f:selectItem itemLabel="--選擇城市--" itemValue="--選擇城市--"/>
<f:selectItems value="#{modify.tw.country_map}"/>
<p:ajax update="district_change_com" event="change" listener="#{modify.com_country_change()}"/>
</p:selectOneMenu>
</td>
<td><p:selectOneMenu id="district_change_com" value="#{modify.comAddressDistrict}" style="width: 120px">
<f:selectItem itemLabel="--選擇地區--" itemValue="--選擇地區--" />
<f:selectItems value="#{modify.tw.district_map}"/>
<p:ajax update="com_all" listener="#{modify.com_zipcode_change()}"/>
</p:selectOneMenu>
</td>
<td><p:inputText id="com_all" value="#{modify.comAddressAll}" style="width: 300px"/></td>
<td>通訊地電話 : </td>
<td><p:inputText value="#{modify.houseAddressTel}" maxlength="11" /></td>
</tr>
<tr>
<td>戶籍地址 :</td>
<td><p:selectOneMenu value="#{modify.houseAddressContry}" style="width: 120px">
<f:selectItem itemLabel="--選擇城市--" itemValue="--選擇城市--"/>
<f:selectItems value="#{modify.tw.country_map}"/>
<p:ajax update="district_change" event="change" listener="#{modify.country_change()}"/>
</p:selectOneMenu>
</td>
<td><p:selectOneMenu id="district_change" value="#{modify.houseAddressDistrict}" style="width: 120px">
<f:selectItem itemLabel="--選擇地區--" itemValue="--選擇地區--" />
<f:selectItems value="#{modify.tw.district_map}"/>
<p:ajax update="house_all" listener="#{modify.zipcode_change()}"/>
</p:selectOneMenu>
</td>
<td><p:inputText id="house_all" value="#{modify.houseAddressAll}" style="width: 300px"/></td>
<td>戶籍地電話 : </td>
<td><p:inputText value="#{modify.houseAddressTel}" maxlength="11" /></td>
</tr>
</table>
I am trying for double combo select function in PrimeFaces. It works well when I use it once but when I use it twice in the same page(in the same form) the page show validation error when I submit the chosen data. Have any ideas for this problem?