heh, if you think inner classes are complex you are def using the wrong
framework
-igor
On 8/30/07, Kirk Israel <[EMAIL PROTECTED]> wrote:
>
> Ok, thanks...
> I refactored what i had with this in mind. It was a little more
> complicated because I want to delegate responsibility for generating
> the link and caption to the page (some of our links our kind of
> complex to promote lazy initialization), so the page is still calling
> into static functions to know what id to give the caption and label.
> Plus I had to create an additional class to hold that link plus the
> seperator( to do the comma and "or" in something like "A, B or C")
>
> The list is then
>
> add(new ListView("linklist", listSepLinks)
> {
> private static final long serialVersionUID = 0L;
> public void populateItem(final ListItem listItem)
> {
> CaptionedLinkAndSeperator linkAndSep =
> (CaptionedLinkAndSeperator)listItem.getModelObject();
> listItem.add(linkAndSep.getPageLink());
> listItem.add(new Label("sep",
> linkAndSep.getSeperator()));
> }
> });
>
> and the HTML is then
>
> <span wicket:id="linklist">
> <a href="#" wicket:id="link" class="link"><span
> wicket:id="caption">[LINK CAPTION]</span></a><span wicket:id =
> "sep">[,]</span>
> </span>
>
> So, the complexity isn't too bad despite the inner class and it's less
> kludgey than what i had earlier.
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>