cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leszek Gawron (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1978) JXTemplate often fail a method call without giving any error
Date Fri, 05 Oct 2007 08:36:50 GMT

    [ https://issues.apache.org/jira/browse/COCOON-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532595
] 

Leszek Gawron commented on COCOON-1978:
---------------------------------------

looks like there is no way to fix this without invading Jexl source: http://thread.gmane.org/gmane.text.xml.cocoon.devel/75481

> JXTemplate often fail a method call without giving any error
> ------------------------------------------------------------
>
>                 Key: COCOON-1978
>                 URL: https://issues.apache.org/jira/browse/COCOON-1978
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Templating
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Simone Gianni
>            Assignee: Leszek Gawron
>
> When calling a method on an instance in JXTemplate, if that method does not exist (or
JX cannot find the proper method based on parameters), it fails without any error. IMO it
should raise an error, or at least should raise it in dev mode, because not having a debugger
it takes hours to figure out why it's not working.
> As an example, take a JX and try to call a method that does not exist :
> <jx:set var="any" value="${obj.getSomethingThatDoesNotExist(cocoon.request)}"/>
> Any will simply be null. Moreover, even if "any" is then used :
> ${any.getSomethingElse()}
> Again it will fail without any error, resulting simply in an empty string, making it
even harder.
> Being a non compiled language already makes it difficult to make sure calls are correct,
having this "silent fail" behavior makes it even harder, and if you add also the non typized
nature it can make it a nightmare.
> Anyway, I don't know if there is a way to fix this in cocoon or if it is a Jexl design
problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message