struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@shareowner.com
Subject RE: get data to Collection
Date Wed, 29 Jan 2003 22:29:55 GMT
public void reset(ActionMapping mapping, HttpServletRequest request) {
    read = new ArrayList();
	//skip others params
}

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Kafka [mailto:kafka@centras.lt] 
Sent: January 29, 2003 5:02 PM
To: Struts Users Mailing List
Subject: get data to Collection

Hello,
I think, this problem many times was solve here,
but I don't find particular answer.
How I can use Form class, if I don't know how many
are rows? Must I use Collection? Maybe I can see example,
because I can not find decision.

Now my jsp:

<logic:notEmpty name="access" >
    <logic:iterate id="daiktas" name="access" scope="session">
              <html:multibox property="read" name = "daiktas" >
                   <bean:write name = "daiktas"  property="read"/>
              </html:multibox>
              <bean:write  name = "daiktas" property="read"/>
    </logic:iterate>
</logic:notEmpty>

Form.class
 private Collection read = new ArrayList();
//skip

 public void setRead(Collection read)
 {
        this.read.addAll(read);
  }

public Collection getRead()
{
        return this.read ;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
//skip others params
    read.clear();
}

but I get error:
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

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