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