开发者

Using a4j:support to make PanelGrid clickable, after the click the page doesn't refresh

I've made a button using HTMLPanelGrid and HTMLAjaxSupport (a4j:support from backing bean) that responds to 'onclick'.

The eventlistener registered with the HTMLAjaxSupport adds a component to the page (a different component with a different backing bean).

The problem is, the addition is not visible until I refresh the page or press another button that refreshes the display. I'm trying to figure out how to refresh the page.

To sum it up - I would like to know how to re开发者_StackOverflow社区fresh a visual component backed up by a backing bean after the backing bean had changed. (The refresh should occur after clicking an ajax supported component)

Thank you!


all <a4j: tags have the reRender attribute. It should point to the id of the object/area you want to refresh.

Note that if a component has been hidden, you must reRender its parent. For example:

<h:panelGroup id="newComponentWrapper">
<!-- your component goes here -->
</h:panelGroup>
...
<a4j:support reRender="newComponentWrapper" .. />

And another advice - avoid using the binding attribute - in 95% of the cases you can go without it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