Tim Holloway wrote:Technically, if it's JSF, it's not a script. A script is usually interpreted, where JSF code is compiled.
Aside from that, you can do this in JSF by simply referencing a boolean property on a backing bean, like so:
Make your button click method set the value of the "showMe" property to true to make the text visible, and false to hide it. The "rendered" attribute can be applied to many JSF elements, including entire tables.
Tim Holloway wrote:Most likely because of this:
This should be an EL property reference, not a function call. That is:
Tim Holloway wrote:No, you really shouldn't be doing "function calls" in EL. The example I showed you should work.
Tim Holloway wrote:When you do a property reference in Expression Language (EL), then the system assumes that for a property named "x", then it should automatically call getX() when it needs to render and setX() when it needs to transfer data from a form to a backing bean. Which is why you do not need - and should not have an explicit function call (the other reason is that web pages are not executable code anyway).
I wish you had done a cut-and-paste of the screen text. The picture doesn't show up on the message editor and besides pictures eat up storage on our servers.
The error message that you pasted would imply that the backing bean named computeTaxBean does not implement a method whose signature is:
Actually "getBoolResult()" should work, too, but the POJO standard for boolean property-get methods is the "isXXX" form.