I am trying to do something which I think should be simple, but I am probably going about it the wrong way.
Imagine I have an XML file that contains name-value pairs (in reality it could be a database or naything else I plug into the back-end).
And then I have some page that gets those values from the backing bean, maybe using them as defaults
That's fairly trivial and at some point in the future I can add another "h:inputText" to use "bar", but I would need to change the backing class and that is something I'd like to avoid. I could use EL 2.2 and have a parameter, but based on
Tim's post I fear I might be breaking the whole MVC concept and I don't want to do that either! Also, I don't think it would work when the user makes changes to the values, it would keep getting the defaults from the XML file as it has no way of accessing the setter.
I was thinking of updating a hidden "h:inputText" or something to hold key/value pairs; but that struck me as very messy and still left me with the problem of reading the value back at render time.
So is there a way to do what I need? To call a single "property" and get/set values for "foo" and "bar" as appropriate (a bit like a "property bucket" or "property bag"), without having to modify the backing bean for each new control that gets added?
Thanks in advance.