Custom ILinkListener component causes error in cell on mounted page
-------------------------------------------------------------------

                 Key: WICKET-734
                 URL: https://issues.apache.org/jira/browse/WICKET-734
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta2
            Reporter: Robert
            Priority: Minor


I created a custom LabelLink component that extends Label and implements 
ILinkListener.
The page is mounted like this: 
mountBookmarkablePage("/" + clazz.getSimpleName(), clazz);

If I add this in a panel to an AbstractColumn and click the link I receive the 
following error:
"unable to find component with path 
forumBrowserForm:forums:rows:1:cells:1:cell:link on page"

This error did not occur in 1.2.6 or if the page is not mounted.

The code for the LabelLink:

public abstract class LabelLink extends Label
        implements ILinkListener
{

    protected LabelLink(final String id, String label)
    {
        super(id, label);
    }

    protected LabelLink(final String id, IModel model)
    {
        super(id, model);
    }

    protected void onComponentTag(final ComponentTag tag)
    {
        tag.setName("a");
        tag.put("href", urlFor(ILinkListener.INTERFACE));
    }

    protected void onComponentTagBody(final MarkupStream markupStream, final 
ComponentTag openTag)
    {
        replaceComponentTagBody(markupStream, openTag, 
getModelObjectAsString());
    }

    public final void onLinkClicked()
    {
        onClick();
    }

    public abstract void onClick();

}

I also created a quickstart project for displaying this problem.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to