On Sat, May 23, 2009 at 2:08 PM, Luther Baker <[email protected]> wrote: > I typically write this out longhand (is that bad or unpopular) for ez > debugging): > > add(new Label("quote", new ResourceModel("default-quote"))); > > would often be: > > IModel<String> model = new ResourceModel("default-quote"))); > Label label = new Label("quote", model); > add(label); > > My question is, am I correct to assume that a ResourceModel is an > IModel<String>? I think that is what the source has but typing my > application based on what the black box library uses today seems like a bad > practice. I'm afraid to rely on this -- since, the source could change ... ? > False alarm? Am I misunderstanding something maybe?
Check the javadocs: http://wicket.apache.org/docs/1.4/org/apache/wicket/model/ResourceModel.html ResourceModel extends AbstractReadOnlyModel<String>. Sine resource strings are, in fact, Strings, I wouldn't foresee that changing. I think you're safe. I'm using it in my code, so if you're not, I'm screwed too! :) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
