Frage

I have a a4j:commandbutton on my jsf page. Following is the code extract-

<a4j:commandButton id="submitBtn" value="#{msgsMass.MM_04_02_BTN_CONTINUE}"
    reRender="addNewCardForm,saveAddNewCardForm" immediate="true"
    action="#{bBean.retrieveOrderId}" oncomplete="addNewCreditCard()" >

addNewCardForm, saveAddNewCardForm are html forms on the page which are displayed and submitted in the javascript call of addNewCreditCard().

In these forms I have an input field which will display the value from bBean.retrieveOrderId. However this bean method is called only after the forms are loaded with blank values for orderId.

Please let me know how I can get the orderId value on the form fields when the form is displayed to the user.

War es hilfreich?

Lösung

Comments were transformed into answer:

orderId will be displayed on form after proper re-rendering. You can do it wrap your form in <a4j:region>.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top