cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel McOrmond <dmcorm...@gmail.com>
Subject Re: eval function does not work
Date Thu, 24 Mar 2005 17:25:11 GMT
Hi Baskar,

That seems odd. What version of Cocoon are you using?

Try breaking things down to an easier level, and see if you can
isolate where the problem is. It sounds like you might have too many
quotes around your expression. So for example, try calling:

eval( '"temp" + cocoon.session.getAttribute("object").getId()' );

..and see if that works. Even better, just try an eval( '1+2' ) and
see what you get.

HTH,

-Daniel


On Thu, 24 Mar 2005 22:24:15 +0530, baskar.ganesh@wipro.com
<baskar.ganesh@wipro.com> wrote:
> 
> Hi Daniel,
> 
> Thanks for your reply.
> 
> The following is the code snippet I am using
> 
> Var defaultExpression = testMethod.getdefaultExpression();
> 
> The function testMethod.getdefaultExpression() returns you an expression
> like "temp" + cocoon.session.getAttribute("object").getId()
> 
> var expression = eval(defaultExpression);
> 
> If we print the expression we are getting as " "temp" +
> cocoon.session.getAttribute("object").getId()"
> 
> Regards,
> Baskar.

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


Mime
View raw message