Andreas Bulling <spam <at> phoenix.hadiko.de> writes:

> I have a class called "ModelSource" which returns several IPropertySelection
> models to be used in forms. One of these is a userModel which shall
> contain _localized_ entries defined in the application.properties file.
> The problem is: How can I access these localized entries in the
> non-page/non-component class "ModelSource"?
> getMessages().getMessage("user_type_0") doesnt work for sure :(

I think the best way is to pass the component to it when you need
to get a userModel:

class ModelSource {
  IPropertySelectionModel getUserModel(IComponent component) {
     ...
     component.getMessages().getMessage("user_type_0");
     ...
  }
}

--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)


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

Reply via email to