Hmm. May have answered my own question, but I'm not sure why. The addition
of a line to set an interim variable, then test against that works. Like so:
<i:ask question="Which thing are you using: This, Other? (t,o) "/>
<log:warn>User typed: '${interact.answer}'</log:warn>
<j:set var="name" value="${interact.answer}"/>
<j:choose>
<j:when test="${name.equalsIgnoreCase('t')}">
<echo message="Using This"/>
</j:when>
<j:when test="${name.equalsIgnoreCase('o')}">
<echo message="Using Other"/>
</j:when>
<j:otherwise>
<echo message="None chosen"/>
</j:otherwise>
</j:choose>
The docs say that interact.answer is a variable. How is it different from
the name variable that I defined? Why does one work and not the other.
I also tried using the answer attribute in the ask tag. That works as well.
That is:
<i:ask question="Which thing are you using: This, Other? (t,o) "
answer="name"/>
instead of using set.
So, maybe the problem is the "two level" nature of interact.answer? If,
instead of "name", I use "choice.name", it doesn't work.
Anyway, moving on.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>