Sunday, 15 September 2013

jsf - <h:inputText> does not update -


I have a form and an input text page, which represents the value of bean. At the bottom of the page, I've given a navigation button to go to the next entry:

  & lt; H: form id = "customerdata" & gt; ... & lt; H: output text value = "# {customeredit.customer.name}" /> & Lt; Br / & gt; & Lt; H: InputText size = "60" id = "name" value = "# {customeredit.customer.name}" /> ... and & lt; / H: form & gt; & Lt; P: Command Button Value = "Next Customer" Action = "Customer" AJAX = "False" ID = "Next Customer" & gt; & Lt; F: Ultimate name = "linkager id" value = "# {customeredit.nextCustomer.id}" /> & Lt; / P: CommandButton & gt;  

If I click on the button, the page reloads, then a new customer object loads in the background and all the entries are updated beyond the input text. There is a change in the output text, but the input text always assumes that when it was intended. I also checked with the gates, the prices returned with a change in the gates with new customers, but the value displayed in the input text is always the same.

It is possible that you can have nesting format (which is in HTML) and In this way both inputs and buttons end up in the same form. Will also submit input fields as well as that button. In either case, for page-to-page navigation, you should enter & lt; P: commandButton & gt; should not be used. Instead & lt; P: button & gt; Use .

  & lt; P: Button value = "Next customer" result = "customer" id = "nextCustomer" & gt; & Lt; F: Ultimate name = "linkager id" value = "# {customeredit.nextCustomer.id}" /> & Lt; / P: button & gt;  

Do not forget to fix the nested form problem.

Also see:


No comments:

Post a Comment