You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ravi_eze <ra...@yahoo.com> on 2008/01/20 05:29:47 UTC

using YUI with struts 2

hi,

i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
The problem is that YUI requires YUI specific tags while struts generates
html tags. so, can we write themes(ftls etc similar to xhtml etc) which
would generate YUI tags instead of HTML? would this bring in new problems?
or did any one have tried this? YUI plugin is provided but its alpha version
and doesnt provide all components that we require.

any help?
-- 
View this message in context: http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14978453.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: using YUI with struts 2

Posted by Ted Husted <hu...@apache.org>.
Does this count as being documented

 * http://struts.apache.org/2.x/docs/ajax.html

or do we need something more specific?

-Ted.

On Jan 20, 2008 5:56 AM, ravi_eze <ra...@yahoo.com> wrote:
>
> hi Jeromy Evans,
> Thanks for the quick reply. The YUI is working with the html tags also. I
> dont know if this is documented anywhere; any how thanks for the help
>
>
> :-)
>
> Jeromy Evans - Blue Sky Minds wrote:
> >
> > Hi Ravi,
> >
> > YUI doesn't require any specific tags.  AFAIK, they're all plain old
> > valid html.  It can't get much better than that.
> >
> > ie. this is a TabView:
> >
> > <div id="demo" class="yui-navset">
> >     <ul class="yui-nav">
> >         <li class="selected"> #tab1 <em>Tab One Label</em> </li>
> >         <li> #tab2 <em>Tab Two Label</em> </li>
> >         <li> #tab3 <em>Tab Three Label</em> </li>
>
> >     </ul>
> >     <div class="yui-content">
> >         <div><p>Tab One Content</p></div>
> >         <div><p>Tab Two Content</p></div>
> >         <div><p>Tab Three Content</p></div>
> >     </div>
> > </div>
> >
> >
> > It's instantiated with:
> >
> > var myTabs = new YAHOO.widget.TabView("demo");
> >
> > Which adds additional valid html markup to the DOM.
> >
> > You can create a TagLib or Struts2 tags for commonly used widgets if you
> > like, as provided by the YUI plugin, but this doesn't add much value.
> > For instance, I've created a TabView tags like this:
> >
> > <yui:tabview id="demo" selected="tab1">
> >   <yui:tab id="tab1" label="Tab One Label">Tab One Content</yui:tab>
> >   <yui:tab id="tab2" label="Tab Two Label">Tab Two Content</yui:tab>
> >   <yui:tab id="tab3" label="Tab ThreeLabel">Tab Three Content</yui:tab>
> > </yui:tabview>
> >
> > That renders the original HTML above.  The value this adds over the
> > original HTML is dubious considering the effort it took to write the
> > custom-tag and the clarity of the original code.  Writing custom tags
> > for the DataTable, TreeView, Charts etc are definitely not worth the
> > effort because the tags can't replicate the functionality of the API.
> >
> > What exactly were  you hoping for?
> >
> > regards,
> >  Jeromy Evans
> >
> > ravi_eze wrote:
> >> hi,
> >>
> >> i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
> >> The problem is that YUI requires YUI specific tags while struts generates
> >> html tags. so, can we write themes(ftls etc similar to xhtml etc) which
> >> would generate YUI tags instead of HTML? would this bring in new
> >> problems?
> >> or did any one have tried this? YUI plugin is provided but its alpha
> >> version
> >> and doesnt provide all components that we require.
> >>
> >> any help?

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


Re: using YUI with struts 2

Posted by ravi_eze <ra...@yahoo.com>.
thanks a ton jayson. i may require it later, shall check it then:)



