aspose file tools*
The moose likes JSF and the fly likes commandbutton inside panelgroup dont work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "commandbutton inside panelgroup dont work" Watch "commandbutton inside panelgroup dont work" New topic
Author

commandbutton inside panelgroup dont work

javier pavon
Greenhorn

Joined: Mar 03, 2010
Posts: 9
I have this code



I have two buttons, one inside of a panelgroup with a rendered condition and other outside.

When I open the page, two buttons are rendered because the condition is true, but when i click in the buttons, only the button "botonInside" works, the seconds button dont navigate and also will be disappear.

It is because, when i push the button "botonOutside", i dont know why but the panelgruop its rendered another time, before that navigation and then the condition its false.



Anybody know why after push the button the panelgroup it will be render another time? why the button "botonOutside" dont navigate???


Please, i need help.

Thanks
Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 71

I am not sure I understood the problem... =P
Could you explain it step by step?

Do you use a4j or RichFaces in your aplication?




Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

Hey.. remove the rendered attribute for the panel and try. If it works i'll tell you what the problem is and how to get over it.
Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

What is the scope of your "historicoMedicacionManagedBean" ? Your button will not work if your managed bean's scope is request. You should save the state of the bean or the variable in the rendered attribute.
javier pavon
Greenhorn

Joined: Mar 03, 2010
Posts: 9
a lot of thanks for your replys!!!

The scope for the Bean it´s request, i cannot use session scope ;( and i need the rendered, because when the condition it´s false i dont want show the panelgroup.

I´m use richfaces, but in this example only i am using h:commanbutton.


The problem:
When i push the button "botonOutside", the panelgroup will be render another time, the condition will be false and the button will be dissapear and the aplicattion dont navigate. Why the panelgroup render when i push the button?

I need a button inside a panelgruop with a rendered condition for navigation.

Please, any help?

javier pavon
Greenhorn

Joined: Mar 03, 2010
Posts: 9
in reply to Akaine Harga, if i remove the rendered, the button works, but i need it ;(
Shan Narayanan
Greenhorn

Joined: Mar 04, 2010
Posts: 3
Hi,
If you have Rich Faces , then use <c:if test="${urcondition}"><h:commandbutton></c:if>

We have certain issues in using panel Group.
javier pavon
Greenhorn

Joined: Mar 03, 2010
Posts: 9
Where is it this tag? jsf core? i dont found it
Shan Narayanan
Greenhorn

Joined: Mar 04, 2010
Posts: 3
c:if are jstl tags you can google it for reference.
They are work perfectly for conditional statements in jsp
javier pavon
Greenhorn

Joined: Mar 03, 2010
Posts: 9
I try this and it's work perfectly!!!


Thank very much for your help, i hope i can help to anybody too. ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: commandbutton inside panelgroup dont work
 
Similar Threads
JSF + AJAX partial rendering redundent method call
AJAX rendering some panelGroups
action method not invoked
h: panelGroup issue
Specifying multiple targets for hx:behaviour does not work