Home Jsf JSF param Tag



JSF param Tag
Posted on: June 15, 2007 at 12:00 AM
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.

Related Tags for JSF param Tag:
ccomormjsfformhelppropertysedformatoutputgetvaluetagattributeusingmessagesetcreatecasecasjsforwherevaluestoramposbeaneitbackcanputuseulpefromcurrentinutfrmasmntoutpartrsageosbeacaosjesaseagemeproppparamackcreatingssussaessatkispropereaartformtfrtropesavattssrirenthatialupropprndomo


More Tutorials from this section

Ask Questions?    Discuss: JSF param Tag  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.