当我单击第1页上的下一个按钮并转到第2页并单击第2页上的上一个按钮以进入第1页时,我在第1页上将单选按钮值设置为空。我不知道为什么?!
我只有动态单选按钮才有这个问题,例如,如果选择的单选按钮完全不是我面对这个问题!!有人可以帮助我!在此先感谢!!
以下是我的代码:
<fieldset class="dol-selection-horizontal">
<div class="cui-row">
<div>
<legend>
<span id="severancePaymentsLabel">
Are you in hiring department?
</span>
</legend>
</div>
<div style="width: 135px;" align="right">
<t:selectOneRadio id="severancePayments"
layout="spread" forceId="true" styleClass="required">
<f:selectItem itemLabel="Yes" itemValue="true"></f:selectItem>
<f:selectItem itemLabel="No" itemValue="false"></f:selectItem>
</t:selectOneRadio>
<div class="dol-selection-wrapper">
<t:radio for="severancePayments" index="0">
</t:radio>
</div>
<div class="dol-selection-wrapper">
<t:radio for="severancePayments" index="1">
</t:radio>
</div>
</div>
</div>
</fieldset>
<fieldset class="dol-selection-horizontal">
<div class="cui-row">
<div>
<legend>
<span id="lumpSumSeverancePaymentsLabel">
Core settings?
</span>
</legend>
</div>
<div style="width: 135px;" align="right">
<div class="dol-selection-wrapper">
<input id="lumpSumSeverancePayments_1" type="radio"
value="true" name="lumpSumSeverancePayments" class="required" />
<label for="lumpSumSeverancePayments_1">Yes</label>
</div>
<div class="dol-selection-wrapper">
<input id="lumpSumSeverancePayments_2" type="radio"
value="false" name="lumpSumSeverancePayments" />
<label for="lumpSumSeverancePayments_2">No</label>
</div>
</div>
</div>
</fieldset>
<div id="lumpSumSeverancePaymentsYes" style="display: none;">
<div class="cui-row">
<label for="totalGrossAmount">
Are options available?
</label>
<h:inputText id="totalGrossAmount"
name="totalGrossAmount" type="text" styleClass="required" />
</div>
<fieldset class="dol-selection-horizontal">
<div class="cui-row">
<div>
<legend>
<span id="receiveFirstLumpSumLabel">
Did you read the entire contract?
</span>
</legend>
</div>
<div style="width: 135px;" align="right">
<t:selectOneRadio id="receiveFirstLumpSum"
layout="spread" forceId="true" styleClass="required">
<f:selectItem itemLabel="Yes" itemValue="true">
</f:selectItem>
<f:selectItem itemLabel="No" itemValue="false">
</f:selectItem>
</t:selectOneRadio>
<div class="dol-selection-wrapper">
<t:radio for="receiveFirstLumpSum" index="0">
</t:radio>
</div>
<div class="dol-selection-wrapper">
<t:radio for="receiveFirstLumpSum" index="1">
</t:radio>
</div>
</div>
</div>
</fieldset>
<div id="receiveFirstLumpSumYes" style="display: none;">
<div class="cui-row">
<label for="firstLumpSumDate">
Marketing Date?
</label>
<h:inputText id="firstLumpSumDate"
name="firstLumpSumDate" type="text" styleClass="required dateMask" />
</div>
</div>
</div>
[1]: https://i.stack.imgur.com/dbtnu.jpg
我有ajax调用转到下一页和上一页:
<f:ajax execute="wageQuestionnairePageOneFormDiv" onevent="function(data) {
ajaxEventGoToNextPage(data, 'PageOneForm', 'PageTwoForm' ) }"
render="messagesDiv" onerror="ajaxOnError"></f:ajax>
<f:ajax execute="@none" onevent="function(data) {
ajaxEventGoToPrevPage(data, 'PageTwoForm', 'PageOneForm') }"
render="messagesDiv" onerror="ajaxOnError"></f:ajax>