-
1. Re: refresh jsf component from backing bean
nbelaevski Apr 23, 2010 4:44 PM (in response to svkap)Hi Svetoslav,
Do you want to re-render chosen components by AJAX?
-
2. Re: refresh jsf component from backing bean
svkap Apr 23, 2010 5:11 PM (in response to nbelaevski)Hi.
Yes. I want to re-render them by AJAX. I have h:panelGrid with 2 components inside - h:outputText and p:rating (primefaces rating component). I want to re-render the components indside panelGrid at the end of a method inside my backing (triggered by the rating component).
-
3. Re: refresh jsf component from backing bean
nbelaevski Apr 24, 2010 5:51 PM (in response to svkap)The only thing you need to do for this is to specify IDs of components as value of "reRender" attribute for RF AJAX component. You can bind reRender attribute to bean property, so that it will be dynamic.
-
4. Re: refresh jsf component from backing bean
svkap Apr 26, 2010 3:10 AM (in response to nbelaevski)Hi.
I have already tried using <a4j:support event="onchange" reRender="componentId" /> . The problem is that I do not know how to trigger onchange event because a4j do not intercept the changes in primefaces raiting component.
-
5. Re: refresh jsf component from backing bean
nbelaevski Apr 26, 2010 5:35 AM (in response to svkap)Does it have "onchange" attribute?
-
6. Re: refresh jsf component from backing bean
svkap Apr 27, 2010 8:53 AM (in response to nbelaevski)Hi.
I have updated my primefaces components and the problem was solved. Actually the component has a property for dynamically update of components. Unfortunately in the version I was using before there was a bug and these components were not updated. That is why I wanted to do some workaround. However, now the problem disappeared.
I am still curious how can I refresh a component from inside the backing bean..
-
7. Re: refresh jsf component from backing bean
nbelaevski Apr 27, 2010 2:19 PM (in response to svkap)So,
<a4j:support event="onchange" reRender="#{bean.ids}" />
should work for you. Fill "ids" properties in action method and these components will be updated.