Friday 31 May 2013

JSF inputTextarea tag example

1). JSF inputTextarea tag Program Structure: 


















 2). index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<html>
 <head>
   <title>JSF inputTextarea tag example!</title> 
</head>
  <body>
        <f:view>
           <h2>JSF h:inputTextArea tag example</h2>
               <hr/>
            <h:form>
                <h3>Read-Only input text area</h3>
                  <h:inputTextarea  value="Hello JSF World!
                 <br/> Everything is fine!" readonly="true"/>
                  <h3>Normal input text area</h3>
                  <h:inputTextarea value="Hello JSF World! <br/> Everything is fine!"/>
            </h:form>
        </f:view>
    </body>
</html>

3). OutPut

 

 

 

No comments:

Post a Comment