• Post Reply Bookmark Topic Watch Topic
  • New Topic

button display  RSS feed

 
Chris Voge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you make a button disappear when you link to another screen?

I've created an account search screen to query accounts and if I do
a query and get no results back, I display a new button that says
"Enroll new Account?". I click the button and go to another screen.

Now if I come back to my account search screen later on, the
"Enroll new Account" button is still there. How do I make it
so it doesn't reappear when I come back to it ?

Thanks

Chris
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this thread thread

you can find the code to disable a dropdown box.

change it to button
and instead of setDisabled(true) use setRendered(false)

hope it helps.

Thanks,
 
Chris Voge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion

Unfortunately, this didn't seem to
work. I should mention I am also
including the following

<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires",0);
response.setHeader("Pragma","No-cache");
%>

So my account search page won't become cached
and expire. For some reason, this doesn't seem
to work either.

Any other suggestions ? I appreciate it.

Chris
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JSF AFAIK, the cache issues are handled for you. At leaast I've never had the need to explicitly define anything.
 
Chris Voge
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out. I had
to use a little Javascript magic.

Thanks

Chris
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!