This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSF and the fly likes a4j rerendering problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "a4j rerendering problem." Watch "a4j rerendering problem." New topic
Author

a4j rerendering problem.

ala alal
Greenhorn

Joined: May 18, 2009
Posts: 8
I've got a problem rerendering some regions in my page.
I've got two <a4j: outputPanel> A and B.
A menu from wich choose an options that may render A, B or both.

<h:selectOneMenu>
...
</h:selectOneMenu>

<a4j:region renderRegionOnly="true" id="r1">

<a4j:region renderRegionOnly="true" id="rA">
<a4j: outputPanel id="A" onchange="render_again()">
... ... ...
</a4j: outputPanel>
</a4j:region>


<a4j:region renderRegionOnly="true" id="rB">
<a4j: outputPanel id="B">
... ... ...
</a4j: outputPanel>
</a4j:region>

</a4j:region>

I've also got these two functions:
<a4j:jsFunction name="functionA" reRender="A"/>
<a4j:jsFunction name="functionB" reRender="B"/>

I need two distinct function so I can avoid rerendering a panel if I need to show it and it's already visible.
If I put these two function inside the region r1, when I call one of the two functions both A and B are rerendered because the nearest region is r1.
If I put the functions inside rA the first and rB the second nothing is rerendered.
I need to avoid rerendering a region already visible because it cause it to pass throw validation process and a lot of error messages below empty required fields appear.

Does anyone has a solution to my problem? I just need to skip validation for a panel already rendered and not rerendering it, seems to be the best solution to me.
Any other ideas?
ala alal
Greenhorn

Joined: May 18, 2009
Posts: 8
No one as a solution for this problem?

I haven't found one yet.

Please tell me if I did not explained well my problem.

Is there a way to rerender elements firing the rerender event from another region?

Thanks,

Alessandro.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a4j rerendering problem.