struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: Urgent! Clipboard capability in Struts
Date Sun, 02 Jul 2006 18:39:12 GMT
> -----Original Message-----
> From: Victor.T. Ying [mailto:yutd2001@hotmail.com] 
> 
> Hi,
>    I need your suggestions on Struts(v1.2.7) Clipboard 
> capabilities i.e I have TextArea in the webpage  and I need 
> to paste file  content from the server to the text area when 
> userclick the  download button.
> but seems like that the struts html:textArea tag does not 
> support dynamica value settiing, the following is my jsp 
> snippet, the problem is that the value attribute in 
> html:textArea does not support dynamic content <bean:define 
> id="myfileContent" value="my_file_already_in_session" 
> scope="session"  />
> 
> <html:form 	action="/myaction/import.do" >
> <tr>
> 	<td width="100%" colspan="3" class=text align="left">
> 		<html:textarea property="myfileContent"  
> cols="80" rows="10"
> value="<c:out value="${fileStr}"/>"   />
> 	</td>
> </tr>

You're problem is that you're trying to embed a custom tag element
("c:out") as the attribute of a custom tag ("html:textarea").  You can't
do that.

You really need to have something that looks like this:

<html:textarea property="myfileContent" cols="80" rows="10"
value="${fileStr}"/>

How you set up for this solution depends on whether you are using a JSP
1.2 or JSP 2.0 container.

If you're using a JSP 1.2 container, you can resolve this situation by
using the Struts-EL tag library.  You'll need to change the taglib
directive for the "html" tag library to use the Struts-EL html tag
library (assuming you have that taglib jar in your WEB-INF/lib.

If you're using a JSP 2.0 container, and your web.xml file is using the
Servlet 2.4 schema, then you shouldn't have to do anything else.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message