Re: Generating markup from Wicket

2012-09-14 Thread Sven Meier

Here's the sample code:







IModel strings = ...;
 
add(new ListView("strings", strings)) {

  protected void populateItem(ListItem item) {
item.add(new Label("string", item.getModel()));
  }
};

Not too much code for an always up-to-date rendered list with clean separation 
of markup and code.

Sven


On 09/14/2012 02:55 PM, jam.ntk wrote:

Thanks, I think i can achieve this simply by adding mark up tags in the
wicket code.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generating-markup-from-Wicket-tp4652003p4652005.html
Sent from the Users forum 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



Re: Generating markup from Wicket

2012-09-14 Thread jam.ntk
Thanks, I think i can achieve this simply by adding mark up tags in the
wicket code.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generating-markup-from-Wicket-tp4652003p4652005.html
Sent from the Users forum 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



Re: Generating markup from Wicket

2012-09-14 Thread vineet semwal
use a repeater

On Fri, Sep 14, 2012 at 5:34 PM, jam.ntk  wrote:
> Hi - I have data strings coming from database e.g. ABC, 123, DEF,456. Now I
> am creating a MultilineLabel to hold the string with new line characters to
> diplay on the page with line breaks. It is working fine but I want to
> display them as mark up list items as it would display with the following
> mark up. Can you please suggest how i can do this in Wicket code as my model
> is being created in wicket? Do I need to use WebMarkupContainer instead of
> MultiLineLabel?
>
> 
> ABC
> 123
> DEF
> 456
> 
>
> dbLabelText = ABC.append("\n").123..
> add(new MultiLineLabel("label", dbLabelText));
>
> Please give an example.
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Generating-markup-from-Wicket-tp4652003.html
> Sent from the Users forum 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
>



-- 
regards,

Vineet Semwal

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



Generating markup from Wicket

2012-09-14 Thread jam.ntk
Hi - I have data strings coming from database e.g. ABC, 123, DEF,456. Now I
am creating a MultilineLabel to hold the string with new line characters to
diplay on the page with line breaks. It is working fine but I want to
display them as mark up list items as it would display with the following
mark up. Can you please suggest how i can do this in Wicket code as my model
is being created in wicket? Do I need to use WebMarkupContainer instead of
MultiLineLabel?


ABC
123
DEF
456


dbLabelText = ABC.append("\n").123..
add(new MultiLineLabel("label", dbLabelText));

Please give an example.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generating-markup-from-Wicket-tp4652003.html
Sent from the Users forum 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