tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rao, Aravilli Srinivasa" <a...@sonusnet.com>
Subject RE: RDC Tag Libs
Date Fri, 06 Jan 2006 12:54:51 GMT
Rahul,

I will submit the tag for <rdc:builtin> and its related files in early
next week.  

Regards
Aravilli

-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: Friday, January 06, 2006 5:14 AM
To: Tag Libraries Users List
Cc: Rao, Aravilli Srinivasa
Subject: Re: RDC Tag Libs

On 1/5/06, Rao, Aravilli Srinivasa <arao@sonusnet.com> wrote:
>
> Rahul,
>
> Thanks for your reply.  Some Media Servers doesn't support grammar
element.
> So we have to specify using the Built in Grammar only.  If I use
RDCTemplate
> also the same problem because it also adds the grammar element.
>
<snip/>

Correct, that case precludes rdc:template as well.


> So are there any plans to support the Builtin Grammar or any
alternative
> like support to customize the attribute of a filed.
>
<snap/>

Wasn't planning on it, but seems like a useful addition to the RDC
palette.


> I have tried the following alternatives to achieve the same.
>
> I tried by changing the "field" element fsm-input.tag
>
> <field name="${model.id}Input"
> ="digits?minlength=3;maxlength=5">  then I tested with some
> test tag it adds properly the Builtin grammar.
>
> But this is not the proper approach because Builtin Grammar can be any
type
> i.e "digits, number, Boolean etc"
>
<snip/>

True :-)


> I have tried another approach
>
>    1)      Added one property in "digits.tag" file
>
>                 <%@ attribute name="type" required="false" %>
>
>                 And the set the attribute value to the Model
>
>                 <c:set target="${model}" property="type"
value="${type}"/>
>
>    2)      Modified the fsm-input.tag to read this property also
>
>                 <field name="${model.id}Input" type="${model.type}">
>
>    3)      Add the property in "digits-test.jsp" in the following way
>
>         <rdc:digits id="digits"
>    type="digits?minlength=3;maxlength=3;length=3"
> minLength="5"    maxLength="9" config="/config/test.xml" />
>
>
>
>         Then I tried to execute the JSP then it throws the following
error
>
>         javax.servlet.jsp.JspTagException: Invalid property
> in &lt;set&gt;:  "type"
>
<snap/>

Because the model (Java class org.apache.taglibs.rdc.Digits in this
case) doesn't have a "type" property with a getter/setter, so the
c:set fails.

But you have the right idea. We should add a rdc:builtin (or suitably
named) component, so an instantation will look like:

<rdc:builtin id="myRDC" type="type="digits?minlength=3;maxlength=3"
config="foo.xml" />

where the type attribute gets rendered via the fsm-input tag for this
component as you point out above.

Do you want to take a stab at this? I'll happy to author this
component for the taglib as well, but it might take a week or two
before I get to it. Here is an introduction to the "building blocks"
we'll need:

http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorial
s/BuildingBlocks

Here is an example of an atomic component that was submitted (and
accepted) into the RDC taglib, which might also help, in the "learn by
example" spirit:

http://issues.apache.org/bugzilla/show_bug.cgi?id=35024

Please let me know if you have any other questions.

-Rahul


>
>
org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(Unknown
> Source)
>
>
>
org.apache.jsp.tag.meta.rdc.digits_tag._jspx_meth_c_set_2(digits_tag.jav
a:562)
>
>
>
org.apache.jsp.tag.meta.rdc.digits_tag._jspx_meth_c_when_0(digits_tag.ja
va:417)
>
>
>
org.apache.jsp.tag.meta.rdc.digits_tag._jspx_meth_c_choose_0(digits_tag.
java:358)
>
>
> org.apache.jsp.tag.meta.rdc.digits_tag.doTag(digits_tag.java:289)
>
>
>
org.apache.jsp.digits_002dtest_jsp$digits_002dtest_jspHelper.invoke0(dig
its_002dtest_
>   jsp.java:155)
>
>
>
> Could you please suggest what is wrong in this approach?
>
>
>
> Regards
>
> Srinivas
>
<snip/>


---------------------------------------------------------------------
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