File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Problem with <h:commandButton> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with <h:commandButton>" Watch "Problem with <h:commandButton>" New topic

Problem with <h:commandButton>

Aditi Gandy
Ranch Hand

Joined: Apr 23, 2008
Posts: 37
Hi all,
I am developing a left Navigation Panel of a website. In that i have inserted a search buttion, but, now i don't want to keep that button, want to remove it.

Problem is:
When i remove search button, my other navigation control buttons are not working.....It is a very strange problem....I don't know how to solve it. I want to remove my search button and also want my other buttons work normally.

Can any one please help me. I am pasting my code for your reference.


Please help.

Thanks & Regards,
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

How is the form submitted without the submit button?

-Cameron McKenzie
Zaeed McColin
Ranch Hand

Joined: Jan 13, 2009
Posts: 90
how do you want remove the button?
add "rendered" attribute for <h:commandButton/> and control it with boolean value by a method in managed bean

in Class managed bean add a method for controlling visibility of the button

Open source
Aditi Gandy
Ranch Hand

Joined: Apr 23, 2008
Posts: 37
Hi ArAsh Dex ,

Thanks for your reply.
I have tried hardcoding rendered="false" for the button. After doing so, button did not display on the browser but, my other buttons for other pages are not working again......same problem.

I thought of implementing your bean code. I am confussed and not able to understand what is the meaning of
-->this.att="Okay".....Okay stands for what??

Can you please help me.... :(
Aditi Gandy
Ranch Hand

Joined: Apr 23, 2008
Posts: 37

Any one please help me.... :(
I agree. Here's the link:
subject: Problem with <h:commandButton>
jQuery in Action, 3rd edition