jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul P Akolkar <akol...@us.ibm.com>
Subject RE: RDC: grammar tags in the state component
Date Thu, 24 Feb 2005 17:44:14 GMT
> There's a small tricky twist to the "initial/grammar" problem: 
> Initial could be used with dynamic values.
> A solution to this issue is to allow the developer to provide
> a parametrized grammar:

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 

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.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message