This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

commandbutton inside panelgroup dont work

 
javier pavon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



 
Shasi Mitra
Ranch Hand
Posts: 101
Flex Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
Flex Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in reply to Akaine Harga, if i remove the rendered, the button works, but i need it ;(
 
Shan Narayanan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is it this tag? jsf core? i dont found it
 
Shan Narayanan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
c:if are jstl tags you can google it for reference.
They are work perfectly for conditional statements in jsp
 
javier pavon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try this and it's work perfectly!!!


Thank very much for your help, i hope i can help to anybody too. ;)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic