• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

button display

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 26276
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it out. I had
to use a little Javascript magic.

Thanks

Chris
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic