How to get setVariable value back [message #8018] |
Wed, 28 March 2007 14:46 |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
Using the setVariable seems to comes out blank when used later on.
I guessing its the way Im reading it back (using {} maybe).
Example Jet is below:
<c:setVariable var="className" select="HelloClass"/>
private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
|
|
|
Re: How to get setVariable value back [message #8141 is a reply to message #8018] |
Thu, 29 March 2007 04:07 |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
It seem a bit **** but I got this to work by doing:-
<c:addTextElement select="$node" name="nodeType"
var="nodeTypeText">HelloClass</c:addTextElement>
<c:get select="$nodeTypeText"/>
There is probably a better way so let me know if you find it.
On a slight follow on:-
I then did
private <java:import><c:get select="$nodeTypeText"/></java:import>
Which doesn't resolve the variable before the input statement (anyway that
is what I found) so I just went back to my BIG choose when statement I first
used before trying to be clever.
"Stu" <evaandoli@dodo.com.au> wrote in message
news:eudv42$v0c$1@utils.eclipse.org...
> Using the setVariable seems to comes out blank when used later on.
>
> I guessing its the way Im reading it back (using {} maybe).
>
> Example Jet is below:
>
> <c:setVariable var="className" select="HelloClass"/>
>
> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>
>
>
>
>
|
|
|
|
Re: How to get setVariable value back [message #8392 is a reply to message #8330] |
Thu, 29 March 2007 13:59 |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
I had tried the <c:get /> :-
<c:setVariable var="className" select="HelloClass"/>
private <c:get select="$className"/>;
But get the following error:
templates/dump.jet(4,9): <c:get select="$className">
Error: XPath expression returned no result
Stuart
"Paul Elder" <pelder@ca.ibm.com> wrote in message
news:eugdb5$6rq$1@build.eclipse.org...
> Try:
>
> private <c:get select="$className"/> <c:get
> select="lowercaseFirst($node/@tag)" />;
>
> Dynamic XPath expression {$className} only work within attributes of an
> JET tag (since you can't but a tag with in a tag).
>
> I am considering doing something like:
>
> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>
> But I don't think I can safely use { and } as delimiters - they appear too
> often in static text.
>
> My favourite alternative at this point is:
>
> private {{$className}} <c:get select="lowercaseFirst($node/@tag)" />;
>
> I don't think I'll get it in for this release, though. I have submitted a
> bugzilla on the idea
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=179978). Feel free to add
> your comments.
>
> Paul
>
> "Stu" <evaandoli@dodo.com.au> wrote in message
> news:eudv42$v0c$1@utils.eclipse.org...
>> Using the setVariable seems to comes out blank when used later on.
>>
>> I guessing its the way Im reading it back (using {} maybe).
>>
>> Example Jet is below:
>>
>> <c:setVariable var="className" select="HelloClass"/>
>>
>> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>>
>>
>>
>>
>>
>
>
|
|
|
Re: How to get setVariable value back [message #8483 is a reply to message #8392] |
Fri, 30 March 2007 07:35 |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
It also doesn;t work for choose statements so I assume a bug is in the
setVariable when its a containt.
This is a real hassle :-)
<c:setVariable var="returnedRuleType" select="String"/>
<c:choose>
<c:when test="$returnedRuleType='String'">
<c:log>We have a String</c:log>
</c:when>
</c:choose>
"Stu" <evaandoli@dodo.com.au> wrote in message
news:euggo6$vdf$1@build.eclipse.org...
>I had tried the <c:get /> :-
> <c:setVariable var="className" select="HelloClass"/>
>
> private <c:get select="$className"/>;
>
> But get the following error:
>
> templates/dump.jet(4,9): <c:get select="$className">
>
> Error: XPath expression returned no result
>
> Stuart
>
> "Paul Elder" <pelder@ca.ibm.com> wrote in message
> news:eugdb5$6rq$1@build.eclipse.org...
>> Try:
>>
>> private <c:get select="$className"/> <c:get
>> select="lowercaseFirst($node/@tag)" />;
>>
>> Dynamic XPath expression {$className} only work within attributes of an
>> JET tag (since you can't but a tag with in a tag).
>>
>> I am considering doing something like:
>>
>> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>>
>> But I don't think I can safely use { and } as delimiters - they appear
>> too often in static text.
>>
>> My favourite alternative at this point is:
>>
>> private {{$className}} <c:get select="lowercaseFirst($node/@tag)" />;
>>
>> I don't think I'll get it in for this release, though. I have submitted a
>> bugzilla on the idea
>> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=179978). Feel free to add
>> your comments.
>>
>> Paul
>>
>> "Stu" <evaandoli@dodo.com.au> wrote in message
>> news:eudv42$v0c$1@utils.eclipse.org...
>>> Using the setVariable seems to comes out blank when used later on.
>>>
>>> I guessing its the way Im reading it back (using {} maybe).
>>>
>>> Example Jet is below:
>>>
>>> <c:setVariable var="className" select="HelloClass"/>
>>>
>>> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
|
|
|
Re: How to get setVariable value back [message #8513 is a reply to message #8483] |
Fri, 30 March 2007 09:25 |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
A quick work around for this is:-
<c:addTextElement select="$expression" name="string"
var="stringText">String</c:addTextElement>
<c:setVariable var="returnedRuleType" select="$stringText"/>
<c:removeElement select="$expression/string"/>
Off to get the headache tablets.
"Stu" <evaandoli@dodo.com.au> wrote in message
news:euieki$mae$1@build.eclipse.org...
> It also doesn;t work for choose statements so I assume a bug is in the
> setVariable when its a containt.
> This is a real hassle :-)
>
> <c:setVariable var="returnedRuleType" select="String"/>
>
> <c:choose>
>
> <c:when test="$returnedRuleType='String'">
>
> <c:log>We have a String</c:log>
>
> </c:when>
>
> </c:choose>
>
>
> "Stu" <evaandoli@dodo.com.au> wrote in message
> news:euggo6$vdf$1@build.eclipse.org...
>>I had tried the <c:get /> :-
>> <c:setVariable var="className" select="HelloClass"/>
>>
>> private <c:get select="$className"/>;
>>
>> But get the following error:
>>
>> templates/dump.jet(4,9): <c:get select="$className">
>>
>> Error: XPath expression returned no result
>>
>> Stuart
>>
>> "Paul Elder" <pelder@ca.ibm.com> wrote in message
>> news:eugdb5$6rq$1@build.eclipse.org...
>>> Try:
>>>
>>> private <c:get select="$className"/> <c:get
>>> select="lowercaseFirst($node/@tag)" />;
>>>
>>> Dynamic XPath expression {$className} only work within attributes of an
>>> JET tag (since you can't but a tag with in a tag).
>>>
>>> I am considering doing something like:
>>>
>>> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>>>
>>> But I don't think I can safely use { and } as delimiters - they appear
>>> too often in static text.
>>>
>>> My favourite alternative at this point is:
>>>
>>> private {{$className}} <c:get select="lowercaseFirst($node/@tag)" />;
>>>
>>> I don't think I'll get it in for this release, though. I have submitted
>>> a bugzilla on the idea
>>> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=179978). Feel free to add
>>> your comments.
>>>
>>> Paul
>>>
>>> "Stu" <evaandoli@dodo.com.au> wrote in message
>>> news:eudv42$v0c$1@utils.eclipse.org...
>>>> Using the setVariable seems to comes out blank when used later on.
>>>>
>>>> I guessing its the way Im reading it back (using {} maybe).
>>>>
>>>> Example Jet is below:
>>>>
>>>> <c:setVariable var="className" select="HelloClass"/>
>>>>
>>>> private {$className} <c:get select="lowercaseFirst($node/@tag)" />;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04514 seconds