You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gerald Fernando <ge...@gmail.com> on 2009/08/26 12:00:40 UTC
How to use link
Hello Friends,
this is my code
add(new ListView("people", p.writeNews("arts"))
{
@Override protected void populateItem(ListItem item)
{
RSSReader person = (RSSReader)item.getModelObject();
item.add(new Label("title", person.title)); - title
item.add(new Label("link", person.link));
corresponding web Address of title
item.add(new Label("description", person.description));
description
}
When i click title that shows that web Page
how to do it
--
Thanks®ards,
Gerald A
Re: How to use link
Posted by Gerald Fernando <ge...@gmail.com>.
Thankk you robin
i have used external link that is working fine
Thanks&Regards,
Gerald A
On Wed, Aug 26, 2009 at 7:52 PM, Robin Sander <ro...@gmx.net> wrote:
>
> You have to add a Link instance to the item, for example
>
> item.add(new BookmarkablePageLink<Void>("link", TargetPage.class);
>
> If you want to have a label inside the link add the label to the link
> instead of the item
> and use a markup like:
>
> <a href="#" wicket:id="link"><span wicket:id="title">name</span></a>
>
>
>
>
> On 26.08.2009, at 12:00, Gerald Fernando wrote:
>
> Hello Friends,
>> this is my code
>>
>> add(new ListView("people", p.writeNews("arts"))
>> {
>> @Override protected void populateItem(ListItem item)
>> {
>> RSSReader person = (RSSReader)item.getModelObject();
>>
>> item.add(new Label("title", person.title)); - title
>>
>> item.add(new Label("link", person.link));
>> corresponding web Address of title
>> item.add(new Label("description", person.description));
>> description
>> }
>>
>> When i click title that shows that web Page
>>
>> how to do it
>>
>>
>> --
>> Thanks®ards,
>> Gerald A
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Thanks®ards,
Gerald A
Re: How to use link
Posted by Robin Sander <ro...@gmx.net>.
You have to add a Link instance to the item, for example
item.add(new BookmarkablePageLink<Void>("link", TargetPage.class);
If you want to have a label inside the link add the label to the link
instead of the item
and use a markup like:
<a href="#" wicket:id="link"><span wicket:id="title">name</span></a>
On 26.08.2009, at 12:00, Gerald Fernando wrote:
> Hello Friends,
> this is my code
>
> add(new ListView("people", p.writeNews("arts"))
> {
> @Override protected void populateItem(ListItem item)
> {
> RSSReader person = (RSSReader)item.getModelObject();
>
> item.add(new Label("title", person.title)); -
> title
>
> item.add(new Label("link", person.link));
> corresponding web Address of title
> item.add(new Label("description",
> person.description));
> description
> }
>
> When i click title that shows that web Page
>
> how to do it
>
>
> --
> Thanks®ards,
> Gerald A
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org