This tag is used to create the input text area component in the page. This component is like inputText but it can take values in multiple lines which can be wrapped in different formats. This tag has additional feature of displaying value only not the widget of the box. This component also has ability to be visible or not visible according to the role of the user. In the same way, it also has the ability to be enabled or disabled according to the user role. This component also has the capability to render the id for the component just the same as we have mentioned in the id attribute of the tag. Normally the naming system of JSF renders the id for the component with some additional text, typically with id of the form as prefix. But this component has an attribute forceId which forces the component to render the same id mentioned in the id attribute.
Code Description :
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>t:inputTextarea example</title>
<style type="text/css">
<!--
body{
background-color:#fff2f2;
margin-top:30;
}
.inputstyle{
background-color:#99CCCC;
}
-->
</style>
</head>
<body ><center>
<t:outputText id="ot" value="<b><p>
Q.1 : Why RoseIndia is the best site for java learners?
</b>" style="color:#0033CC; font-weight:bold"
title="Q.1" escape="false"/></p>
<t:inputTextarea id="ita" value="Give explanation here......."
cols="40" rows="3" style="color:#0033CC;
background-color:#99CCFF; font-weight:bold"
wrap="physical" title="inputTextarea example"
rendered="true" required="false"/>
</center></body>
</html>
</f:view>
|
Rendered Output :

Html Source Code :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>t:inputTextarea example</title>
<style type="text/css">
<!--
body{
background-color:#fff2f2;
margin-top:30;
}
.inputstyle{
background-color:#99CCCC;
}
-->
</style>
</head>
<body ><center>
<span id="ot" title="Q.1" style="color:#0033CC;
font-weight:bold"><b><p>
Q.1 : Why RoseIndia is the best site for java learners?</b>
</span></p>
<textarea name="ita" id="ita" cols="40" rows="3"
wrap="physical" title="inputTextarea example" style="color:#0033CC;
background-color:#99CCFF; font-weight:bold">
Give explanation here.......
</textarea>
</center><!-- MYFACES JAVASCRIPT -->
</body></html>
|
This tag contains attributes given below :
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.
Ask Questions? Discuss: Tomahawk inputTextarea tag
Post your Comment