You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Niels Harremoes <nu...@pfa.dk> on 2007/02/07 11:02:31 UTC

Adding dojo attributes to netui tags?

In a few places in our web app, we would like to add some 
http://dojotoolkit.org dojo  functionality. For example, we would like to
add some of the validation functionality demonstrated here:
http://archive.dojotoolkit.org/nightly/tests/widget/test_validate.html
http://archive.dojotoolkit.org/nightly/tests/widget/test_validate.html 


This require generating html like:

&lt;input type="text" name="phone" 
          value="someTestString" 
          dojoType="RegexpTextbox"
          regexp="^[\w]+$" required="true" invalidMessage="Invalid Non-Space
Text." /&gt;

(for now, we don't need to interface with the netui validation framework)


How can we generate the extra attributes required by dojo (dojoType, regexp,
required, invalidMessage? Do we have to make our own DojoNetui tags that
extands the standard tags, or is there a simpler method?

-- 
View this message in context: http://www.nabble.com/Adding-dojo-attributes-to-netui-tags--tf3185948.html#a8842656
Sent from the Beehive - User mailing list archive at Nabble.com.

Re: Adding dojo attributes to netui tags?

Posted by Carlin Rogers <ca...@gmail.com>.
Hi Niels,

NetUI has an attribute tag that allows you to adds an attribute to the
parent NetUI tag. You could write something like...

    <netui:textBox dataSource="actionForm.phone"
                          defaultValue="someTestString">
        <netui:attribute name="dojoType" value="RegexpTextbox"/>
        <netui:attribute name="regexp" value="^[\w]+$"/>
        <netui:attribute name="required" value="true"/>
        <netui:attribute name="invalidMessage" value="Invalid Non-Space Text."/>
    </netui:textBox>


See...
http://beehive.apache.org/docs/1.0.2/netui/apidocs/taglib/beehive.apache.org/netui/tags-html-1.0/attribute.html

Kind regards,
Carlin

On 2/7/07, Niels Harremoes <nu...@pfa.dk> wrote:
>
> In a few places in our web app, we would like to add some
> http://dojotoolkit.org dojo  functionality. For example, we would like to
> add some of the validation functionality demonstrated here:
> http://archive.dojotoolkit.org/nightly/tests/widget/test_validate.html
> http://archive.dojotoolkit.org/nightly/tests/widget/test_validate.html
>
>
> This require generating html like:
>
> &lt;input type="text" name="phone"
>           value="someTestString"
>           dojoType="RegexpTextbox"
>           regexp="^[\w]+$" required="true" invalidMessage="Invalid Non-Space
> Text." /&gt;
>
> (for now, we don't need to interface with the netui validation framework)
>
>
> How can we generate the extra attributes required by dojo (dojoType, regexp,
> required, invalidMessage? Do we have to make our own DojoNetui tags that
> extands the standard tags, or is there a simpler method?
>
> --
> View this message in context: http://www.nabble.com/Adding-dojo-attributes-to-netui-tags--tf3185948.html#a8842656
> Sent from the Beehive - User mailing list archive at Nabble.com.
>