cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject REPOST: problem in introspection part of JXTemplate, please HELP!
Date Mon, 21 Jun 2004 18:30:54 GMT
Hi,

I hope someone can help out, because I'm stuck and I need this code to be
working before I can continue.

Problem:

I have two classes (simple class, not Avalong components), each with a
method 
public String getFormattedValue(), say GoodClass and FaultyClass.

In my JXTemplate I have:

<p>${obj.formattedValue}</p>

When I call the template with obj of GoodClass, the
GoodClass.getFormattedValue() is called and gives the proper return value.

When I call the template with obj of FaultyClass, nothing is called, so a
null is returned. 

When I change the template into <p>${obj}</p> I get a correct object address
for both classes.

When I add the following lines to the flowscript that calls this template I
also get the correct results:

var obj = new FaultyClass();
...
print(obj); <-- same address as in <p>${obj}</p>
print("obj.getFormattedValue: " + obj.getFormattedValue());

In a debugsession I noticed that the Introspector classes didn't find the
method for the FaultyClass.

Can somebody tell me what could be the cause?

Bye, Helma

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message