-
1. Cant re-render a componente in other form
nbelaevski May 8, 2011 4:43 PM (in response to danilocmiranda)Hi Danilo,
What component has 'busca_produto' id? Do you have nested forms?
-
2. Cant re-render a componente in other form
danilocmiranda May 8, 2011 5:56 PM (in response to nbelaevski)Nick,
This 'busca_produto' id is the id of
a4j:outputPanel. My bad, typing wrong...
I already correct this mistake and the error message doesn't has changed: javax.servlet.ServletException: inputNumber
In answer for your question, I just have the
inputNumberSlider
inside the form by id = form_slide_number and the outputPanel id="busca_produtos" inside the form by id="form_resultado_busca"When the value of inputNumberSlider id changed, a method of my bean clean the List (listProdutos) of the ui:repeat but this is not refreshed
-
3. Cant re-render a componente in other form
nbelaevski May 8, 2011 6:16 PM (in response to danilocmiranda)I see, so you are using incorrect client id, it should be :formId:componentId, not what you set. BTW, if you use a4j:ajax you won't need to use client id, render="busca_produto" will work as well.
-
4. Re: Cant re-render a componente in other form
danilocmiranda May 8, 2011 6:34 PM (in response to nbelaevski)Nick,
I did this way and it worked.
My form whit the InputNumberSlider:
<h:form id="form_slide_number"> <rich:inputNumberSlider value="#{produtoViewPB.filtoPreco}" width="90px" maxValue="#{produtoViewPB.maiorPreco}" showTooltip="false" id="inputNumber" > <f:ajax event="change" listener="#{produtoViewPB.filtrarBuscaPorPreco}" render=":form_resultado_busca:busca_produtos" /> </rich:inputNumberSlider> </h:form>
My form whit outputPanel inside:
<h:form id="form_resultado_busca"> <a4j:outputPanel id="busca_produtos" ajaxRendered="true" > <ui:repeat value="#{produtoViewPB.listProdutos}" var="produtoTabela" > <div class="box_produtos_selecionados" id="01"> //THE REST OF CODE...... </h:form>
So, you sad....
Nick Belaevski wrote:
.... if you use a4j:ajax you won't need to use client id, render="busca_produto" will work as well.
If I change
<f:ajax event="change" listener="#{produtoViewPB.filtrarBuscaPorPreco}" render=":form_resultado_busca:busca_produtos" />
By
<a4j:ajax event="change" listener="#{produtoViewPB.filtrarBuscaPorPreco}" render="busca_produtos" />
Will work too?
-
5. Re: Cant re-render a componente in other form
ilya_shaikovsky May 9, 2011 8:53 AM (in response to danilocmiranda)<a4j:ajax event="change" listener="#{produtoViewPB.filtrarBuscaPorPreco}" render="busca_produtos" />
yes it should works too actually.
Minor hint:
<a4j:outputPanel id="busca_produtos" ajaxRendered="true" >
add layout="block" to outputPanel. in other case it rendered as span and you have div inside which causes invalid html.
<ui:repeat value="#{produtoViewPB.listProdutos}" var="produtoTabela" >
<div class="box_produtos_selecionados" id="01"> -
6. Re: Cant re-render a componente in other form
danilocmiranda May 9, 2011 9:12 AM (in response to ilya_shaikovsky)Ilya,
Good to know, soon as possible I will try that option!
Thanks for help guys!