tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: help with RDC
Date Tue, 07 Feb 2006 06:55:50 GMT
On 2/6/06, Easwaren, Shaivya (Cognizant) <Shaivya.Easwaren@cognizant.com> wrote:
>
> We are using RDC in a small project on Multimodal technologies and are testing with Opera
browser.
<snip/>

This is good stuff, and the next logical thing for RDCs. The RDC
framework, to date, has been used for pure voice applications.
However, if you are willing to try a couple of things, we should be
able to get the X+V example up and running pretty quickly. I hope to
install the multimodal toolkit on Opera soon (had it on the older box)
so I can play with this and possibly write up a recipe for the wiki
[1].


> After configuring the project to use RDC taglibs, we tested with the Hello World tag
which is working fine, but none of the other tags are working. Could someone show us how to
use RDC in a JSP page?
<snap/>

Get the rdc-examples.war [2] from the nightly build, it has numerous
examples. The tutorials [3] on the wiki have some explanations that
might help. Your usage below is correct, but will require adjustments
due to the fact that the application isn't voice only (more on that
below).


> Here is a sample page in our application that is saying "Hello World from Shaivya" and
then giving a VXML parsing error on the first line using the grammar file import. None of
the javascript imports are getting recognized either.
>
<snip/>

Can you quote the error? Did you define the GrammarServlet in the
web.xml? What happens if you try a static VoiceXML form using the RDC
grammar as the ev:handler instead of an RDC? (I will try this myself
in a few days)

Some other comment inlined in the JSP below:
 ______________________________________________________________________________________________
> <!DOCTYPE html PUBLIC "-//VoiceXML Forum//DTD XHTML+Voice 1.2//EN" "http://www.voicexml.org/specs/multimodal/x+v/12/dtd/xhtml+voice12.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xv="http://www.voicexml.org/2002/xhtml+voice" xml:lang="en-US">
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<snap/>

Don't use the Struts HTML taglib. It gives little in X+V apps. What
the RDC framework mostly uses Struts for is the "controller" bits (the
cross-page navigation) for the web app.


> <%@ taglib uri="http://jakarta.apache.org/taglibs/rdc-1.0" prefix="rdc"%>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <head>
>  <title>Example 1: "Hello, World"</title>
>  <xv:sync xv:input="userid" xv:field="#useridInput" />
>  <form xmlns="http://www.w3.org/2001/vxml" id="sayHello">
>    <rdc:hello name="shaivya"/>
>  </form>
> <vxml version="2.0" xml:lang="en-US"  xmlns="http://www.w3.org/2001/vxml">
> <jsp:useBean id="dialogMap" class="java.util.LinkedHashMap" scope="session"/>
>  <rdc:task map="${dialogMap}" id="takeText">
<snip/>

This reminds me to add the id attribute to the task tag [4] so it gets
rendered as the form id. If you add an issue in bugzilla [5] (under
Product:Taglibs, Component: RDC Taglib) it will make sure we don't
forget.


>        <rdc:alpha id="userid" echo="true" />
>  </rdc:task>
> </vxml>
> <c:if test="${not empty userid}">
>  <rdc:struts-submit submit="/DummyAction" context="${pageContext}" namelist="userid"
 />
> </c:if>
<snap/>

In X+V (atleast the 1.x versions), X is the master and therefore, V
should not submit. The rdc:struts-submit and the surrounding c:if
should be removed.


> </head>
>
> <body ev:event="load" ev:handler="#sayHello">
>  <h1>"Hello World!" example</h1>
>
>  <html:form action="/DummyAction">
>  <html:text property="userid" size="20"/>
> <input type="text" id="userid" size="20" ev:event="focus" ev:handler="#takeText"/>
<snip/>

userid is repeated? Again, avoid html:text, inline HTML instead (as
you've done via the <input> element).


>  <html:submit value="Submit"/>
>  </html:form>
> </body>
> </html>
>
<snap/>

I propose the following roadmap:

1) Fix task.tag
   a) Add "id" attribute
   b) Add "namespace" attribute to render the xmlns (so the wrapper
<vxml> element that you have in the above example is no longer needed)

2) Make RDCs X+V aware
   a) Add a "xv" (or some such name) attribute that conditionally
alters the component's FSM [6] to behave as a voice form for a event
handler from the X side.
   b) Not emit the <filled> content (this will bypass validation,
confirmation and echo) in fsm-input.tag [7]

3) Explore strategies to allow RDC validation, confirmation and echo
in conjunction with X+V apps (this is somewhat above and beyond what
the V currently does in X+V, but will be fun exploring)

What do you think? Would you like to try any of this out? (will
require changes to RDC library code as pointed out above). Feel free
to open enhancement requests in bugzilla, which will ensure this stays
on my radar.

Please let us know if you any other questions or comments.

-Rahul

[1] http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents
[2] http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/rdc/
[3] http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorials
[4] http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/task.tag
[5] http://issues.apache.org/bugzilla/
[6] http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/fsm-run.tag
[7] http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/src/META-INF/tags/rdc/fsm-input.tag


___________________________________________________________________________________________
> Thanks and regards,
> Shaivya Easwaren
<snap/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message