-
1. Re: Rerender component with backing bean (binding attribute)
sutermar Jun 22, 2007 8:11 AM (in response to sutermar)I've found a (very ugly) solution, but it works:
1. added action="update" to the ajax command link
2. added this navigation rule to faces-config.xml:<navigation-rule> <from-view-id>/test.jsp</from-view-id> <navigation-case> <from-outcome>update</from-outcome> <to-view-id>/test.jsp</to-view-id> </navigation-case> </navigation-rule>
But now, the whole page will be refreshed!
What I want is, that only the outputtext with id="aaa" and id="rep" will be updated on the view side... -
2. Re: Rerender component with backing bean (binding attribute)
sergeysmirnov Jun 22, 2007 3:04 PM (in response to sutermar)yes, it will be non-ajax response. Moreover, the component tree will be re-built.
For the testing purpose, replace<a4j:commandLink actionListener="#{bean.perform}" reRender="rep,aaa"> <h:outputText value="testlink"/> </a4j:commandLink>
with<h:commandLink actionListener="#{bean.perform}"> <h:outputText value="testlink"/> </h:commandLink>
Does the values are updated as you expect? -
3. Re: Rerender component with backing bean (binding attribute)
sutermar Jun 27, 2007 7:43 AM (in response to sutermar)Hi Sergey,
thanks for your response!
yes, the values are updated too...
But my goal is to use the ajax functionality and not to refresh the whole
page... I have to find a solution to rerender a backing bean... is that possible?
Maybe there's a chance to rebuild some parts of the jsf view in the bean.perform method, like this way:
1. Click on the ajax command link
2. JSF calls action listener on bean.perform
3. Refreshing only the view from the output element with id = "aaa"
4. on the view side: rerendering of "rep" and "aaa"