This content has been marked as final.
Show 3 replies
-
1. Re: A4j:repeat with multiple input forms
m.a.g Jul 3, 2008 1:59 PM (in response to konami)I've found the same issue. If we use form within a4j:repeat then data from only last form go to backing bean. Here is a simple example:
<h:panelGroup id="grp"> <a4j:repeat value="#{bean.items}" var="item"> <h:form id="frm"> ${item}: <h:inputText id="tst" value="#{bean.test}" /> <a4j:commandButton value="Go" reRender="grp" /> </h:form> </a4j:repeat> </h:panelGroup> <a4j:log popup="false" />
@Name("bean") public class Bean implements Serializable { private String test; private final List<String> list; public Bean() { list = new ArrayList<String>(); list.add("1"); list.add("2"); } public String getTest() { return test; } public void setTest(String test) { System.out.println("setTest(): " + test); this.test = test; } public List<String> getItems() { return list; } }
I populate edit in the last form with "2222222" and click "Go" button. You can see that request contains the "2222222" value:
a4j:log output] QueryString: AJAXREQUEST=_viewRoot&j_id5%3A1%3Afrm=j_id5%3A1%3Afrm&j_id5%3A1%3Afrm%3Atst=2222222&javax.faces.ViewState=j_id17&j_id5%3A1%3Afrm%3Aj_id7=j_id5%3A1%3Afrm%3Aj_id7&
console output] setTest(): 2222222
I populate edit in the first form with "1111111" and click "Go" button. You can see that request contains the "1111111" value
a4j:log output] QueryString: AJAXREQUEST=_viewRoot&j_id5%3A0%3Afrm=j_id5%3A0%3Afrm&j_id5%3A0%3Afrm%3Atst=1111111&javax.faces.ViewState=j_id17&j_id5%3A0%3Afrm%3Aj_id7=j_id5%3A0%3Afrm%3Aj_id7&
console output] nothing, so Bean.setTest() is not called.
Is it a bug? -
2. Re: A4j:repeat with multiple input forms
m.a.g Jul 3, 2008 2:30 PM (in response to konami)My environment:
RichFaces 3.2.1 GA
JSF RI 1.2_07-b03-FCS -
3. Re: A4j:repeat with multiple input forms
onstottj May 2, 2013 12:01 PM (in response to konami)I've had the same problem, using Richfaces 3.3.3. My solution was to move the form out of the a4j:repeat.