Peter Dotchev wrote:
> 
> I'd like to use the same value in several places of a page, e.g. two
> labels with same content.
> Let's say I want to substitute the same property using
> CompoundPropertyModel.
> 

Try:

public class Home extends WebPage {
        private String l1 = "abc";

        public Home() {
                setModel(new CompoundPropertyModel(this));
                Label l1 = new Label("l1");
                add(l1);
                Label l2 = new Label("l2", l1.getModel());
                add(l2);
        }
}
-- 
View this message in context: 
http://www.nabble.com/substitute-same-value-in-several-places-tf4530268.html#a12951473
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to