[
https://issues.apache.org/jira/browse/WICKET-734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Compagner closed WICKET-734.
----------------------------------
Resolution: Fixed
I tried to fix this.
It still will give you exceptions if you rendered the repeater 2 times (so
first clicked on a another link)
Becaues then stateless won't really work because the repeater then genenerates
items with an index greater then the first time
and those can't really be generated.
I did improve the error.
> 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
> Assignee: Johan Compagner
> Priority: Minor
> Fix For: 1.3.0-beta5
>
> 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.