posted 7 years ago
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.
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.