データベースから事前に値を入力したフォームがあり、ユーザーは値を変更して保存できます。
1)データベースから事前入力された住所テキストがあり、英国ボタンを修正するオプションがあり、ここをクリックすると次のページに移動し、住所が入力されます。ユーザーが変更したい場合は、変更して保存するか、変更することができますそれ以外の場合はキャンセルできます...しかし、アドレスが空白でキャンセルしても、空白の値で更新されます。
<view-state id="selectUKAddress" model="address" view="../updateDetails/selectUKAddress.jsp">
<transition on="populate" to="ukAddressSelectionAction" />
<transition on="continue" to="updateDetails">
<set name="viewScope.addressPayload" value="new onlinereg.action.payload.AddressActionPayload(address, studentData, addressType)" />
<evaluate expression="addressAction.execute(addressPayload)" />
</transition>
<transition on="cancel" to="updateDetails" validate="false" >
</transition>
</view-state>
<view-state id="updateDetails" model="studentData" view="../updateDetails/updateDetails.jsp">
<on-entry>
<evaluate expression="navigationVO.personalDetails=true" />
<evaluate expression="navigationVO.activeTab='personalDetails'" />
<set name="viewScope.disabilityCodes" value="registrationService.getDisabilityCodes()" />
<set name="viewScope.legacyDisabilityCodes" value="registrationService.getLegacyDisabilityCodes()" />
<set name="viewScope.ethnicityCodes" value="registrationService.getEthnicityList()" />
<set name="viewScope.countries" value="registrationService.getCountries()" />
<set name="viewScope.nationality" value="registrationService.getNationality()" />
<set name="viewScope.qualification" value="registrationService.getQualification()" />
<set name="viewScope.university" value="registrationService.getUniversity()" />
</on-entry>
<transition on="updateUKHomeAddress" to="selectUKAddress" validate="false">
<evaluate expression="studentData.homeAddress = addressService.generateUKAddress(studentData.homeAddress)" />
<set name="flowScope.address" value="studentData.homeAddress" />
<set name="flowScope.addressType" value="@uk.ac.city.onlinereg.action.AddressAction@HOME_ADDRESS" />
</transition>
<transition on="updateNonUKHomeAddress" to="selectNonUKAddress" validate="false">
<evaluate expression="studentData.homeAddress = addressService.generateNonUKAddress(studentData.homeAddress)" />
<set name="flowScope.address" value="studentData.homeAddress" />
<set name="flowScope.addressType" value="@uk.ac.city.onlinereg.action.AddressAction@HOME_ADDRESS" />
</transition>
<transition on="updateUKTermAddress" to="selectUKAddress" validate="false">
<evaluate expression="studentData.termAddress = addressService.generateUKAddress(studentData.termAddress)" />
<set name="flowScope.address" value="studentData.termAddress" />
<set name="flowScope.addressType" value="@uk.ac.city.onlinereg.action.AddressAction@TERM_ADDRESS" />
</transition>
<transition on="updateHallsTermAddress" to="selectHallsAddress" validate="false">
<evaluate expression="studentData.termAddress = addressService.generateHallsAddress(studentData.termAddress)" />
<set name="flowScope.address" value="studentData.termAddress" />
<set name="flowScope.addressType" value="@uk.ac.city.onlinereg.action.AddressAction@TERM_ADDRESS" />
</transition>
<transition on="updateNonUKTermAddress" to="selectNonUKAddress" validate="false">
<evaluate expression="studentData.termAddress = addressService.generateNonUKAddress(studentData.termAddress)" />
<set name="flowScope.address" value="studentData.termAddress" />
<set name="flowScope.addressType" value="@uk.ac.city.onlinereg.action.AddressAction@TERM_ADDRESS" />
</transition>
<transition on="continue" to="finish" />
</view-state>