You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by joseph panico <jo...@panmachine.biz> on 2004/12/22 00:57:12 UTC

ActionLink in contrib:Tables

Hello,

The below applies to Tapestry 3.0.

I'm interestd in using ActionLink in the contrib:Table and contrib:FormTable.
To test it out, I first slightly modified the workbench Table example.


in LocaleSelection.jwc, I changed:
 
   <component id="directDelete" type="DirectLink">
      <binding name="listener" expression="listeners.deleteLocale"/>
      <binding name="parameters" expression="deleteLocaleContext"/> 
   </component>

to:

   <component id="directDelete" type="ActionLink">
      <binding name="listener" expression="listeners.deleteLocale"/>
   </component>

and the listener could then be simplified to:

    public void deleteLocale(IRequestCycle objCycle)
    {
    	Locale currentLocale = this.getCurrentLocale();
        getLocaleSet().remove(currentLocale);
    }

After this modification, the workbench still worked as before. So I got a
little bolder and I tried the FormTable. I wrapped the table component in
LocaleSelection.html in a Form component and changed the table type in
LocaleSelection.jwc to contrib:FormTable, still using an ActionLink for the
delete link. When I selected the delete link I got this message in the browser:

------------------
You have clicked on a stale link.

Action id 3 does not match component Table/localeSelection.directDelete.

This is most likely the result of using your browser's back button, but can
also be an application error.
------------------

Are these the rules, in general, for using Link components in contrib:Table?

contrib:Table -- can hold DirectLink or ActionLink in values
contrib:FormTable -- must use DirectLink in values

Or is there some convenient way to make ActionLinks work inside FormTables?

thanks,

joe

--
Open WebMail Project (http://openwebmail.org)


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