You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by nathan phillips <na...@hotmail.com> on 2003/03/17 18:01:14 UTC
A little Jelly help please
Hello Jelly users,
I'm hoping someone would be so kind as to answer a few questions I have in
regards to Jelly. I'm using commons-jelly-1.0-beta-3.
1) In the example below I'm having trouble getting the formatDate tag to
work. When my script runs the ${date} value gets set but the tag does not
get executed.
2) Compound AND conditions give me parsing errors although OR conditions
don't cause me any problem. For example, I can't get the commented
condition below to execute, anything with ampersands gives parsing errors.
<?xml version="1.0"?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:fmt="jelly:fmt"
xmlns:x="jelly:xml" xmlns:html="jelly:html">
<!-- testObject.value != null && testObject.value == 'Hello'-->
<j:if test="${testObject.value == 'Hello'}">
Test 1
</j:if>
<fmt:formatDate value="${date}" pattern="MM/dd/yyyy" />
<j:forEach items="${hobbies}" var="i">
${i}
</j:forEach>
</j:jelly>
Any insight would be greatly appreciated as I would really like to use Jelly
in my project. Thanks for the great work on this project everyone and any
help you may be able to give me.
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
Re: A little Jelly help please
Posted by Christian Sell <ch...@netcologne.de>.
> 2) Compound AND conditions give me parsing errors although OR
> conditions don't cause me any problem. For example, I can't get the
> commented condition below to execute, anything with ampersands gives
> parsing errors.
most likely you will have to use XML entity notation for the ampersands:
testObject.value != null && testObject.value == 'Hello'
thats life in XML.
>
>
> <?xml version="1.0"?>
> <j:jelly trim="false" xmlns:j="jelly:core" xmlns:fmt="jelly:fmt"
> xmlns:x="jelly:xml" xmlns:html="jelly:html">
>
> <!-- testObject.value != null && testObject.value == 'Hello'-->
> <j:if test="${testObject.value == 'Hello'}">
> Test 1
> </j:if>
>
> <fmt:formatDate value="${date}" pattern="MM/dd/yyyy" />
>
> <j:forEach items="${hobbies}" var="i">
> ${i}
> </j:forEach>
>
> </j:jelly>
>
> Any insight would be greatly appreciated as I would really like to use
> Jelly in my project. Thanks for the great work on this project everyone
> and any help you may be able to give me.
>
>
>
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
Re: A little Jelly help please
Posted by di...@multitask.com.au.
"nathan phillips" <na...@hotmail.com> wrote on 18/03/2003 04:01:14 AM:
> Hello Jelly users,
>
> I'm hoping someone would be so kind as to answer a few questions I have
in
> regards to Jelly. I'm using commons-jelly-1.0-beta-3.
>
> 1) In the example below I'm having trouble getting the formatDate tag
to
> work. When my script runs the ${date} value gets set but the tag does
not
> get executed.
I thought formatDate was post 1.0-beta4?
> 2) Compound AND conditions give me parsing errors although OR
conditions
> don't cause me any problem. For example, I can't get the commented
> condition below to execute, anything with ampersands gives parsing
errors.
It's XML....& is a special character. Try using 'and'.
> <?xml version="1.0"?>
> <j:jelly trim="false" xmlns:j="jelly:core" xmlns:fmt="jelly:fmt"
> xmlns:x="jelly:xml" xmlns:html="jelly:html">
>
> <!-- testObject.value != null && testObject.value == 'Hello'-->
> <j:if test="${testObject.value == 'Hello'}">
> Test 1
> </j:if>
>
> <fmt:formatDate value="${date}" pattern="MM/dd/yyyy" />
>
> <j:forEach items="${hobbies}" var="i">
> ${i}
> </j:forEach>
>
> </j:jelly>
>
> Any insight would be greatly appreciated as I would really like to use
Jelly
> in my project. Thanks for the great work on this project everyone and
any
> help you may be able to give me.
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au