Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Jsf JSF param Tag

Related Tutorials


 
 

Share on Google+Share on Google+

JSF param Tag

Advertisement
The JSF param Tag is used to set the parameter to the enclosing component. This tag is helpful in the case of creating the compound message.

JSF param Tag

        

This tag is used to set the parameter to the enclosing component. This tag is helpful in the case of  creating the compound message. Its value attribute can be set using EL to get the current value from the backing bean property. Suppose you are using outputFormat tag to create compound message where these param values can be used.

Code Description : In the code below {0}and {1}are replaced by the param values specified within outputFormat tag. param values are being taken from properties of backing bean "MessageBean".

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<f:view>
<html>
<body>
<h:form>
<h:outputFormat value="Hi,{0}. This is to inform you,{1} is your password .">
<f:param value="#{MessageBean.a}" />
<f:param value="#{MessageBean.b}" />
</h:outputFormat>
</h:form>
</body>
</html>
</f:view>

Output Rendered :

Html Source Code :

<html>
<body>
<form id="_id0" method="post" action="/coretag/pages/param.jsf" enctype="application/x-www-form-urlencoded">
Hi,Alex. This is to inform you,123456 is your password .
<input type="hidden" name="_id0" value="_id0" /></form>
</body>
</html>

This tag contains some attributes that are explained below :

binding : This attribute takes value binding expression to link component to the banking bean property.
id :
This is used to uniquely identify the component.
name :
This is used to set the name of the parameter.
value :
This is used to set the value of  the parameter.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 15, 2007

Related Tutorials

Discuss: JSF param Tag  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com