Hi David,

I have tried endless variations of the hidden variable
in each row trick you suggested.  It seems like it should
be very simple, but each time I run into the problem of 
the variable I pass in to "value" does not get evaluated,
instead it comes through in the html as the literal I
pass in to it.  Below is an example of what I have 
tried doing.  As you can see, I have put two variations
of the variable I am trying to use in the table to make
sure that part is working, and it is.  Can I ask you how 
you got this to work?

Thank you in advance for any help.

-- Larry Maturo
   [EMAIL PROTECTED]
                            
<logic:iterate id="org" name="<%= Constants.ORG_LIST %>" scope="session"
type="com.athensgroup.projtrack.controller.org.OrganizationForm">
        <bean:define name="org" property="id" id="orgId" />
      <tr>
        <td>
                <html:submit property="id" value="Edit" />
            </td>            
            <td><bean:write name="org" property="mnemonic"
filter="true"/></td>
            <td><bean:write name="org" property="fullName"
filter="true"/></td>
            <td><bean:write name="org" property="type" filter="true"/></td>
            <td><bean:write name="org" property="id" filter="true"/></td>
            <td><bean:write property="orgId" filter="true"/></td>
            <td>
                <bean:write name="org" property="parentOrgName"
filter="true"/>
                    <html:hidden property="theOrgId" value="orgId" /> 
                </td>
      </tr>
</logic:iterate>

-----Original Message-----
From: David M. Karr [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 26, 2002 1:00 PM
To: [EMAIL PROTECTED]
Subject: Re: Help with table with edit buttons


>>>>> "Larry" == Larry Maturo <Maturo> writes:

    Larry> I have a table that displays information on a number of
    Larry> items.  Each table entry has an edit button, so that you
    Larry> can edit the information on that item. I use an iterate 
    Larry> tag to populate the table.  My problem is that I don't
    Larry> know how to save something indicating which edit button
    Larry> they pressed.

    Larry> My best guess was to use an onclick handler to set a
    Larry> hidden variable.  My problem is that while I know how
    Larry> to create the hidden variable (using the struts hidden
    Larry> tag) I don't know how to set it in the onclick handler.

One approach is not to try to determine which edit button was pressed, but
to
use a hidden field in a form in each table row to encode the OID of the
object
in that row.  Each form row submits to the same action.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to