On 22. Mär 2006 - 01:12:03, Kent Tong wrote:
| Everything ognl expression has a "context object". For example, if you
| write "modelSource" in your .page file, the context object is the
| page object so "modelSource" means calling getModelSource() on the
| page object. To access this context object
Andreas Bulling phoenix.hadiko.de> writes:
> | http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/varref.html
>
> OK, and #root is provied by Tapestry?
Everything ognl expression has a "context object". For example, if you
write "modelSource" in your .page file, the context object is th
|
It works, now. I didn't see the "get" in front of UserModel,
sorry for not reading your post as carefully as needed ;)
Thanks for your help!
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-m
| http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/varref.html
OK, and #root is provied by Tapestry?
| Probably you don't have the getter or setter. Anyway, why not just
| pass the Messages collection to ModelSource?
|
|
|
| IPropertySelectionModel getUserModel(Messages messages
Andreas Bulling phoenix.hadiko.de> writes:
> Well, what's the magic behind this [#root] thing/where can I find
> a reference mentioning it?
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/varref.html
> I tried that but I get the error message:
>
> Unable to read OGNL expression ''
| Try:
|
|
|
| where #root means your page object. Make sure you have both getter and
| setter for the userModel.
Well, what's the magic behind this [#root] thing/where can I find
a reference mentioning it? I tried that but I get the error
message:
Unable to read OGNL expression '' of [EM
Andreas Bulling phoenix.hadiko.de> writes:
> Well, but the problem is, that the propertySelectionModel is
> referenced directly in the .page file like this:
>
>
>
>
>
Try:
where #root means your page object. Make sure you have both getter and
setter for the userModel.
Hi Kent,
thanks for your answer!
| 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");
| ...
|
Andreas Bulling 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 acc