I believe Tapestry 4's LinkSubmit will do it.

On 8/18/05, Mark Stang <[EMAIL PROTECTED]> wrote:
> Howard,
> What is the recommended solution that will submit the form on a link and pass 
> in an id?
> 
> thanks,
> 
> Mark
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: Thu 8/18/2005 9:47 AM
> To: Tapestry development
> Subject: Re: [DISCUSS] Deprecate the action service
> 
> Use a DirectLink component, and pass the id of the invoice as a
> listener parameter.
> 
> On 8/18/05, Jonas Maurus <[EMAIL PROTECTED]> wrote:
> > Howard Lewis Ship <hlship <at> gmail.com> writes:
> >
> > >
> > > I just saw another spat of user problems related to use of the action
> > > service. I say "use", not "misuse" because, in my opinion, it can't be
> > > used correctly.  The clever tricks for maintaining client and server
> > > synchronization that have evolved in Tapestry 2.x - 4.0 just aren't
> > > possible with the action service.
> > >
> > > I would very much like to deprecate the action service and the
> > > ActionLink component. Who out there is using it and why?
> > >
> >
> > I'm currently using the ActionLink component a lot in all my projects 
> > together
> > with contrib:Table.
> >
> > The typical use-case looks something like this:
> >
> > Invoices.html
> > [...]
> > <td jwcid="viewLinkColumnValue">
> >   <a jwcid="view" href="../viewers/InvoiceViewer.html">
> >     <span key="list.viewinvoice">details</span>
> >   </a>
> > </td>
> > [...]
> >
> > Invoices.page
> > [...]
> > <component id="invoiceTable" type="contrib:Table">
> >   <binding name="source" value="invoiceList" />
> >   <binding name="columns" 
> > value="literal:id,subject,total,viewLink,editLink" />
> >   <binding name="row" value="currentInvoice" />
> > </component>
> >
> > <component id="view" type="ActionLink">
> >   <binding name="listener" value="listener:viewInvoice" />
> > </component>
> > [...]
> >
> > Usually the ActionLink's listener then does something like this (Invoice 
> > being a
> > persistent property of InvoiceViewer):
> > public IPage viewInvoice(IRequestCycle cycle) {
> >   InvoiceViewer iv = (InvoiceViewer)cycle.getPage("viewers/InvoiceViewer");
> >   iv.setInvoice(getCurrentInvoice());
> >   return iv;
> > }
> >
> > This pattern comes from contrib:Table's documentation. At least, should
> > ActionLink be removed, alternatives have to be documented well before we're
> > doing it, especially in places like contrib:Table, where the documentation 
> > makes
> > explicit use of this component.
> >
> > Still, I don't know enough about Tapestry's internals to know if it would 
> > be a
> > good decision, but in any way, if it happens, it should happen now. As I've 
> > said
> > before, it's better to make porting to 4.0 a major pain and support 3.0 a 
> > little
> > bit longer than making big changes between 4.0 and 4.1.
> >
> > How would you solve the above problem without using ActionLink?
> >
> > cheers,
> > Jonas
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to