[EMAIL PROTECTED] wrote:

<snip />
flowscript:

function works() {
 someValue = "correctTest";

 CorrectClass obj = new Packages.mypackage.CorrectClass();
 obj.setValue(someValue);
 print("correct class: " + obj.getFormattedValue()) -> correctTest

 var viewdata = {obj : obj};
 cocoon.sendPage("myTemplate", viewdata); -> <p>correctTest</p>
}

function doesNotWork() {
 someValue = "correctTest";

 FaultyClass obj2 = new Packages.mypackage.FaultyClass();
 obj2.setValue(someValue);
 print("faulty class: " + obj.getFormattedValue()) -> correctTest}
^^^
This might not be the problem, but your FaultyClass could be faulty if you used cut'n'paste from your actual code. The line above uses obj.getFormattedValue() and not obj2.getFormattedValue() which could give the illusion that your FaultyClass is correct even if it isn't, if obj is global.


Regards,
 Niklas

 var viewdata = {obj : obj2};
 cocoon.sendPage("myTemplate", viewdata); -> <p></p>
}

Anyone?

Thanks.

Bye,

Helma van der Linden

Reply via email to