Jayson Joseph Chacko wrote:
> 
> Hi Ravi,
> 
> Here is an example which uses YUI along with JSON to create a menu in
> Struts2. You might find it useful.
> http://www.struts2.org/creating-a-cascading-application-menu-using-struts2-and-yui
> 
> Regards,
> Jayson
> 
> On Jan 20, 2008 4:26 PM, ravi_eze <ra...@yahoo.com> wrote:
> 
>>
>> hi Jeromy Evans,
>> Thanks for the quick reply. The YUI is working with the html tags also. I
>> dont know if this is documented anywhere; any how thanks for the help
>>
>>
>> :-)
>>
>> Jeromy Evans - Blue Sky Minds wrote:
>> >
>> > Hi Ravi,
>> >
>> > YUI doesn't require any specific tags.  AFAIK, they're all plain old
>> > valid html.  It can't get much better than that.
>> >
>> > ie. this is a TabView:
>> >
>> > <div id="demo" class="yui-navset">
>> >     <ul class="yui-nav">
>> >         <li class="selected"> #tab1 <em>Tab One Label</em> </li>
>> >         <li> #tab2 <em>Tab Two Label</em> </li>
>> >         <li> #tab3 <em>Tab Three Label</em> </li>
>>  >     </ul>
>> >     <div class="yui-content">
>> >         <div><p>Tab One Content</p></div>
>> >         <div><p>Tab Two Content</p></div>
>> >         <div><p>Tab Three Content</p></div>
>> >     </div>
>> > </div>
>> >
>> >
>> > It's instantiated with:
>> >
>> > var myTabs = new YAHOO.widget.TabView("demo");
>> >
>> > Which adds additional valid html markup to the DOM.
>> >
>> > You can create a TagLib or Struts2 tags for commonly used widgets if
>> you
>> > like, as provided by the YUI plugin, but this doesn't add much value.
>> > For instance, I've created a TabView tags like this:
>> >
>> > <yui:tabview id="demo" selected="tab1">
>> >   <yui:tab id="tab1" label="Tab One Label">Tab One Content</yui:tab>
>> >   <yui:tab id="tab2" label="Tab Two Label">Tab Two Content</yui:tab>
>> >   <yui:tab id="tab3" label="Tab ThreeLabel">Tab Three Content</yui:tab>
>> > </yui:tabview>
>> >
>> > That renders the original HTML above.  The value this adds over the
>> > original HTML is dubious considering the effort it took to write the
>> > custom-tag and the clarity of the original code.  Writing custom tags
>> > for the DataTable, TreeView, Charts etc are definitely not worth the
>> > effort because the tags can't replicate the functionality of the API.
>> >
>> > What exactly were  you hoping for?
>> >
>> > regards,
>> >  Jeromy Evans
>> >
>> > ravi_eze wrote:
>> >> hi,
>> >>
>> >> i want to use YUI library (http://developer.yahoo.com/yui/) with
>> struts2.
>> >> The problem is that YUI requires YUI specific tags while struts
>> generates
>> >> html tags. so, can we write themes(ftls etc similar to xhtml etc)
>> which
>> >> would generate YUI tags instead of HTML? would this bring in new
>> >> problems?
>> >> or did any one have tried this? YUI plugin is provided but its alpha
>> >> version
>> >> and doesnt provide all components that we require.
>> >>
>> >> any help?
>> >>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14980470.html
>> Sent from the Struts - User mailing list archive at
>> Nabble.com<http://nabble.com/>
>> .
>>
>>
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14999390.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: using YUI with struts 2

Posted by Jayson Joseph Chacko <ja...@gmail.com>.
Hi Ravi,

Here is an example which uses YUI along with JSON to create a menu in
Struts2. You might find it useful.
http://www.struts2.org/creating-a-cascading-application-menu-using-struts2-and-yui

Regards,
Jayson

On Jan 20, 2008 4:26 PM, ravi_eze <ra...@yahoo.com> wrote:

>
> hi Jeromy Evans,
> Thanks for the quick reply. The YUI is working with the html tags also. I
> dont know if this is documented anywhere; any how thanks for the help
>
>
> :-)
>
> Jeromy Evans - Blue Sky Minds wrote:
> >
> > Hi Ravi,
> >
> > YUI doesn't require any specific tags.  AFAIK, they're all plain old
> > valid html.  It can't get much better than that.
> >
> > ie. this is a TabView:
> >
> > <div id="demo" class="yui-navset">
> >     <ul class="yui-nav">
> >         <li class="selected"> #tab1 <em>Tab One Label</em> </li>
> >         <li> #tab2 <em>Tab Two Label</em> </li>
> >         <li> #tab3 <em>Tab Three Label</em> </li>
>  >     </ul>
> >     <div class="yui-content">
> >         <div><p>Tab One Content</p></div>
> >         <div><p>Tab Two Content</p></div>
> >         <div><p>Tab Three Content</p></div>
> >     </div>
> > </div>
> >
> >
> > It's instantiated with:
> >
> > var myTabs = new YAHOO.widget.TabView("demo");
> >
> > Which adds additional valid html markup to the DOM.
> >
> > You can create a TagLib or Struts2 tags for commonly used widgets if you
> > like, as provided by the YUI plugin, but this doesn't add much value.
> > For instance, I've created a TabView tags like this:
> >
> > <yui:tabview id="demo" selected="tab1">
> >   <yui:tab id="tab1" label="Tab One Label">Tab One Content</yui:tab>
> >   <yui:tab id="tab2" label="Tab Two Label">Tab Two Content</yui:tab>
> >   <yui:tab id="tab3" label="Tab ThreeLabel">Tab Three Content</yui:tab>
> > </yui:tabview>
> >
> > That renders the original HTML above.  The value this adds over the
> > original HTML is dubious considering the effort it took to write the
> > custom-tag and the clarity of the original code.  Writing custom tags
> > for the DataTable, TreeView, Charts etc are definitely not worth the
> > effort because the tags can't replicate the functionality of the API.
> >
> > What exactly were  you hoping for?
> >
> > regards,
> >  Jeromy Evans
> >
> > ravi_eze wrote:
> >> hi,
> >>
> >> i want to use YUI library (http://developer.yahoo.com/yui/) with
> struts2.
> >> The problem is that YUI requires YUI specific tags while struts
> generates
> >> html tags. so, can we write themes(ftls etc similar to xhtml etc) which
> >> would generate YUI tags instead of HTML? would this bring in new
> >> problems?
> >> or did any one have tried this? YUI plugin is provided but its alpha
> >> version
> >> and doesnt provide all components that we require.
> >>
> >> any help?
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14980470.html
> Sent from the Struts - User mailing list archive at Nabble.com<http://nabble.com/>
> .
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: using YUI with struts 2

Posted by ravi_eze <ra...@yahoo.com>.
hi Jeromy Evans,
Thanks for the quick reply. The YUI is working with the html tags also. I
dont know if this is documented anywhere; any how thanks for the help


:-)

