[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-dev
Subject:    RE: RDC: grammar tags in the state component
From:       Rahul P Akolkar <akolkar () us ! ibm ! com>
Date:       2005-02-24 17:44:14
Message-ID: OFF155ED81.E3B734E1-ON85256FB2.005F50BC-85256FB2.00616F4A () us ! ibm ! com
[Download RAW message or body]

--=_alternative 00616F4685256FB2_=
Content-Type: text/plain; charset="US-ASCII"

<snip>
> There's a small tricky twist to the "initial/grammar" problem: 
> Initial could be used with dynamic values.
<snap>
> A solution to this issue is to allow the developer to provide
> a parametrized grammar:
<snip>

Its none more tricky than this:

<rdc:usState  id="homeState"  initial="${userBean.homeState}" 
initialGrammar="my home state,the state where I live" />

We didn't know the initial value till "run time" either. The EL expression 
might as well be one that gives you the value of another RDC [all RDCs 
return a page scoped variable to the host JSP when done, which contains 
the collected value. This variable gets its name from value of the ID 
attribute].

Notice that the initialGrammar in this case remains same irrespective of 
the initial value, and if you want to refer to "Dallas" as "Dallas" 
(instead of "my home town"), that utterance comes from the core grammar, 
not the satellite initial grammar.

-Rahul

--=_alternative 00616F4685256FB2_=--
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic