struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reid Pinchback <>
Subject multibox problem with constantly checked item
Date Tue, 25 Mar 2003 22:57:29 GMT
I'm using struts 1.1rc1 with Tomcat 4.0.6.  I've got a logic:iterator on a
list-valued property.  I'm using a multibox 
to produce a bunch of checkboxes.  The first item in the list is always
checked when the page is
rendered.  What the heck could be going on?  I have a reset method, and I've
checked - it is being called.
Removing the extraneous noise, here is what I'm doing.
public class FooForm extends ActionForm {
  public FooBar[] getRowProperty() { ... }
  public String[] getOffsets() { return offsets; }
  public void setOffsets(String[] offsets) { this.offsets=offsets; }
  private String[] offsets;
  public void reset(ActionMapping ..., HttpServletRequest ...) { offsets=new
String[0]; }
			and in the JSP:

<logic:iterate id="row" indexId="i" name="my-form-bean"
property="rowProperty" type="FooBar">
  <html:multibox property="offsets"><bean:write
I have a DisplayFoo action that instantiates the form bean and binds it to
request scope via the attribute 
name "my-form-bean", and then forwards to the JSP (actually, forwards to a
Tiles definition which uses the
JSP).  I have another ProcessFoo action that processes the data on a submit,
and then forwards back 
to DisplayFoo for redisplay.
No matter what I do, the very first item in the list is always displayed as
checked.  Also, no matter what
I do to its state, it is the one item I can't process (I'm producing a list
of things to be selected from for
deletion, and the first item can never be deleted).  I've traced through my
code, and I still have absolutely
no idea what is going on.
Is this some known problem that other people have stumbled over?
Thanks in advance.... Reid

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