struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@lexmark.com
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!

Cheers,

Dave





"Campesato, Oswald" <OCampesato%iona.com@interlock.lexmark.com> on 09/06/2001
06:15:53 PM

Please respond to struts-user%jakarta.apache.org@interlock.lexmark.com

To:   "'struts-user@jakarta.apache.org'"
      <struts-user%jakarta.apache.org@interlock.lexmark.com>
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:

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

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

Cordially,

Oswald


-----Original Message-----
From: dhay@lexmark.com [mailto:dhay@lexmark.com]
Sent: Wednesday, September 05, 2001 9:02 AM
To: struts-user@jakarta.apache.org
Subject: Re: "indexed" option does not work with html:checkbox




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

Dave





"Campesato, Oswald" <OCampesato%iona.com@interlock.lexmark.com> on
09/04/2001
04:01:26 PM

Please respond to struts-user%jakarta.apache.org@interlock.lexmark.com

To:   "'struts-user@jakarta.apache.org'"
      <struts-user%jakarta.apache.org@interlock.lexmark.com>
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....

Cordially,

Oswald














Mime
View raw message