• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to: Change af:outputText according to Click of an af:selectBooleanCheckbox

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I posted this question in a different (incorrect) forum here at coderanch . . . after a series of forum movements by Mods (who were sincerely trying to help - no complaints by me) it appears to have died an unnoticed death. I hope it's alright that I re-post the question here . . . because this may be the correct forum.

Dan Ba wrote:So, here's my question (with slight 'setup'):

I have an af : outputText which gets it's value set to a date value (slightly altered via af:convertDateTime to remove the "/" seperators) on page load:


I want a check box on the page (I'm trying an af:selectBooleanCheckbox) which, if checked, will change the outputText value to the final date of the previous year. If unchecked, it will return to the original value.

So, I thought that I could try some sort of 'value change listener' backing bean code sort of scenario like so . . .

Within the .jspx page:


Don't worry about the "123109" value . . . right now I'm simply trying to make ANY change happen to the outputText. LOL!

Obviously, I'm missunderstanding something very basic about Java, the valuechangelistener scenario and the way to correctly work my backing bean code (as I am a beginner) . . . so, I really don't quite know how to proceed or where to look for a better suggested solution (even having spent many many, way TOO MANY, hours on Google)

I did a 'search' here and found solutions on how to make an outputText field render or not . . . but, I can't quite grasp how to actually change the value.

Any assistance would be grealy appreciated.




Dan-O

P.S. - If I've chosen the incorrect forum (beginning Java) I apologize . . . The reason why I chose "beginning Java" is because I couldn't see "Intermediate Java" -and I'm a beginner, myself. Moderators, if I've chosen incorrectly, please accept my sincere apologies and feel free to move this to a more appropriate forum.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic