Hi,
I have implemented this also as a tag library and added as a carbon tag in
the Carbon UI Core bundle.
This is how this tag library can be used in a JSP file :
1. When the default text is taken from a resource bundle .
<carbon:defaultTextBox
txtBoxId="txtBoxId"resourceBundle="org.wso2.carbon.dataservices.ui.i18n.Resources"key="dataservices.task.interval.cannotfound.msg"
/>
If JSP page is using a common resource bundle , you can skip giving
resourceBundle name.
<carbon:defaultTextBox txtBoxId="txtBoxId"
key="dataservices.task.interval.cannotfound.msg" />
2. If you want you can define the default text inside tag lib itself without
taking from a resource bundle.
<carbon:defaultTextBox txtBoxId="txtBoxId" defaultText="default
text" />
Regards,
Dinusha.
On Thu, Feb 24, 2011 at 3:04 PM, Afkham Azeez <[email protected]> wrote:
>
> On Thu, Feb 24, 2011 at 3:03 PM, Srinath Perera <[email protected]> wrote:
>
>> things in to action.
>> >>> giveDefaultText("txtBoxId");
>> >>
>> >> When you click on the text box, does the default text disappear. Also,
>> can
>> >> we define our own input type; e.g. <input type="smarttext" ... /> ? In
>> other
>> >> words, our own widget. Calling that Javascript method is cumbersome.
>> >
>> > Extending a the Dom elements and creating new elements is not
>> very popular
>> > and it's recommended not to do so. But I will give it a try.
>>
>> No we should use the best practices on such cases --Srinath
>>
>
> We can define a tag. It is very simple to do. Chanaka, if you come and meet
> me I can show you what needs to be done.
>
>
>>
>>
>> >>>
>> >>> thanks,
>> >>> Chanaka
>> >>> _______________________________________________
>> >>> Carbon-dev mailing list
>> >>> [email protected]
>> >>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Afkham Azeez
>> >> Senior Software Architect & Senior Manager; WSO2, Inc.;
>> http://wso2.com,
>> >>
>> >> Member; Apache Software Foundation; http://www.apache.org/
>> >> email: [email protected] cell: +94 77 3320919
>> >> blog: http://blog.afkham.org
>> >> twitter: http://twitter.com/afkham_azeez
>> >> linked-in: http://lk.linkedin.com/in/afkhamazeez
>> >>
>> >> Lean . Enterprise . Middleware
>> >
>> >
>> > _______________________________________________
>> > Carbon-dev mailing list
>> > [email protected]
>> > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>> >
>> >
>>
>>
>>
>> --
>> ============================
>> Srinath Perera, Ph.D.
>> Senior Software Architect, WSO2 Inc.
>> Visiting Lecturer, University of Moratuwa
>> Member, Apache Software Foundation
>> Research Scientist, Lanka Software Foundation
>> Blog: http://srinathsview.blogspot.com/
>>
>
>
>
> --
> *Afkham Azeez*
> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
> *
> *
> *Member; Apache Software Foundation;
> **http://www.apache.org/*<http://www.apache.org/>
> *
> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
> *
> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
> *
> *
> *Lean . Enterprise . Middleware*
>
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev