Why not use the ResourceModel that is available in Wicket 1.3?
http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/model/ResourceModel.html
Martijn
On Nov 27, 2007 8:49 AM, mraible <[EMAIL PROTECTED]> wrote:
>
> I'm trying to upgrade an application from 1.2.6 to 1.3.0-rc1. I've read
> the
> documentation, upgrade guide and mailing list archives. However, I don't
> seem to grasp how to upgrade the following class to 1.3.0:
>
> import org.apache.wicket.Component;
> import org.apache.wicket.model.AbstractReadOnlyModel;
>
> /**
> * A simple model that represents a resource by its key
> *
> * @author ivaynberg
> */
> public class ResourceModel extends AbstractReadOnlyModel {
> private String key;
>
> /**
> * Constructor
> *
> * @param key of the resource this model represents
> */
> public ResourceModel(String key) {
> this.key = key;
> }
>
> /**
> * @see wicket.model.AbstractReadOnlyModel#getObject(wicket.Component)
> */
> public Object getObject(Component component) {
> return component.getLocalizer().getString(key, component);
> }
> }
>
> Most of the documentation seems to indicate I don't need this class
> anymore.
> Is that true?
>
> Thanks,
>
> Matt
> --
> View this message in context:
> http://www.nabble.com/Upgrading-ResourceModel-to-1.3.0-rc1-tf4880269.html#a13966244
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/