I would use a ListView that took a list of these guys:
interface LinkOnClick {
public void onClick();
}
Then just call the onClick from inside each Link's onClick.
On 9/12/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
> why must there be dynamic wicket ids?
> why do you need those? How would you target them in java?
>
>
>
> On 9/12/05, leo <[EMAIL PROTECTED]> wrote:
> > i have a reusable MenuBar component that, among other things, contains a
> list of button implemented as Links (id=actionsList).
> >
> > Now i would like to make this MenuBar component reusable, so that -among
> other things- buttons can be added & removed by parent component (usually
> the page)
> >
> > Each link must have its own wicket-id, and i can not figure out how to
> combine Link into a ListView subclass, because of the wicket-ids that need
> to be dynamically generated.
> >
> > Is it possible to use the ListView, or shall i implement a dedicated
> "LinkList" (or whatever you call it) component ?
> >
> > Thanks for your time,
> >
> > Leo
> >
> >
> > --
> >
> > Menubar snipplet :
> >
> > <div class="btnbar" >
> > <table width="100%"><tr>
> > ...
> > <td align="right" style="width:400px">
> >
> > <form wicket:id="searchform" style=";padding:none;">
> > <input wicket:id="q" name="q" value="search..." type="text"
> onclick="this.value=''" />
> > </form>
> >
> > <span wicket:id="actionsList">
> > <a wicket:id="???" href="">Link Label</a>
> > </span>
> >
> > </td>
> > </tr></table>
> > </div>
> >
> >
> >
> > Buttons bar should expand into something like :
> >
> > <span wicket:id="actionsList">
> > <a
> href="?path=3:menubar:searchForm:newContactLink&interface=ILinkListener"
> > wicket:id=
> > "newContactLink">New</a>
> > <a
> >
> href="?path=3:menubar:searchForm:lnkCardView&interface=ILinkListener"
> wicket:id
> > ="lnkCardView"
> > >Panel view</a>
> > <a
> href="?path=3:menubar:searchForm:lnkListView&interface=ILinkListener"
> >
> > wicket:id="lnkListView">List view</a>
> > </span>
> >
> >
> >
> >
> >
>
>
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user