File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes bean:define with bean:write Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:define with bean:write" Watch "bean:define with bean:write" New topic
Author

bean:define with bean:write

chiragpatel Patel
Greenhorn

Joined: Sep 12, 2007
Posts: 7
I want to do something like below, if i run following code it prints as it is, dont print value of userId. Then how to do.

<bean efine id="abc" value='<bean:write name="userForm" property="userId"/>' />
<bean:write name="abc"/>
Ranjit Gopinathan
Ranch Hand

Joined: Jul 03, 2007
Posts: 46
Try this

<bean: define id="abc" name="userForm" property="userId" />
<bean:write name="abc"/>

-HTH
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
or:
<bean:write name="userForm" property="userId" />

or maybe:
<cut value="${userForm.userId}" />

BTW, the original problem is that you cannot nest tags inside the attributes of other tags. You probably could have written your orignial code like this as well:
<bean:define id="abc"><bean:write name="userForm" property="userId"/></bean:define>
<bean:write name="abc"/>

- Brent
[ September 18, 2007: Message edited by: Brent Sterling ]
chiragpatel Patel
Greenhorn

Joined: Sep 12, 2007
Posts: 7
Thanks to both of you, now let me try the code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bean:define with bean:write
 
Similar Threads
Using bean:write with html:link
Using bean:write with html:link
logic:iterate problem
help :how to get value from logic:iterate
bean:write