You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ken carlino <ke...@gmail.com> on 2006/10/31 23:57:09 UTC
[newbie] managed-property in face-config.xml
Can you help me understanding what is the difference between putting
'#{param.userName}' vs putting '#{userManager}' as the value of a
managed property?
What is the meaning of the 'param' in the expression?
<managed-property>
<property-name>userName</property-name>
<value>#{param.userName}</value>
</managed-property>
<managed-property>
<property-name>userManager</property-name>
<value>#{userManager}</value>
</managed-property>
Re: [newbie] managed-property in face-config.xml
Posted by Simon Kitching <si...@rhe.co.nz>.
Hi Ken,
ken carlino wrote:
> Can you help me understanding what is the difference between putting
> '#{param.userName}' vs putting '#{userManager}' as the value of a
> managed property?
>
> What is the meaning of the 'param' in the expression?
>
> <managed-property>
> <property-name>userName</property-name>
> <value>#{param.userName}</value>
> </managed-property>
> <managed-property>
> <property-name>userManager</property-name>
> <value>#{userManager}</value>
> </managed-property>
JSF provides a number of objects that are available for use by default;
these are called "implicit objects".
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFPage10.html
As you can see from the "implicit objects" table at the above url,
#{param} accesses the request parameters in the http request. The
expression #{param.userName} is therefore the http request GET or POST
parameter with name=userName.
There is no implicit "#{userManager}" object; this is presumably
referring to some managed-bean with that same name.
Regards,
Simon