Thks.

Can I also use Model to define HTML section containing regular HTML with
wicket id ?

<table>
<td><tr><tr><tr></td>
<td wicket id="">
....

Additional question : in this case, where content is define dynamically,
which java class will trigger the wicket tags ?
 

Stefan Lindner wrote:
> 
> Several Ways to to this. The easiest way for your example
> 
> 
> HTML:
> <H2><H2/>
> 
> In Java
> Model<String> contentModel = new Model<String("");
> add(new Label("content", contentModel));
> if (user=='admin'=
>    contenModel.setObject("Admin part");
> else if (user == 'anonymous')
>    contenModel.setObject("Anonymous part");
> 
> 
> 
> 
> 
> Or in JAVA
> if (user=='admin'=
>    add(new Label("content", ("Admin part"));
> else if (user == 'anonymous')
>    add(new Label("content", ("Anonymous part"));
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: cmoulliard [mailto:cmoulli...@gmail.com] 
> Gesendet: Montag, 2. Februar 2009 11:10
> An: users@wicket.apache.org
> Betreff: How to personalise HTML content with Wicket ?
> 
> 
> Hi,
> 
> I would like to know how we can personalize the content with Wicket ?
> 
> With framework like Struts, ... it is possible in a JSP page to display
> different HTML contents (let's say personalize content) according to
> conditions (e.g. profile user, ...).
> 
> if (user == 'admin')
> 
> <H2>Admin part<H2/>
> 
> if ( user == 'anonymous')
> 
> <H2>Anonymous part</H2>
> 
> Regards,
> 
> Charles
> 
> 
> 
> 
> -----
> Charles Moulliard
> SOA Architect
> 
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
> -- 
> View this message in context:
> http://www.nabble.com/How-to-personalise-HTML-content-with-Wicket---tp21787067p21787067.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/How-to-personalise-HTML-content-with-Wicket---tp21787067p21787287.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to