-
1. Re: a4j:repeat reRender question
ilya_shaikovsky Oct 6, 2008 6:59 AM (in response to holger_p)immediate should be false.
-
2. Re: a4j:repeat reRender question
holger_p Oct 6, 2008 7:23 AM (in response to holger_p)Hello ilya,
Ok what i forget to mention, i need to skip validation that why immediate have to be set to true if i understand this right.
Well what i need to do is:
1) generate a list of h:inputText
2) performan an ajax action which add an input field to that list
on this action - validation needs to be skipped
3) reRender the list - all user inputs on the h:inputText have to be saved
As i already wrote if i use c:forEach i can archieve this goal, but i need to use a4j:repeat to avoid duplicate id problems
Is this with a4j:repeat possible? -
3. Re: a4j:repeat reRender question
ilya_shaikovsky Oct 6, 2008 7:44 AM (in response to holger_p)I repeat. With immediate set to true not only validation but apply also will be skipped. So you can't wait that your inputs will be saved. And there is nothing about RF . Just standard JSF behavior.
Use ajax Single and concrete cells reRender as it shown at repeat richfaces-demo page in order not to reRender not saved inputs. -
4. Re: a4j:repeat reRender question
holger_p Oct 6, 2008 7:57 AM (in response to holger_p)
I repeat. With immediate set to true not only validation but apply also will be skipped. So you can't wait that your inputs will be saved.
Ok, well i understand this BUT why is this working- it shows that the user inputs are saved on the InputField(not on Bean).
As u can see in the code the h:inputText has no value property.<c:forEach id="inputRepeat" var="testEntry" items="#{testBean.testEntries}"> <tr> <td> <!-- will NOT loose the input made by the user after reRender --> <h:inputText> <f:validateLength minimum="3" /> </h:inputText> </td> <td> <h:message for="working" /> </td> <td> <a4j:commandLink value="Add Input(no value in backend)" immediate="true" reRender="updatePanel" action="#{testBean.addInput}"> </a4j:commandLink> </td> </tr> </c:forEach>
andf this will not<a4j:repeat id="inputRepeat" var="testEntry" value="#{testBean.testEntries}"> <tr> <td> <!-- will loose the input made by the user after reRender --> <h:inputText> <f:validateLength minimum="3" /> </h:inputText> </td> <td> <h:message for="working" /> </td> <td> <a4j:commandLink value="Add Input(no value in backend)" immediate="true" reRender="updatePanel" action="#{testBean.addInput}"> </a4j:commandLink> </td> </tr> </a4j:repeat>
Thats what i need understand and then get it to work for a4j:repeat.
I guess it has something to do with state saving but i am not that jsf expert.
Well i cant explain it better :-/
Hope you can help me - if not - well my problem.
Thx very much,
Holger -
5. Re: a4j:repeat reRender question
holger_p Oct 6, 2008 8:05 AM (in response to holger_p)
ajax Single and concrete cells reRender as it shown at repeat richfaces-demo page in order not to reRender not saved inputs.
That a good idea i tried that long time ago(have another posting on this), the problem is that with ajaxKeys u can only reRender existing! rows , but my add action addds a new row which cant be reRender becourse it dont exists. -
6. Re: a4j:repeat reRender question
holger_p Oct 6, 2008 11:23 AM (in response to holger_p)Hi, its me again,
can i have a short statement on my last 2 posts? (if u dont understand what i wrote or what i wanted to ask pls tell me)
Thx very much,
Holger