-
1. Re: bug in dynamically rendered property, richfaces 4
iabughosh Aug 29, 2012 2:55 AM (in response to asbeel)welcome to the community diego,
try out this code :
<h:form id="form1">
<table>
<tr>
<td>
<a4j:commandButton id="btn1" value="prueba" action="#{loginMB.prueba}" execute="@this" render="form2:opn1"/>
</td>
</tr>
</table>
</h:form>
<h:form id="form2">
<a4j:outputPanel id="opn1" rendered="#{rendered=='true'}">
<table>
<tr>
<td>
<a4j:commandButton id="btn2" value="mostrar" action="#{loginMB.renderiza}" execute="@this"/>
</td>
</tr>
</table>
</a4j:outputPanel>
</h:form>
-
2. Re: bug in dynamically rendered property, richfaces 4
healeyb Aug 29, 2012 7:22 AM (in response to iabughosh)Hi Diego, what is the reason for using 2 forms?
Regards,
Brendan.
-
3. Re: bug in dynamically rendered property, richfaces 4
asbeel Aug 29, 2012 11:27 AM (in response to asbeel)from RichFaces 3 my reports pages are divided in two forms
form1 filters
form2 result, datatable, link details, etc.
and the code of my post is similar.
what if it works is to place the outputPanel "opnl" inside Form 2, but I wanted to do it the way I did in richfaces 3.
thanks for responding
-
4. Re: bug in dynamically rendered property, richfaces 4
healeyb Aug 29, 2012 12:17 PM (in response to asbeel)Hmm ok, I don't personally recommend using multiple forms but if it worked for you in RF3 it ought to be ok now also,
probably.
What happens when you try Ibrahim's suggestion? so the problem is that the btn2 action method doesn't fire, have
you removed any input components from the code you've posted?
Can you check if the action method for btn2 doesn't fire only the first time you click it, does it work on the second and
subsequent clicks (this should be fixed by Ibrahim's suggestion...).
Also does you page have a <h:head></h:head> section somewhere? One more thing, what is the scope of your
backing bean?
Regards,
Brendan.
-
5. Re: bug in dynamically rendered property, richfaces 4
asbeel Aug 30, 2012 12:57 PM (in response to asbeel) -
6. Re: bug in dynamically rendered property, richfaces 4
healeyb Aug 30, 2012 8:20 PM (in response to asbeel)Diego, if you really want to get the problem solved just don't use multiple forms. I've lost count of the number of times
I've come across this issue and it's best just to not do it. If you can think of any good reason to persist with this approach
then I'd like to hear it. Use a single form per page, use ajax, send the input fields you need with execute=, avoid all
the issues with naming containers, mojarra spec bugs and make your life easy. Trust me this is the way to go.
Thanks,
Brendan.
-
7. Re: bug in dynamically rendered property, richfaces 4
asbeel Aug 30, 2012 11:35 PM (in response to asbeel)you are right with a single form would have no problem and property execute would help me control what sending the reason that is used by multiple forms that seemed a more orderly, because in my pages usually have many controls (filters, datatables, two or three modalpanels, etc). Brendan thanks for the advice I will remember.