incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Dopheide" ...@qwizics.com>
Subject tr:inputText disabled="true" & pageFlowScope
Date Sat, 20 Jan 2007 02:31:15 GMT

Guidance required on this issue...

Realizing that when using tr:inputText and pageFlowScope (or saveState) the
readOnly (or disabled) attributes do not get submitted to the backing bean
as to the model, then...

What is recommended practice when these "disabled" values are to be
persisted? For example, if I am using pageFlowScope and in my backing bean
has something like:
    User user = (User) app.getVariableResolver().resolveVariable(context,
"user");

And my web pages contains:
	<tr:inputText id="regCode"
		label="#{text['registration.candidateId']} : "
		value="#{pageFlowScope.registration.candidateId}"
		disabled="true"
		contentStyle="margin: 1em 0 0 0;color: blue" 
		required="true"/>

then this "regCode" attribute that is declared "readOnly" does not appear in
my User model in the backing bean. This is kind of a pain in the keyboard
;^)

What is recommended practice in these situations? Certainly <h:inputHidden
on the disabled attributes is possible but this seems to lack the elegance
that I would expect.

I mean when using hibernate, etc I would just like to get the model (my
POJO) back from the view and do a userManager.save(user) but when readOnly
attributes are vacant then this isn't as easy as I think it should be.
Having a view object that gets transferred to my POJO just seems like so
much unnecessary code.

Any tips or hints on best practices related to this issue would be greatly
appreciated...


Best regards to all,

Mark


Mime
View raw message