Jeromy Evans - Blue Sky Minds wrote:
> 
> Hi Ravi,
> 
> YUI doesn't require any specific tags.  AFAIK, they're all plain old 
> valid html.  It can't get much better than that.
> 
> ie. this is a TabView:
> 
> <div id="demo" class="yui-navset">
>     <ul class="yui-nav">
>         <li class="selected"> #tab1 <em>Tab One Label</em> </li>
>         <li> #tab2 <em>Tab Two Label</em> </li>
>         <li> #tab3 <em>Tab Three Label</em> </li>
>     </ul>            
>     <div class="yui-content">
>         <div><p>Tab One Content</p></div>
>         <div><p>Tab Two Content</p></div>
>         <div><p>Tab Three Content</p></div>
>     </div>
> </div>
> 
> 
> It's instantiated with:
> 
> var myTabs = new YAHOO.widget.TabView("demo");
> 
> Which adds additional valid html markup to the DOM. 
> 
> You can create a TagLib or Struts2 tags for commonly used widgets if you 
> like, as provided by the YUI plugin, but this doesn't add much value.  
> For instance, I've created a TabView tags like this:
> 
> <yui:tabview id="demo" selected="tab1">
>   <yui:tab id="tab1" label="Tab One Label">Tab One Content</yui:tab>
>   <yui:tab id="tab2" label="Tab Two Label">Tab Two Content</yui:tab>
>   <yui:tab id="tab3" label="Tab ThreeLabel">Tab Three Content</yui:tab>
> </yui:tabview>
> 
> That renders the original HTML above.  The value this adds over the 
> original HTML is dubious considering the effort it took to write the 
> custom-tag and the clarity of the original code.  Writing custom tags 
> for the DataTable, TreeView, Charts etc are definitely not worth the 
> effort because the tags can't replicate the functionality of the API.
> 
> What exactly were  you hoping for?
> 
> regards,
>  Jeromy Evans
> 
> ravi_eze wrote:
>> hi,
>>
>> i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
>> The problem is that YUI requires YUI specific tags while struts generates
>> html tags. so, can we write themes(ftls etc similar to xhtml etc) which
>> would generate YUI tags instead of HTML? would this bring in new
>> problems?
>> or did any one have tried this? YUI plugin is provided but its alpha
>> version
>> and doesnt provide all components that we require.
>>
>> any help?
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/using-YUI-with-struts-2-tp14978453p14980470.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: using YUI with struts 2

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Hi Ravi,

YUI doesn't require any specific tags.  AFAIK, they're all plain old 
valid html.  It can't get much better than that.

ie. this is a TabView:

<div id="demo" class="yui-navset">
    <ul class="yui-nav">
        <li class="selected"><a href="#tab1"><em>Tab One Label</em></a></li>
        <li><a href="#tab2"><em>Tab Two Label</em></a></li>
        <li><a href="#tab3"><em>Tab Three Label</em></a></li>
    </ul>            
    <div class="yui-content">
        <div><p>Tab One Content</p></div>
        <div><p>Tab Two Content</p></div>
        <div><p>Tab Three Content</p></div>
    </div>
</div>


It's instantiated with:

var myTabs = new YAHOO.widget.TabView("demo");

Which adds additional valid html markup to the DOM. 

You can create a TagLib or Struts2 tags for commonly used widgets if you 
like, as provided by the YUI plugin, but this doesn't add much value.  
For instance, I've created a TabView tags like this:

<yui:tabview id="demo" selected="tab1">
  <yui:tab id="tab1" label="Tab One Label">Tab One Content</yui:tab>
  <yui:tab id="tab2" label="Tab Two Label">Tab Two Content</yui:tab>
  <yui:tab id="tab3" label="Tab ThreeLabel">Tab Three Content</yui:tab>
</yui:tabview>

That renders the original HTML above.  The value this adds over the 
original HTML is dubious considering the effort it took to write the 
custom-tag and the clarity of the original code.  Writing custom tags 
for the DataTable, TreeView, Charts etc are definitely not worth the 
effort because the tags can't replicate the functionality of the API.

What exactly were  you hoping for?

regards,
 Jeromy Evans

ravi_eze wrote:
> hi,
>
> i want to use YUI library (http://developer.yahoo.com/yui/) with struts2.
> The problem is that YUI requires YUI specific tags while struts generates
> html tags. so, can we write themes(ftls etc similar to xhtml etc) which
> would generate YUI tags instead of HTML? would this bring in new problems?
> or did any one have tried this? YUI plugin is provided but its alpha version
> and doesnt provide all components that we require.
>
> any help?
>   


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