Perfect. Thank you very much.
2007/2/22, Marc-Andre Houle <[EMAIL PROTECTED]>:
<a href="ShowCategory.html" wicket:id="NameLink"><span
wicket:id="name">Category name</span></a>
Page link lnk = new PageLink("NameLink", new ShowCategory(category))
lnk.add(new Label("name", category.getName()));
item.add(lnk);
On 2/22/07, Juan Asensio Sánchez < [EMAIL PROTECTED]> wrote:
> Hi
>
> I am tryiung to display a listview, where it must substitute the name of
> the page and a link for that page:
>
> HTML:
> <ul wicket:id="CategoryList">
> <li><span wicket:id="id">CategoryID</span>: <span
> wicket:id="name">
> <a href="ShowCategory.html"
> wicket:id="NameLink">CategoryName</a></span>,
> <span wicket:id="description">CategoryDescription</span></li>
> </ul>
>
> Java:
> add(new ListView("CategoryList", subcategories) {
> protected void populateItem(ListItem item) {
> Category category = (Category) item.getModelObject ();
> item.add(new Label("id", category.getId().toString()));
> item.add(new Label("name", category.getName()));
> item.add(new Label("description",
> category.getDescription()));
> item.add(new PageLink("NameLink", new
> ShowCategory(category)));
> }
> });
>
> But i get this error:
> WicketMessage: Expected close tag for '<span wicket:id="name">' Possible
> attempt to embed component(s) '<a href=" ShowCategory.html"
> wicket:id="NameLink">' in the body of this component which discards its body
> [markup = file:/D:/Java/Wicketiki/build/web/WEB-INF/html/ShowCategory.html,
> index = 15, current = '<a href=" ShowCategory.html"
> wicket:id="NameLink">' (line 19, column 5)]
>
> I understand the error, but how can i do what i want?
>
> Thanks in advance.
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user