You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2007/08/26 21:57:30 UTC
[jira] Commented: (WICKET-734) Custom ILinkListener component
causes error in cell on mounted page
[ https://issues.apache.org/jira/browse/WICKET-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522874 ]
Matej Knopp commented on WICKET-734:
------------------------------------
You need to make your link not stateless.
protected boolean getStatelessHint() {
return false;
}
> 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
> Fix For: 1.3.0-beta4
>
> Attachments: WicketLinkLabelTest.zip
>
>
> 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.