Hi again,

I just re-read you message and maybe I missed your point a little.
Maybe what you need is your own component that creates the markup you
need for your control or frame. 
If you then replace a markup element in your html code, you can
basically do whatever you want:


Index.html
---------- 
<html>
[snip]
<span wicket:id="myDynamicComponent">This will be replaced by all kinds
of weird stuff</span>
[snip]
</html>


Index.java
----------
[snip]
add(new MyCoolComponent("myDynamicComponent", myModel));
[snip]


MyCoolComponent.java
--------------------
[snip]
        protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {
                replaceComponentTagBody(markupStream, openTag,
"<div><span>I can put all kinds of wicke(d/t) stuff here
</span></div>");
        }
[snip]

Well, I guess it depends what you want to achieve. Additionally, I am
quite new to wicket myself. I guess the guys around here possibly know a
much better way...

// Che




> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Che Schneider
> Sent: Tuesday, September 19, 2006 3:11 PM
> To: Ars; wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Dynamic changing of controls and 
> frames list
> 
> Hi Arseny,
> 
> One way is to markup your main template with wicket-tagged elements in
> all the places where you can possibly have a control or frame. Then in
> your business logic you replace that element either with nothing (an
> empty component) or the panel you would like to have in the place.
> 
> Example:
> 
> Index.html
> ----------
> 
> <html>
> [snip]
> <span wicket:id="navigation1">This is the first element</span>
> <span wicket:id="navigation2">This is the second element</span>
> [snip]
> </html>
> 
> 
> Index.java
> ----------
> 
> if(condition)
>       add(new NavigationPanel("navigation1", myModel));
> else 
>       add(new EmptyPanel("navigation1"));
> 
> if(anotherCondition)
>       add(new NavigationPanel("navigation2", myModel));
> else 
>       add(new EmptyPanel("navigation2"));
> 
> 
> This can be made more dynamic of course but you get the idea... :)
> 
> 
> // Che
> 
> 
> 
>  
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Ars
> > Sent: Tuesday, September 19, 2006 3:03 PM
> > To: wicket-user@lists.sourceforge.net
> > Subject: [Wicket-user] Dynamic changing of controls and frames list
> > 
> > Hello,
> >    The number and configuration of frames and
> >    controls on a page in my program is determined 
> > dynamically, depending on some business
> >    logic. Is there any way to accomplish it in Wicket with its
> >    static HTML templates?
> > -- 
> > Best regards,
> >  Arseny
> > 
> > 
> > --------------------------------------------------------------
> > -----------
> > 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
> > ______________________________
> > DISCLAIMER: This e-mail message is intended for the 
> > addressee(s) or authorized recipient only. If you are not the 
> > addressee, or an authorized recipient, you are specifically 
> > advised that any use, distribution, publication, copying or 
> > repetition of this information is prohibited. If you have 
> > received this information in error, please notify us 
> > immediately (+31 (0)20 50 25 800) and destroy this message.
> > 
> ______________________________
> DISCLAIMER: This e-mail message is intended for the 
> addressee(s) or authorized recipient only. If you are not the 
> addressee, or an authorized recipient, you are specifically 
> advised that any use, distribution, publication, copying or 
> repetition of this information is prohibited. If you have 
> received this information in error, please notify us 
> immediately (+31 (0)20 50 25 800) and destroy this message.
> 
> --------------------------------------------------------------
> -----------
> 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
> ______________________________
> DISCLAIMER: This e-mail message is intended for the 
> addressee(s) or authorized recipient only. If you are not the 
> addressee, or an authorized recipient, you are specifically 
> advised that any use, distribution, publication, copying or 
> repetition of this information is prohibited. If you have 
> received this information in error, please notify us 
> immediately (+31 (0)20 50 25 800) and destroy this message.
> 
______________________________
DISCLAIMER: This e-mail message is intended for the addressee(s) or authorized 
recipient only. If you are not the addressee, or an authorized recipient, you 
are specifically advised that any use, distribution, publication, copying or 
repetition of this information is prohibited. If you have received this 
information in error, please notify us immediately (+31 (0)20 50 25 800) and 
destroy this message.

-------------------------------------------------------------------------
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