-
1. Re: Render component after validation form error.
sunkaram Jan 19, 2012 5:10 PM (in response to tomek.f)you can try
<a4j:jsFunction name="renderInputs" render="input1,input2" />
<a4j:commandButton id="submit" action="youraction" value="Submit"
oncomplete="if(#{facesContext.validationFailed}){renderInputs();}
-
2. Re: Render component after validation form error.
tomek.f Jan 19, 2012 5:32 PM (in response to sunkaram)Doesn't help the issue is more related with:
Problem header
http://livedemo.exadel.com/richfaces-local-value-demo/
But the solutions there don't work either.
-
3. Re: Render component after validation form error.
sunkaram Jan 19, 2012 5:39 PM (in response to tomek.f)did you the solution from my post? It should work..
oncomplete of ajax action request it checks for validation errors and calls javascript function renderInputs() which should render required components.
-
4. Re: Render component after validation form error.
tomek.f Jan 20, 2012 4:00 AM (in response to sunkaram)Yes I implemented your solution- it doesn't work.
But after refreshing the page like F5 it renders correctly!
<h:form>
...
<a4j:commandButton value="New" execute="@this" action="#{bean.resetPanel}" render="flightEdit"
oncomplete="renderInputs();">
</a4j:commandButton>
<a4j:jsFunction name="renderInputs" render="flightDestination" />
...
</h:form>
Let me say it again:
The problem is oonly when there was validation error - then the component isn't rerendered. After submitting form without errors it is ok. Everything in one view state.