You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bruno Dumon <br...@outerthought.org> on 2004/04/24 12:53:37 UTC
JXTemplate macro problem (bug)
While using the template.jx macros for CForms I noticed that e.g.
widget-label isn't working. Looking at the difference between the
non-working macros and the working macros, it seemed like it had
something to do with the non-working ones only containing text. Adding a
dummy jx:set in those templates fixes the problem, for example:
doesn't work:
<jx:macro name="widget-label"
targetNamespace="http://apache.org/cocoon/forms/1.0#template">
<jx:parameter name="id"/>
${context_widget_.getWidget(id).unwrap().generateLabel(cocoon.consumer)}
</jx:macro>
works:
<jx:macro name="widget-label"
targetNamespace="http://apache.org/cocoon/forms/1.0#template">
<jx:parameter name="id"/>
<jx:set var="dummy" value=""/>
${context_widget_.getWidget(id).unwrap().generateLabel(cocoon.consumer)}
</jx:macro>
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
Re: JXTemplate macro problem (bug)
Posted by Bruno Dumon <br...@outerthought.org>.
On Sat, 2004-04-24 at 18:35, Christopher Oliver wrote:
> I've checked in a fix for this. The next event after a </jx:parameter>
> was being ignored. The bug was unnoticeable in many cases however
> because in such cases that event was just whitespace. Thanks for
> reporting the problem.
thanks for the quick fix!
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
Re: JXTemplate macro problem (bug)
Posted by Christopher Oliver <re...@verizon.net>.
I've checked in a fix for this. The next event after a </jx:parameter>
was being ignored. The bug was unnoticeable in many cases however
because in such cases that event was just whitespace. Thanks for
reporting the problem.
Chris
Bruno Dumon wrote:
>While using the template.jx macros for CForms I noticed that e.g.
>widget-label isn't working. Looking at the difference between the
>non-working macros and the working macros, it seemed like it had
>something to do with the non-working ones only containing text. Adding a
>dummy jx:set in those templates fixes the problem, for example:
>
>doesn't work:
>
><jx:macro name="widget-label"
>targetNamespace="http://apache.org/cocoon/forms/1.0#template">
><jx:parameter name="id"/>
>${context_widget_.getWidget(id).unwrap().generateLabel(cocoon.consumer)}
></jx:macro>
>
>works:
>
><jx:macro name="widget-label"
>targetNamespace="http://apache.org/cocoon/forms/1.0#template">
><jx:parameter name="id"/>
><jx:set var="dummy" value=""/>
>${context_widget_.getWidget(id).unwrap().generateLabel(cocoon.consumer)}
></jx:macro>
>
>
>