• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

commandbutton inside panelgroup dont work

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 99
MyEclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?



 
Ranch Hand
Posts: 101
Spring Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Spring Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in reply to Akaine Harga, if i remove the rendered, the button works, but i need it ;(
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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. ;)
 
It's feeding time! Give me the food you were going to give to this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic