struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: "indexed" option does not work with html:checkbox
Date Fri, 07 Sep 2001 16:30:31 GMT

Hi.  Not sure I follow...

If you add indexed="true" to the checkbox tag, it will produce unique indexed
names which should set the value in the appropriate deleteCheckbox - you can
then check which deleteCheckbox was set.

Let me know if this isn't what you want!



"Campesato, Oswald" <> on 09/06/2001
06:15:53 PM

Please respond to

To:   "''"
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  RE: "indexed" option does not work with html:checkbox

David + Marcelo:  thank you both -- I'm now in a position
where I must use the struts 'jar' files from several months
ago instead of the nightly build (alas!).

The problem is fairly straightforward:  I'm displaying a
dynamic list of checkboxes inside an 'iterate' tag.  How
do I specify the name of each checkbox based on an attribute
of the iterated list?  When the page is submitted, I can
then use the name of the checkbox to determine which of the
checkboxes were clicked (if any).  As has been pointed out
by other people, nested tags do not work (with or without
escaping quote marks).

Here's the code fragment where the four lines with ">" are
my attempt at specifying a unique name for each checkbox:

          <logic:iterate id="repositoryConfig" name="repositoryListVector">
            <td class=fieldentry>
>             <html:checkbox name="repositoryConfig"
>                            property="deleteCheckbox"
>                            value="<bean:write name=\"repositoryConfig\"

I'll be re-using the correct code fragment in many
places, so a solution would be really appreciated:)



-----Original Message-----
From: []
Sent: Wednesday, September 05, 2001 9:02 AM
Subject: Re: "indexed" option does not work with html:checkbox

To use the indexed option you need to be using the nightly build.


"Campesato, Oswald" <> on
04:01:26 PM

Please respond to

To:   "''"
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  "indexed" option does not work with html:checkbox

The following tag:

<html:checkbox indexed="yes" property="deleteCheckbox" />

generates the following error message:

indexed is not a valid attribute for tag html:checkbox

I've also tried "index" instead of "indexed" and "true" instead of "yes".
Other options (onchange, onclick, disabled) work correctly with this tag,
so why doesn't "indexed" work?  Suggestions welcome....



View raw message