Override properties in Fragments?

2009-05-13 Thread Kaspar Fischer

How can one override properties in Fragments?

Given a component:

  divwicket:message key=foo//div

which I instantiate twice, say, in

  div wicket:id=c1 /
  wicket:fragment id=fragment
div wicket:id=c2 /
  /wicket:fragment/

I can override c1's property foo via

  c1.foo=Bar

but neither c2.foo=Bar nor fragment.c2.foo=Bar work.

What is the property path to access c2's foo?

Kaspar

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



Re: Override properties in Fragments?

2009-05-13 Thread Jeremy Thomerson
Good questoin - I'm not sure how that works with wicket:message.  But
I suppose you could easily add a label to the fragment and control the
property key to your label easily

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 13, 2009 at 11:37 AM, Kaspar Fischer h...@rapsak.com wrote:
 How can one override properties in Fragments?

 Given a component:

  divwicket:message key=foo//div

 which I instantiate twice, say, in

  div wicket:id=c1 /
  wicket:fragment id=fragment
    div wicket:id=c2 /
  /wicket:fragment/

 I can override c1's property foo via

  c1.foo=Bar

 but neither c2.foo=Bar nor fragment.c2.foo=Bar work.

 What is the property path to access c2's foo?

 Kaspar

 -
 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: Override properties in Fragments?

2009-05-13 Thread Kaspar Fischer


On 13.05.2009, at 18:40, Jeremy Thomerson wrote:


Good questoin - I'm not sure how that works with wicket:message.  But
I suppose you could easily add a label to the fragment and control the
property key to your label easily


Programmatically, you mean, right? Using Component#getString() for  
instance.


I was curious whether there is a solution where that is not  
necessary...?



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



Re: Override properties in Fragments?

2009-05-13 Thread Jeremy Thomerson
not getString

new Label(label, new ResourceModel(yourkey));

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 13, 2009 at 4:16 PM, Kaspar Fischer h...@rapsak.com wrote:

 On 13.05.2009, at 18:40, Jeremy Thomerson wrote:

 Good questoin - I'm not sure how that works with wicket:message.  But
 I suppose you could easily add a label to the fragment and control the
 property key to your label easily

 Programmatically, you mean, right? Using Component#getString() for instance.

 I was curious whether there is a solution where that is not necessary...?


 -
 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