Thank your reply.But when I submit my form ,It will fire my getListData 
method which fetch data from database.

ps:cycle.getRequestContext().getRequest()
.getParameterNames();
It will be deprecated in TP4.

On 9/13/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
> 
> 
> Something like this might work for you.
> 
> --- Pat
> Public void doDeletes(IRequestCycle cycle) {
> Enumeration en = cycle.getRequestContext().getRequest()
> .getParameterNames();
> ArrayList keys = new ArrayList();
> while (en.hasMoreElements()) {
> String s = (String) en.nextElement();
> String value =
> cycle.getRequestContext().getParameter(s);
> 
> if (s.startsWith(FastGrid.POST_HEADER)) {
> String id =
> s.substring(FastGrid.POST_HEADER.length());
> if (value.equals("on"))
> keys.add(id);
> }
> }
> if (keys.size() > 0) {
> HibHelper.beginTransaction();
> Criteria c =
> HibHelper.getSession().createCriteria(fObjectClass);
> c.add(Expression.in("id", keys));
> List l = c.list();
> for (int x = 0; x < l.size(); x++) {
> HibHelper.getSession().delete(l.get(x));
> }
> HibHelper.commitTransaction();
> fMessage = "Successfully deleted " + l.size() + "
> records.";
> }
> 
> > -----Original Message-----
> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ron Piterman
> > Sent: Monday, September 12, 2005 4:30 AM
> > To: tapestry-user@jakarta.apache.org
> > Subject: Re: How to avoid rewind a list?
> >
> > Forms in Tapestry always rewind. If you don't want to get the list from
> > the database again, you can "persist" it in the session.
> >
> > ציטוט Jun Tsai:
> > > hi ,all
> > > I have a form includes a checkbox group component.I find If I submit 
> the
> > > form,it will call my getListData method again.How to avoid this?I want
> > to
> > > get the checkbox value(primary key value) only!
> > > Thanks.
> > > Jun Tsai
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net

Reply via email to