Hi
Our domain classes are generated/compiled at startup time to support client
data model. These are simple pojos with getters and setters for each property.
The class is definitely available because
content.domain.startDate, content.domain.getStartDate(),
content.domain[‘startDate’] all work, in addition to that you can see from the
error msg that ognl must know about the class because it has put the fully
qualified class name com.algorithmics.opvantage.model.domain.Event in there.
Issue only arises when a page property is used for the propertyName.
I’ve done some extra testing today and have found that it has something to do
with the fact that the classes are generated because I created a simple domain
object class and included it in the project jars. If I do this then all 4 ognl
statements work.
Any advice would be appreciated.
Regards
Howard
On Tue, 12 May 2009 16:49:57 GMT, <[email protected]> wrote:
>
>It would be helpful to see the Domain class. Perhaps there's an
>overloaded method that's confusing the OGNL code. As you can see, it's
>trying to generate bytecode for your expression, but failing for some
>reason. Classloader issues can get very tricky inside this kind of
>code.
On Tue, May 12, 2009 at 8:12 AM, <[email protected]> wrote:
>
> Hi
> Ognl in 4.1.6 is behaving rather strangely(I believe this must be a bug)!
> We're trying
to upgrade from 4.0.2.
> Here's a simplified version of what's happening in an insert component.
> value="ognl:content.domain['startDate']"
renders correctly however value="ognl:content.domain[sharedPickerProperty]"
where sharedPickerProperty
is a property of the page and has initial-value="literal:startDate" results in
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler]
> context=/opvantage - Error
generating OGNL getter for expression content.domain[sharedPickerProperty] with
root $domainbase...@3c1[edit:Event]
and body:
> { return
> ((com.algorithmics.opvantage.model.domain.Event)(($DomainBase_42)$2).getContent().getDomain()).getStartDate();}
> org.apache.hivemind.ApplicationRuntimeException: Unable to add method
> java.lang.Object
get(ognl.OgnlContext, java.lang.Object) to class $ASTChain_121354aa5aa: [source
error] no
such class: com.algorithmics.opvantage.model.domain.Event
>
> Now obviously com.algorithmics.opvantage.model.domain.Event does exist
> because content.domain['startDate']
works!
> How can we get around this because in a dynamic application like ours we
> don't have the
luxury of doing content.domain.startDate/content.domain['startDate'] because we
don't know
what the property name is at .page creation.
> Any help would be greatly appreciated.
> Thanks in advance
> Howard
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary
> to Algorithmics
Incorporated and its affiliates ("Algorithmics"). If received in error, use is
prohibited.
Please destroy, and notify sender. Sender does not waive confidentiality or
privilege. Internet
communications cannot be guaranteed to be timely, secure, error or virus-free.
Algorithmics
does not accept liability for any errors or omissions. Any commitment intended
to bind Algorithmics
must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
Director of Open Source Technology at Formos
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary
to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received
in error, use is prohibited. Please destroy, and notify sender. Sender does not
waive confidentiality or privilege. Internet communications cannot be
guaranteed to be timely, secure, error or virus-free. Algorithmics does not
accept liability for any errors or omissions. Any commitment intended to bind
Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------