Frameworks| Hibernate| Struts| JSF| JavaFX| Ajax| Spring| DOJO| JDO| iBatis| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
JSF attributeTag 
 

This tag is used to add attribute to the nearest parent component.

 

JSF attributeTag

                          

This tag is used to add attribute to the nearest parent component. This is name/value pair where name takes the attribute name which will be set to the component and value takes the value of the attribute. In this example, command button tag is assigned only one attribute "id", then attribute tag is used to assign more attributes and its values. For example, instead of specifying "value" attribute and its value "Click" ( i.e. value="Click") in commandButton tag parallel to "id" attribute, this has been associated to the component using attribute tag.

Code Description :

<%@ page contentType="text/html" %>
<%@ 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 id="form1">
<h:inputText value="Enter Name" />
<h:commandButton id="button1">
<f:attribute name="value" value="Click"></f:attribute>
</h:commandButton>

</h:form>
</body>
</html>
</f:view>

Rendered Output :

Html Source Code :

<html>
<body>
<form id="form1" method="post" action="/f-tags/pages/attribute/attribute.jsf" enctype="application/x-www-form-urlencoded">

<input type="text" name="form1:_id0" value="Enter Name" />
<input id="form1:button1" type="submit" name="form1:button1" value="" />
<input type="hidden" name="form1" value="form1" /></form>
</body>
</html>

This tag contains two attributes :

name : This is the required attribute which is used to specify the name of the attribute of the nearest parent component.
value :
This is the required attribute which is used to specify the value of the attribute specified in name attribute of this tag.

                          

» View all related tutorials
Related Tags: c com memory server dynamic tree components core component tag name this node oo ibm create root like for example

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (
post your own) View All Comments Latest 10 Comments:

Please improve this pages on more Example which is understand by the developers


Thanks for your services
ASHOK

Posted by Ch Ashok on Thursday, 07.19.07 @ 16:08pm | #21572

Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.