the idea with the panel was that you dont have to repeat the code below for
every time you have a bookmarkable page link with an img inside :)

-igor


On 12/19/06, Konstantin <[EMAIL PROTECTED]> wrote:


Panel is too complicated for my needs. Used this:

        BookmarkablePageLink bpLink= new
BookmarkablePageLink("wicketbpLinkidhere", MyCustomClassHere.class);
        add(bpLink);

        bpLink.add(new WebComponent("wicketimgidhere") {
            protected void onComponentTag(ComponentTag componentTag) {
                checkComponentTag(componentTag, "img"); <---- is it
excessive here ?
                componentTag.put("src",
"mycustomresourcefolderintherootofwebapp/myimage.gif");
            }
        });



igor.vaynberg wrote:
>
> class bookmarkablepageimglink extends panel {
>    public bookmarkablepageimglink(string id, class page, string image) {
>        super(id);
>        setrenderbodyonly(true);
>        bookmarkablepagelink link=new bookmarkablepagelink(page);
>        add(link);
>        link.add(new staticimage("img", new model(image));
>     }
> }
>
> bookmarkablepageimglink.html
> <wicket:panel>
>  #
> </wicket:panel>
>
> then in your code
>
> add(new bookmarkablepageimglink("mylink", mypage.class, "foo.gif"));
>
> and in html
>
>  # my image link
>
> -igor
>
>
> On 12/19/06, Konstantin <[EMAIL PROTECTED]> wrote:
>>
>>
>> I don't quite understand how panel helps me here...
>> I have nested tag and when I try to
>> add(new BookmarkablePageLink("awicketid").add(new
Image("imgwicketid")))
>> I
>> get "WicketMessage: Unable to find component with id 'imgwicketid' in
>> [MarkupContainer [Component id = awicketid ..."
>>
>> what is wrong here, can you point it out ?
>>
>> How can I handle nested tags ?
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > noep, this is not how component oriented frameworks work. in wicket a
>> > component is attached to a markup tag.
>> >
>> > since  #  foo   is two tags then you need two
>> > components
>> >
>> > however, the nice thing about component oriented frameworks is that
you
>> > can
>> > composite components
>> >
>> > so you can make a panel that houses a bookmarkablepagelink and an img
>> > component, and then its use within your code would be like what you
>> > described
>> >
>> > -igor
>> >
>> >
>> > On 12/19/06, Konstantin <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > where would you put the code that changes the src attr?
>> >> >
>> >> > -igor
>> >> >
>> >> > it is my question :-)
>> >> > I thought of something like:
>> >> > add(new BookmarkablePageLink("mapFindLink",
>> >> > MapFindPage.class).componentInternals("img tag full string
here"));
>> >> >
>> >> >
>> >> > On 12/19/06, Konstantin <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> HTML:
>> >> >>
>> >> >> #
>> >> >> imgs/map_find.gif
>> >> >>
>> >> >> Code:
>> >> >>         add(new BookmarkablePageLink("mapFindLink",
>> MapFindPage.class
>> >> ));
>> >> >>
>> >> >>
>> >> >> Now I need to change src of img. Can I do that without boring
>> >> >> WebMarkupContainer and add(new Image().add(new
>> >> SimpleAttributeModifier())
>> >> >> in
>> >> >> constructor of that ?
>> >> >>
>> >> >> Wicket 1.2.
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>>
http://www.nabble.com/Can-I-hangle-some-html-without-WebMarkupContainer-tf2846969.html#a7950328
>> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >>
>>
-------------------------------------------------------------------------
>> >> >> 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
>> >> >> Wicket-user@lists.sourceforge.net
>> >> >> 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
>> >> > Wicket-user@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>>
http://www.nabble.com/Can-I-handle-some-html-without-WebMarkupContainer-tf2846969.html#a7950433
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>>
-------------------------------------------------------------------------
>> >> 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
>> >> Wicket-user@lists.sourceforge.net
>> >> 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
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/Can-I-handle-some-html-without-WebMarkupContainer-tf2846969.html#a7951949
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
-------------------------------------------------------------------------
>> 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
>> Wicket-user@lists.sourceforge.net
>> 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
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context:
http://www.nabble.com/Can-I-handle-some-html-without-WebMarkupContainer-tf2846969.html#a7955312
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to