You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by An...@dana.com on 2002/02/21 14:45:26 UTC

Re-post: Using in a html tag value property

The more I think of this the less it seems like it should be possible.  The
value attribute is unparsed char data (CDATA).  How does everyone else do
this in a Struts MVC way?  It seems very common to me that you would want
to use the value to one bean to set the value of another.  Something like:

<html:radio property="objectID" value=" <bean:write name='po' property
='objectID'/> "/>


and see below.

Thanks.


Andy

****************************
Andrew Goodnough
Dana Commercial Credit
Programmer
(419) 891-2065
----- Forwarded by Andrew Goodnough/DCC/Dana on 02/21/2002 08:39 AM -----
|--------+------------------------->
|        |          Andrew.Goodnoug|
|        |          h@dana.com     |
|        |                         |
|        |          02/19/2002     |
|        |          09:14 AM       |
|        |          Please respond |
|        |          to "Struts     |
|        |          Users Mailing  |
|        |          List"          |
|        |                         |
|--------+------------------------->
  >---------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                     |
  |       To:     struts-user@jakarta.apache.org                                                                        |
  |       cc:                                                                                                           |
  |       Subject:     Using <bean:write> in a html tag value property                                                  |
  >---------------------------------------------------------------------------------------------------------------------|




This seems like it should be simple but I'm having trouble with how to use
a <bean:write> as the value in a struts <html:> tag.  For instance, the
following code works but I'd like to use instead, something like the line
that is commented out below.

<logic:iterate id="po" name="purchaseOrders" type
="com.dcc.brum.po.PurchaseOrder">
<tr>

     <!-- Can't get to work -->
<!-- <td width="4%"><html:radio property="objectID" value="<bean:write name
='po' property='objectID'/>"/></td>      -->

     <!-- Works, but is kind of old school -->
     <td width="4%"><html:radio property="objectID" value="<%=
po.getObjectID().toString() %>"/></td>

     <td class="D-list" width="18%"><bean:write name="po" property
="customerLegalName"/></td>
     <td class="D-list" width="14%"><bean:write name="po" property
="description"/></td>
     <td class="D-list" width="17%"><bean:write name="po" property
="vendorName"/>&nbsp;</td>
     <td class="D-list" align="center" width="10%"><bean:write name="po"
property="PONum"/></td>
     <td class="D-list" align="right" width="14%"><bean:write name="po"
property="POTotalAmt"/></td>
     <td class="D-list" align="center" width="9%"><bean:write name="po"
property="PODate"/></td>
     <td class="D-list" align="center"width="7%"><bean:write name="po"
property="POStatus"/></td>
     <td class="D-list" align="center" width="7%"><bean:write name="po"
property="POStatus"/></td>
</tr>
</logic:iterate>


Thanks, for any help.


Andy

****************************
Andrew Goodnough
Dana Commercial Credit
Programmer
(419) 891-2065


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





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>