Action methods weren't designed to be invoked with parameters. The idea is that the entire form is going to have been validated and updated into your backing bean, and in fact, if any item submitted fails validation, the action method won't be invoked at all - the JSF lifecycle will short-circuit it and display validator error message(s).
The inputText control isn't supplied with a display value expression, it's supplied with a value reference expression. Going out, the current value of the bean property is displayed, but on submit, the reverse will happen. So you don't need a "newValue", the original value will have been automatically updated for you.
JSF is very different from other web frameworks and the #1 rule in JSF is that the more code and the more complexity, the more likely you're doing it wrong. They've tried to make the common functions as simple and easy as possible.
Bjoke: A "Bully Joke". A Statement or action made with malicious intent - unless challenged. At which point it magically transforms into "I was just funnin'" or "What's the matter, can't take a joke?"
The reason why I use "newPropertyValue" and "propertyValue": I get the propertyValue from some other object. My getPropertyValue method calls some other method and I can't "set" that (yet). (I hope it's clear what I mean.) Maybe I'm thinking wrong... this seems like a common problem to me. I would like to have the propertyValue as the default value displayed in the inputText field, but I wan't changes to be bound to newPropertyValue. Hm. Maybe I could initialize the bean property, buuut... it's a dataTable. :O
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop