File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSF
Bookmark "a4j rerendering problem." Watch "a4j rerendering problem." New topic

a4j rerendering problem.

ala alal

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.


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

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

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


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

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?


I agree. Here's the link:
subject: a4j rerendering problem.
It's not a secret anymore!