You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Madhav Bhargava <Ma...@infosys.com> on 2006/11/11 15:29:21 UTC

UIInput value and submitted values

Hi All,



I am developing a custom validator. My validator is enclosed in one
EditableValueHolder component and then tries to get the value from other
EditableValueHolder component.



When I say -

EditableValueHolder component = (EditableValueHolder)uiComponent;

Component.getValue();

getValue() method returns me null even when the value is filled in and
submitted. When I check the whole component I found that submittedValue
attribute has the correct value and the value attribute was null.





Could anyone explain me the following:



1.	What is the purpose of submittedValue when value is there?
2.	Even if the user while including say a <t:inputText> component
specifies a property value="#{}" then also the value is null when it
goes to the validator's validate method but the submittedValue is
correctly populated?



Thanks,

madhav



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

AW: UIInput value and submitted values

Posted by Bi...@gmx.net.
As far as i know, that is because:

 

            --> Values are applied in APPLY_REQUEST_VALUES phase to the
submittedValue field

            --> Values are converted/validated in the PROCESS_VALIDATION
phase.

            --> The next phase is UPDATE_MODEL_VALUES phase. JSF applies the
submittedValue to the value field (If validation/Convertion was sucecssfull)

 

Hope this helps. (See
http://www-128.ibm.com/developerworks/java/library/j-jsf2/ for more
information)

 

Dominik

 

  _____  

Von: Madhav Bhargava [mailto:Madhav_Bhargava@infosys.com] 
Gesendet: Samstag, 11. November 2006 15:29
An: MyFaces Discussion
Betreff: UIInput value and submitted values

 

Hi All,

 

I am developing a custom validator. My validator is enclosed in one
EditableValueHolder component and then tries to get the value from other
EditableValueHolder component.

 

When I say - 

EditableValueHolder component = (EditableValueHolder)uiComponent;

Component.getValue();

getValue() method returns me null even when the value is filled in and
submitted. When I check the whole component I found that submittedValue
attribute has the correct value and the value attribute was null.

 

 

Could anyone explain me the following:

 

1.	What is the purpose of submittedValue when value is there?
2.	Even if the user while including say a <t:inputText> component
specifies a property value="#{}" then also the value is null when it goes to
the validator's validate method but the submittedValue is correctly
populated?

 

Thanks,

madhav

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient,
please notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents to
any other person and any such actions are unlawful. This e-mail may contain
viruses. Infosys has taken every reasonable precaution to minimize this
risk, but is not liable for any damage you may sustain as a result of any
virus in this e-mail. You should carry out your own virus checks before
opening the e-mail or attachment. Infosys reserves the right to monitor and
review the content of all messages sent to or from this e-mail address.
Messages sent to or from this e-mail address may be stored on the Infosys
e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***