struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Preston" <greg.pres...@intervoice.com>
Subject Getting actional field name from <NESTED:ITERATE>:
Date Wed, 09 Jul 2003 22:20:17 GMT
All,

I'm using the nested:iterate tag to display field information.  I need to pass the actual
name of the field to a Javascript function.  I thought I needed to define a few attributes
using the <nested:define> tag and then render those as parameters in my javascript function
call.

So my code looks like this:

<nested:define id="field_name" property="short_name" type="java.lang.String"/>
<nested:define id="source_id" property="source_id" type="java.lang.Integer"/>

<nested:text property="short_name" />
<input type="button" value="browse" onclick="openWindow( '<%= field_name %>',<%=
( (Integer)source_id ).intValue() %> )">
                                             

My output looks like this (which after RTFM is what I would expect):

<input type="text" name="meta_data[0].short_name" value="Customer Number">
<input type="button" value="browse" onclick="openWindow( 'Customer Number',8 )">


My desired output would be:

<input type="text" name="meta_data[0].short_name" value="Customer Number">
<input type="button" value="browse" onclick="openWindow( 'meta_data[0].short_name',8 )">


Again, how do I get the nested field name?

Thanks in advance

Greg

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message