PDA

View Full Version : problem with textarea


bornleo26
Aug 9th, 2007, 07:37 AM
Hello Friends,

I have an issue with text area ,value of text area is coming as null ... in my pojo class i have taken the fiels as a string...could you tell me why its giving such issue


here is the code of my jsp:-
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:smvc="http://www.springframework.org/tags/form"version="2.0"



<tr>
<td><span style="font-weight: bold; font-size: 12pt;"><u>Discussion Topic</u></span></td>
<td><smvc:input path="discussionTopic" maxlength="255" size="40" /></td>
</tr>
<tr>
<td><span style="font-weight: bold; font-size: 12pt;"><u>Posted By</u></span></td>
<td><input type="text" name="postedBy" maxlength="255" size="40" value="${command.postedBy}"/></td>
</tr>
<tr>
<td><span style="font-weight: bold; font-size: 12pt;"><u>Posted To</u></span></td>
<td><smvc:select path="postedTo" multiple="true">
<c:forEach var="user" items="${command.user}">
<smvc:option value="${user.username}">${user.username}</smvc:option>
</c:forEach>
</smvc:select>
</td>
</tr>
<tr>
<td><span style="font-weight: bold; font-size: 12pt;"><u>Start Time</u></span></td>
<td><smvc:input path="startDate" id="startDate" /><img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='startDate_DateTrigger'/> </td>
</tr>
<tr>
<td><span style="font-weight: bold; font-size: 12pt;"><u>End Time</u></span></td>
<td><smvc:input path="endDate" id="endDate" /><img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='endDate_DateTrigger'/></td>
</tr>
<tr>
<td><span style="font-weight: bold; font-size: 12pt;"><u>DeadLine ?</u></span></td>
<td><smvc:input path="deadLine" id="deadLine" /><img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='deadLine_DateTrigger'/></td>
</tr>
<tr>
<td>*</td>
<td>*</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table border="0" width="100%" height="300" >
<tr>
<span style="font-weight: bold; font-size: 12pt;"><u>Comment:</u></span>
<td align="center"><textarea path="comments" rows="10" cols="100">Enter Your Text</textarea></td> ---this i where issue is </tr>
<tr>
<td align="right" valign="top"><input type="submit" value="Post Reply" name="postReply"/></td>
</tr>
</table>
</td>
</tr>





value of text area is coming as null ... in my pojo class i have taken the fiels as a string...could you tell me why its giving such issue

Thanks in advance,
Pankaj Chaswal

pmularien
Aug 9th, 2007, 08:52 AM
Unless I'm missing something, it looks like you want to be using <smvc:textarea> instead of the plain HTML <textarea>.

bornleo26
Aug 9th, 2007, 11:22 AM
Thanks for the reply but

Smvc:textarea doesn't work .. no such tag

I have already tried it ... do we have any textarea tag in spring TagLib.

pmularien
Aug 9th, 2007, 11:35 AM
Thanks for the reply but

Smvc:textarea doesn't work .. no such tag

I have already tried it ... do we have any textarea tag in spring TagLib.

Yes (http://static.springframework.org/spring/docs/2.0.x/reference/spring-form.tld.html#spring-form.tld.textarea), there is.