I have a problem migrating from Wicket 1.2.6 to 1.3
I have a custom LabelLink component that I used to generate links, including
labels, in a data table.
This worked fine in 1.2.6, but now I get the following error:
"unable to find component with path
forumBrowserForm:forums:rows:1:cells:1:cell:link on page"
When debugging I noticed the onLinkClicked was never called on my LabelLink.
Instead the page
constructor is called again.
Here is the LabelLink component:
http://papernapkin.org/pastebin/view/933
1. public abstract class LabelLink extends Label
2. implements ILinkListener
3. {
4.
5. protected LabelLink(final String id, String label)
6. {
7. super(id, label);
8. }
9.
10. protected LabelLink(final String id, IModel model)
11. {
12. super(id, model);
13. }
14.
15. protected void onComponentTag(final ComponentTag tag)
16. {
17. tag.setName("a");
18. tag.put("href", urlFor(ILinkListener.INTERFACE));
19. }
20.
21. protected void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
22. {
23. replaceComponentTagBody(markupStream, openTag,
getModelObjectAsString());
24. }
25.
26. public final void onLinkClicked()
27. {
28. onClick();
29. }
30.
31. public abstract void onClick();
32.
33. }
The LabelLink works fine on a page, but not when I use it inside a column of
a data table.
For example when I make a panel inside an AbstractColumn
When I try to put a panel in the column with a normal Link and Label it
works.
But when I put my LinkLabel in it it does not work.
The hrefs that are generated are different, and probably the cause that my
onLinkClicked is not called.
LabeLink href:
http://localhost:8080/ForumListPage/wicket:interface/%3A1%3AforumBrowserForm%3Aforums%3Arows%3A1%3Acells%3A1%3Acell%3Alink%3A%3AILinkListener%3A%3A
Link href:
http://localhost:8080/?wicket:interface=:1:forumBrowserForm:forums:rows:1:cells:1:cell:link2::ILinkListener
::
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user