If you write the following, myVar wil be a collection of dom nodes:
<jx:set var="myVar">test</jx:set>
${myVar.getClass().getName()} -> [Lorg.w3c.dom.Node
To get the text value you should write:
${myVar[0].nodeValue} -> test
--
Danny
> -----Original Message-----
> From: Kamal Bhatt [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 10 maart 2006 2:33
> To: [email protected]
> Subject: Re: jx templates and syntax
>
>
>
> Simone Gianni wrote:
>
> > Hi Kamal,
> > dunno why, nut i always have problems like this in jx. Seems like a
> > variable declared with :
> >
> > <jx:set var="varname">Content</jx:set>
> >
> > Takes as value a document fragment, and thus should be converted to
> > string or something else to be used "normally".
> >
> Really? I found the opposite to be true, at least when I printed
> the value.
>
> > I usually declare the variable with :
> >
> > <jx:set var="varname" value="${whatever.you.need}"/>
> >
> > And this (again, usually) works in the expected way.
> >
> > Hope this helps,
> > Simone
> >
> > Kamal Bhatt wrote:
> >
> >>
> >> Hi.
> >> I was wondering, if this is a bug and if it is, has been fixed in
> >> 2.1.8 (I am currently on 2.1.7 and do not have access to 2.1.8):
> >>
> >> If I create a variable with value of a field eg.
> >>
> >> <jx:set var="active_repeater"><jx:out
> >> value="${form.getChild('active_repeater').getValue()}"/></jx:set>
> >>
> >> then I reference it in an if eg.
> >>
> >> <jx:if test="${active_repeater == 'validity'}">
> >> ...
> >>
> >> I do not enter the code inside of the if but if I change it to this:
> >> <jx:if test="${form.getChild('active_repeater').getValue() ==
> >> 'validity'}">
> >>
> >> it works fine.
> >>
> >> Also, while we are on the topic of jx templates, why are they so
> >> inconsisten with the way we do things in XSLT and XML based
> "languages".
> >>
> >> Cheers.
> >>
>
> --
> Kamal Bhatt
>
> Tourism Technology Pty Ltd
>
>
> T: +61 (02) 9956 7300
> F: +61 (02) 9956 7411
>
>
> Level 10, 1 Pacific Highway, North Sydney, NSW 2060
>
>
> http://www.tt.com.au
>
>
> --
> Disclaimer: This email is confidential and may contain privileged
> information for the sole use of the person or business to which
> it is addressed. If you are not the intended recipient, please
> notify the sender by return e-mail or phone as you must not view,
> disseminate, distribute or copy this email without our consent.
> We do not accept any liability in connection with any computer
> virus, data corruption, incompleteness, or unauthorised amendment
> of this email. It is the sole responsibility of the receiver to
> scan for viruses before opening.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]