tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: RDC taglib technical question
Date Thu, 10 Nov 2005 22:04:53 GMT
On 11/10/05, Vance Vagell <> wrote:
> Hello,
> I notice that only the mortgage and creditCardInfo RDCs accept the
> "subdialog" attribute, which allows the developer to force the RDC to
> work as a subdialog (which includes a VoiceXML <return> element).
> However, the usState RDC does not.  It seems that only composite (i.e.
> non-atomic) RDCs include this attribute.

True, I'll add that to my TODO list -- needs an afternoon of work on
my part -- I'll take a stab at adding the subdialog functionality to
atomic RDCs over this weekend. Will ping this thread when its in

> How can I call the usState RDC
> and force it to work as a subdialog?  I am attempting to wrap it for use
> in another application, so it needs to be called as a subdialog and then
> return back.

Having said that, the subdialog functionality is fairly easy to
emulate externally (with respect to the dialog component) if the RDC
returns a String (which usState does, so the following solution is
applicable to this particular usecase). Here is the snippet (...
stands for other tag attributes as necessary):

<rdc:task ... >

     <!-- The usState RDC that you need to call as a subdialog -->
     <rdc:usState id="state" ... />

     <c:if test="${not empty state}">
       <!-- When done, grab the value and return to caller -->
         <var name="state" expr="'${state}'"/>
         <return namelist="state"/>


In the parent dialog (the app thats calling the above JSP as a
subdialog), you can retrieve the two letter US state abbreviation by
calling getValue() on the deserialized ECMAScript object, like so:

<!-- src attribute points to JSP hosting above snippet -->
<subdialog name="stateSubdialog" src="...">
        <script src="${pageContext.request.contextPath}/.grammar/return.js"/>
        <!-- deserialize -->
        <var name="stateVal"
         <!-- call getValue() to obtain two letter US state abbreviation -->
          The state is <value expr="stateVal.getValue()"/>

Please let me know if you have other questions,

> It is called just fine now, I go through the prompting and confirmation,
> but control is never returned to the calling app.
> Thanks for your help,
> Vance

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message