You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2005/12/16 19:07:56 UTC

Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

On 12/14/05, Martin Marinschek <ma...@gmail.com> wrote:
> we haven't as we still have some open bugs which prevent working
> Facelets perfectly with MyFaces. So this is a hen-egg problem. If we
> got rid of those bugs, we'd use Facelets more, if Facelets was used
> more, there might be someone inclined to get rid of those bugs ;).

As facelets end-user #1 (so I'm told), I can say that facelets has
worked, and continues to work, fine with MyFaces (I have used MyFaces
and facelets exclusively the last 6 months).   There's a few tomahawk
and sandbox components out there that need better facelet support, and
hopefully I can be instrumental in getting that developed, as time
permits, but most of them work "as-is" right now.

One of the things I'd like to see happen is to have the facelets
taglib.xml files generated automatically for the tomahawk and sandbox
components.   That's probably going to require getting code generation
working again, and I haven't had a chance to review that part of the
project.  I think the Shale/Clay folks would like to see similar
functionality provided for their view handler.

The other thing that will be helpful is to get some facelet component
tag handler classes written and added to the myfaces codebase for
those components that have non-ActionSource method bindings (or
non-pass-through Tag code behavior).   This will require a build-time
dependency on facelets for tomahawk and sandbox, so it might need to
be done in such a way as to make building these classes optional.

And, of course, we need some examples.   As Adam has mentioned,
facelet xhtml pages are so close to jspx pages that often times you
can "convert" between the two simply by renaming them.   Unfortunately
(and I haven't looked at the examples in detail recently, so I could
be wrong), the examples are mostly in jsp, and contain a lot of
embedded scriptlets.

-Mike

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Mike Kienenberger <mk...@gmail.com>.
Everything that's there seems to be correct.  Are you using Andrew
Robinson's facelet taglib generator?

http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/faceletsAntTasks/#dirlist

tomahawk.taglib.xml is missing a namespace tag.

[...]
<facelet-taglib>
    <namespace>http://myfaces.apache.org/tomahawk</namespace>
[...]

Same for sandbox.
    <namespace>http://myfaces.apache.org/sandbox</namespace>

Also, it'd be good to write out the tags alphabetically.  Otherwise,
it's hard to compare changes made to the file.

Some components are going to need tag handlers.  Ie,

    <tag>
        <tag-name>graphicImageDynamic</tag-name>
        <component>
            <component-type>org.apache.myfaces.GraphicImageDynamic</component-type>
            <renderer-type>org.apache.myfaces.GraphicImageDynamicRenderer</renderer-type>
        	<handler-class>org.apache.myfaces.facelets.GraphicImageDynamicComponentHandler</handler-class>
        </component>
    </tag>

However, we don't have any tag handler code checked in yet.   I can
start checking in some facelet handler code as soon as we decide where
it should go (package and source directory).   It'll require a
compile-time dependency on facelets.

On 12/18/05, Thomas Spiegl <th...@gmail.com> wrote:
> I just added a new build file build/facelets-build.xml, that generates the
> facelets taglibs for tomahawk and sandbox.
>  Could someone who is using facelets have a look at the generated files
> attached?
>
>  Thomas
>
>
> On 12/18/05, Thomas Spiegl <th...@gmail.com> wrote:
> > Concerining JSCookMenu:
> >
> > The renderer type in tomahawk.taglib.xml
> (http://wiki.apache.org/myfaces-data/attachments/Use_Facelets_with_Tomahawk/attachments/tomahawk.taglib.xml
> ) is missing.
> >
> >     <tag>
> >         <tag-name>jscookMenu</tag-name>
> >         <component>
> >             <component-type>org.apache.myfaces.JSCookMenu</component-type>
> >             <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
> >         </component>
> >     </tag>
> >
> > Adding the renderer-type, JSCookMenu should work with facelets.
> >
> > Thomas
> >
> >
> >
> > On 12/17/05, Mike Kienenberger <mkienenb@gmail.com > wrote:
> > > Thomas,
> > >
> > > I can't say for sure which components aren't working.  All of the
> > > components I'm using are working, but I'm not using all of them.
> > >
> > > The ones I've heard the most complaints about in the past are tree,
> > > tree2, and jscookmenu.  But it's never been clear to me whether those
> > > problems were solved.   Unfortunately, these aren't components I'm
> > > using.
> > >
> > > I agree that we need some facelets examples, and at some point, I hope
> > > to start converting the current examples over to jspx and then have
> > > them work for both facelets and jsp with little-to-no changes, so that
> > > very little effort is required to support both.
> > >
> > > A facelet component tag handler is the rarely-needed facelet
> > > equivalent of a JSP Tag class.  Most of the time, all that's necessary
> > > to use a component in facelets is to define it (associate the
> > > namespace, tag name, component type, and render type together) in a
> > > facelets taglib.xml file.   Facelets then works directly with the
> > > component, never accessing the equivalent JSP Tag class.
> > > Occasionally, a JSP tag class does something tricky, and you'll need
> > > to write a facelet component tag handler.   Such a handler is
> > > configured to do things like alias attributes (ie, if the user
> > > specifies "showNav" for tree2, the handler could change that reference
> > > to "org.apache.myfaces.tree2.SHOW_NAV"), specify method
> binding
> > > signatures (like for "getBytesMethod" and "getContentTypeMethod"
> > > attributes on graphicImageDynamic), and other weird stuff that happens
> > > in Tag classes.
> > >
> > > If components are cleanly written (ie, no logic in the JSP tag), then
> > > the only time you'd need a facelets component tag handler is to
> > > specify the signature of an attribute that takes a method binding as
> > > an argument.
> > >
> > > Sometimes, a non-component tag like updateActionListener can only be
> > > implemented as a facelets tag handler (a facelets component tag
> > > handler is a subclass of a facelets tag handler that's optimized for
> > > dealing with components).  Andrew Robinson has written
> > > updateActionListener as a facelet tag handler.
> > >
> > >
> http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?view=markup
> > >
> > > Some might be asking what's the point if you have to rewrite facelet
> > > tags.   However, most of the time, you don't need a facelet tag.   And
> > > even when you do need one, the code to create it is pretty trivial
> > > (one or two lines in a subclass) since the base component tag handler
> > > class is rules-based, and all of the standard situations are already
> > > handled with default rules.
> > >
> > > For instance, the tag handler for graphicImageDynamic looks like this:
> > >
> > >     protected MetaRuleset createMetaRuleset(Class type)
> > >     {
> > >         MetaRuleset m = super.createMetaRuleset(type);
> > >
> > >         m.addRule(new MethodRule("getBytesMethod", byte[].class, new
> Class[0]));
> > >         m.addRule(new
> MethodRule("getContentTypeMethod", String.class,
> > > new Class[0]));
> > >
> > >         return m;
> > >     }
> > >
> > > A partial tag handler for tree2 in its current state might look like
> this:
> > >
> > > protected MetaRuleset createMetaRuleset(Class type) {
> > >       MetaRuleset m = super.createMetaRuleset(type);
> > >
> > >       m.alias("showNav",
> "org.apache.myfaces.tree2.SHOW_NAV");
> > >
> > >       return m;
> > > }
> > >
> > > As Adam mentioned before, the JSP tags for ADF Faces are about 1Mb in
> > > size, but the equivalent facelet tag code is about 8k in size.
> > >
> > > Or to put it another way, I had the compareToValidator finished for
> > > several weeks, but I was too lazy to write the JSP tag handler (I
> > > didn't need a facelets tag handler) until recently.
> > >
> > > -Mike
> > >
> > > On 12/17/05, Thomas Spiegl < thomas.spiegl@gmail.com > wrote:
> > > > Mike,
> > > >
> > > >  can you tell us which tomahawk components are not working properly
> with
> > > > facelets?
> > > >
> > > >  Some time ago I fixed panelNavigation2 to make it work
> > > >  with facelets. I didn't test it recently, basically because I have no
> > > >  example application using facelets. It would be good to have
> > > >  a facelets example in MyFaces.
> > > >  I totally agree that taglib.xml should be created automatically.
> > > > Unfortunatley
> > > >  the xml definition files for code genartion are outdated or even not
> > > > existend
> > > >  for most tomahawk components.
> > > >
> > > >  What is the need for the facelet component tag handler you mentioned?
> > > >
> > > >  Thomas
> > > >
> > > >
> > > >
> > > > On 12/17/05, Martin Marinschek < martin.marinschek@gmail.com> wrote:
> > > > > @facelets working with MyFaces:
> > > > >
> > > > > Well, I was under the impression (by what Jacob and Adam pointed
> out)
> > > > > that Myfaces and Facelets didn't work together exceptionally good.
> > > > >
> > > > > So you say it works and there are just some minor flaws?
> > > > >
> > > > > regards,
> > > > >
> > > > > Maritn
> > > > >
> > > > > So you are saying it works but
> > > > > On 12/17/05, Martin Marinschek < martin.marinschek@gmail.com> wrote:
> > > > > > Yes, they are still in old jsp format.
> > > > > >
> > > > > > We should rework them in jspx anyways at some point in time.
> > > > > >
> > > > > > regards,
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > > On 12/16/05, Mike Kienenberger < mkienenb@gmail.com > wrote:
> > > > > > > On 12/14/05, Martin Marinschek < martin.marinschek@gmail.com>
> wrote:
> > > > > > > > we haven't as we still have some open bugs which prevent
> working
> > > > > > > > Facelets perfectly with MyFaces. So this is a hen-egg problem.
> If we
> > > > > > > > got rid of those bugs, we'd use Facelets more, if Facelets was
> used
> > > > > > > > more, there might be someone inclined to get rid of those bugs
> ;).
> > > > > > >
> > > > > > > As facelets end-user #1 (so I'm told), I can say that facelets
> has
> > > > > > > worked, and continues to work, fine with MyFaces (I have used
> MyFaces
> > > > > > > and facelets exclusively the last 6 months).   There's a few
> tomahawk
> > > > > > > and sandbox components out there that need better facelet
> support, and
> > > > > > > hopefully I can be instrumental in getting that developed, as
> time
> > > > > > > permits, but most of them work "as-is" right now.
> > > > > > >
> > > > > > > One of the things I'd like to see happen is to have the facelets
> > > > > > > taglib.xml files generated automatically for the tomahawk and
> sandbox
> > > > > > > components.   That's probably going to require getting code
> generation
> > > > > > > working again, and I haven't had a chance to review that part of
> the
> > > > > > > project.  I think the Shale/Clay folks would like to see similar
> > > > > > > functionality provided for their view handler.
> > > > > > >
> > > > > > > The other thing that will be helpful is to get some facelet
> component
> > > > > > > tag handler classes written and added to the myfaces codebase
> for
> > > > > > > those components that have non-ActionSource method bindings (or
> > > > > > > non-pass-through Tag code behavior).   This will require a
> build-time
> > > > > > > dependency on facelets for tomahawk and sandbox, so it might
> need to
> > > > > > > be done in such a way as to make building these classes
> optional.
> > > > > > >
> > > > > > > And, of course, we need some examples.   As Adam has mentioned,
> > > > > > > facelet xhtml pages are so close to jspx pages that often times
> you
> > > > > > > can "convert" between the two simply by renaming them.
> Unfortunately
> > > > > > > (and I haven't looked at the examples in detail recently, so I
> could
> > > > > > > be wrong), the examples are mostly in jsp, and contain a lot of
> > > > > > > embedded scriptlets.
> > > > > > >
> > > > > > > -Mike
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF powerhouse -
> > > > > > JSF Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF powerhouse -
> > > > > JSF Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > >  Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > >
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
>  Professional Support for Apache MyFaces
>

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Werner Punz <we...@gmx.at>.
tried it something must be missing in the svn


Buildfile: C:\development\workspace\current\build\facelets-build.xml
facelets-taglibs:

BUILD FAILED
C:\development\workspace\current\build\facelets-build.xml:19: taskdef
class org.apache.myfaces.tools.FaceletsTaglibTask cannot be found



Thomas Spiegl wrote:
> I just added a new build file build/facelets-build.xml, that generates
> the facelets taglibs for tomahawk and sandbox.
> Could someone who is using facelets have a look at the generated files
> attached?
> 
> Thomas
> 
> On 12/18/05, *Thomas Spiegl* <thomas.spiegl@gmail.com
> <ma...@gmail.com>> wrote:
> 
>     Concerining JSCookMenu:
> 
>     The renderer type in tomahawk.taglib.xml
>     (http://wiki.apache.org/myfaces-data/attachments/Use_Facelets_with_Tomahawk/attachments/tomahawk.taglib.xml
>     <http://wiki.apache.org/myfaces-data/attachments/Use_Facelets_with_Tomahawk/attachments/tomahawk.taglib.xml>)
>     is missing.
> 
>         <tag>
>             <tag-name>jscookMenu</tag-name>
>             <component>
>                
>     <component-type>org.apache.myfaces.JSCookMenu</component-type>
>                 <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
>             </component>
>         </tag>
> 
>     Adding the renderer-type, JSCookMenu should work with facelets.
> 
>     Thomas
> 
> 
>     On 12/17/05, *Mike Kienenberger* <mkienenb@gmail.com
>     <ma...@gmail.com>> wrote:
> 
>         Thomas,
> 
>         I can't say for sure which components aren't working.  All of the
>         components I'm using are working, but I'm not using all of them.
> 
>         The ones I've heard the most complaints about in the past are tree,
>         tree2, and jscookmenu.  But it's never been clear to me whether
>         those
>         problems were solved.   Unfortunately, these aren't components I'm
>         using.
> 
>         I agree that we need some facelets examples, and at some point,
>         I hope
>         to start converting the current examples over to jspx and then have
>         them work for both facelets and jsp with little-to-no changes,
>         so that
>         very little effort is required to support both.
> 
>         A facelet component tag handler is the rarely-needed facelet
>         equivalent of a JSP Tag class.  Most of the time, all that's
>         necessary
>         to use a component in facelets is to define it (associate the
>         namespace, tag name, component type, and render type together) in a
>         facelets taglib.xml file.   Facelets then works directly with the
>         component, never accessing the equivalent JSP Tag class.
>         Occasionally, a JSP tag class does something tricky, and you'll need
>         to write a facelet component tag handler.   Such a handler is
>         configured to do things like alias attributes (ie, if the user
>         specifies "showNav" for tree2, the handler could change that
>         reference
>         to "org.apache.myfaces.tree2.SHOW_NAV"), specify method binding
>         signatures (like for "getBytesMethod" and "getContentTypeMethod"
>         attributes on graphicImageDynamic), and other weird stuff that
>         happens
>         in Tag classes.
> 
>         If components are cleanly written (ie, no logic in the JSP tag),
>         then
>         the only time you'd need a facelets component tag handler is to
>         specify the signature of an attribute that takes a method binding as
>         an argument.
> 
>         Sometimes, a non-component tag like updateActionListener can
>         only be
>         implemented as a facelets tag handler (a facelets component tag
>         handler is a subclass of a facelets tag handler that's optimized for
>         dealing with components).  Andrew Robinson has written
>         updateActionListener as a facelet tag handler.
> 
>         http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?view=markup
>         <http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?view=markup>
> 
>         Some might be asking what's the point if you have to rewrite facelet
>         tags.   However, most of the time, you don't need a facelet
>         tag.   And
>         even when you do need one, the code to create it is pretty trivial
>         (one or two lines in a subclass) since the base component tag
>         handler
>         class is rules-based, and all of the standard situations are already
>         handled with default rules.
> 
>         For instance, the tag handler for graphicImageDynamic looks like
>         this:
> 
>             protected MetaRuleset createMetaRuleset(Class type)
>             {
>                 MetaRuleset m = super.createMetaRuleset(type);
> 
>                 m.addRule(new MethodRule("getBytesMethod", byte[].class,
>         new Class[0]));
>                 m.addRule(new MethodRule("getContentTypeMethod",
>         String.class,
>         new Class[0]));
> 
>                 return m;
>             }
> 
>         A partial tag handler for tree2 in its current state might look
>         like this:
> 
>         protected MetaRuleset createMetaRuleset(Class type) {
>               MetaRuleset m = super.createMetaRuleset(type);
> 
>               m.alias("showNav", "org.apache.myfaces.tree2.SHOW_NAV");
> 
>               return m;
>         }
> 
>         As Adam mentioned before, the JSP tags for ADF Faces are about
>         1Mb in
>         size, but the equivalent facelet tag code is about 8k in size.
> 
>         Or to put it another way, I had the compareToValidator finished for
>         several weeks, but I was too lazy to write the JSP tag handler (I
>         didn't need a facelets tag handler) until recently.
> 
>         -Mike
> 
>         On 12/17/05, Thomas Spiegl < thomas.spiegl@gmail.com
>         <ma...@gmail.com>> wrote:
>> Mike,
>>
>>  can you tell us which tomahawk components are not working
>         properly with
>> facelets?
>>
>>  Some time ago I fixed panelNavigation2 to make it work
>>  with facelets. I didn't test it recently, basically because I
>         have no
>>  example application using facelets. It would be good to have
>>  a facelets example in MyFaces.
>>  I totally agree that taglib.xml should be created automatically.
>> Unfortunatley
>>  the xml definition files for code genartion are outdated or
>         even not
>> existend
>>  for most tomahawk components.
>>
>>  What is the need for the facelet component tag handler you
>         mentioned?
>>
>>  Thomas
>>
>>
>>
>> On 12/17/05, Martin Marinschek < martin.marinschek@gmail.com
>         <ma...@gmail.com>> wrote:
>> > @facelets working with MyFaces:
>> >
>> > Well, I was under the impression (by what Jacob and Adam
>         pointed out)
>> > that Myfaces and Facelets didn't work together exceptionally
>         good.
>> >
>> > So you say it works and there are just some minor flaws?
>> >
>> > regards,
>> >
>> > Maritn
>> >
>> > So you are saying it works but
>> > On 12/17/05, Martin Marinschek < martin.marinschek@gmail.com
>         <ma...@gmail.com>> wrote:
>> > > Yes, they are still in old jsp format.
>> > >
>> > > We should rework them in jspx anyways at some point in time.
>> > >
>> > > regards,
>> > >
>> > > Martin
>> > >
>> > > On 12/16/05, Mike Kienenberger < mkienenb@gmail.com
>         <ma...@gmail.com> > wrote:
>> > > > On 12/14/05, Martin Marinschek <
>         martin.marinschek@gmail.com
>         <ma...@gmail.com>> wrote:
>> > > > > we haven't as we still have some open bugs which
>         prevent working
>> > > > > Facelets perfectly with MyFaces. So this is a hen-egg
>         problem. If we
>> > > > > got rid of those bugs, we'd use Facelets more, if
>         Facelets was used
>> > > > > more, there might be someone inclined to get rid of
>         those bugs ;).
>> > > >
>> > > > As facelets end-user #1 (so I'm told), I can say that
>         facelets has
>> > > > worked, and continues to work, fine with MyFaces (I have
>         used MyFaces
>> > > > and facelets exclusively the last 6 months).   There's a
>         few tomahawk
>> > > > and sandbox components out there that need better facelet
>         support, and
>> > > > hopefully I can be instrumental in getting that
>         developed, as time
>> > > > permits, but most of them work "as-is" right now.
>> > > >
>> > > > One of the things I'd like to see happen is to have the
>         facelets
>> > > > taglib.xml files generated automatically for the tomahawk
>         and sandbox
>> > > > components.   That's probably going to require getting
>         code generation
>> > > > working again, and I haven't had a chance to review that
>         part of the
>> > > > project.  I think the Shale/Clay folks would like to see
>         similar
>> > > > functionality provided for their view handler.
>> > > >
>> > > > The other thing that will be helpful is to get some
>         facelet component
>> > > > tag handler classes written and added to the myfaces
>         codebase for
>> > > > those components that have non-ActionSource method
>         bindings (or
>> > > > non-pass-through Tag code behavior).   This will require
>         a build-time
>> > > > dependency on facelets for tomahawk and sandbox, so it
>         might need to
>> > > > be done in such a way as to make building these classes
>         optional.
>> > > >
>> > > > And, of course, we need some examples.   As Adam has
>         mentioned,
>> > > > facelet xhtml pages are so close to jspx pages that often
>         times you
>> > > > can "convert" between the two simply by renaming them.  
>         Unfortunately
>> > > > (and I haven't looked at the examples in detail recently,
>         so I could
>> > > > be wrong), the examples are mostly in jsp, and contain a
>         lot of
>> > > > embedded scriptlets.
>> > > >
>> > > > -Mike
>> > > >
>> > >
>> > >
>> > > --
>> > >
>> > > http://www.irian.at
>> > >
>> > > Your JSF powerhouse -
>> > > JSF Consulting, Development and
>> > > Courses in English and German
>> > >
>> > > Professional Support for Apache MyFaces
>> > >
>> >
>> >
>> > --
>> >
>> > http://www.irian.at
>> >
>> > Your JSF powerhouse -
>> > JSF Consulting, Development and
>> > Courses in English and German
>> >
>> > Professional Support for Apache MyFaces
>> >
>>
>>
>>
>> --
>>
>> http://www.irian.at <http://www.irian.at>
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>>  Courses in English and German
>>
>> Professional Support for Apache MyFaces
> 
> 
> 
> 
>     -- 
> 
>     http://www.irian.at
> 
>     Your JSF powerhouse -
>     JSF Consulting, Development and
>     Courses in English and German
> 
>     Professional Support for Apache MyFaces 
> 
> 
> 
> 
> -- 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd" "facelet-taglib">
> <facelet-taglib>
>     <tag>
>         <tag-name>commandButton</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
>             <renderer-type>org.apache.myfaces.Button</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>commandLink</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCommandLink</component-type>
>             <renderer-type>org.apache.myfaces.Link</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>headerLink</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlHeaderLink</component-type>
>             <renderer-type>org.apache.myfaces.Link</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>dataTable</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlDataTable</component-type>
>             <renderer-type>org.apache.myfaces.Table</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputHidden</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputHidden</component-type>
>             <renderer-type>javax.faces.Hidden</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputSecret</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputSecret</component-type>
>             <renderer-type>org.apache.myfaces.Secret</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputText</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputText</component-type>
>             <renderer-type>org.apache.myfaces.Text</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputTextHelp</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
>             <renderer-type>org.apache.myfaces.TextHelp</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputTextarea</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputTextarea</component-type>
>             <renderer-type>org.apache.myfaces.Textarea</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>graphicImage</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlGraphicImage</component-type>
>             <renderer-type>org.apache.myfaces.Image</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>message</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlMessage</component-type>
>             <renderer-type>org.apache.myfaces.Message</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>messages</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlMessages</component-type>
>             <renderer-type>org.apache.myfaces.Messages</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>outputLabel</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlOutputLabel</component-type>
>             <renderer-type>javax.faces.Label</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>outputText</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlOutputText</component-type>
>             <renderer-type>org.apache.myfaces.Text</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelGrid</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
>             <renderer-type>org.apache.myfaces.Grid</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelGroup</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
>             <renderer-type>org.apache.myfaces.Group</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectOneMenu</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectOneMenu</component-type>
>             <renderer-type>org.apache.myfaces.Menu</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectManyMenu</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectManyMenu</component-type>
>             <renderer-type>org.apache.myfaces.Menu</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectOneRadio</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
>             <renderer-type>org.apache.myfaces.Radio</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectBooleanCheckbox</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectBooleanCheckbox</component-type>
>             <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectManyCheckbox</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectManyCheckbox</component-type>
>             <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectOneListbox</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectOneListbox</component-type>
>             <renderer-type>org.apache.myfaces.Listbox</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectManyListbox</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectManyListbox</component-type>
>             <renderer-type>org.apache.myfaces.Listbox</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputCalendar</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputCalendar</component-type>
>             <renderer-type>org.apache.myfaces.Calendar</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>jsValueChangeListener</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.JsValueChangeListener</component-type>
>             <renderer-type>org.apache.myfaces.JsValueChangeListener</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>jsValueSet</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlJsValueSet</component-type>
>             <renderer-type>org.apache.myfaces.JsValueSet</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>checkbox</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCheckbox</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>commandNavigation2</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCommandNavigationItem</component-type>
>             <renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>commandNavigation</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
>             <renderer-type>org.apache.myfaces.Navigation</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>commandSortHeader</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCommandSortHeader</component-type>
>             <renderer-type>org.apache.myfaces.SortHeader</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>dataList</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlDataList</component-type>
>             <renderer-type>org.apache.myfaces.List</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>dataScroller</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlDataScroller</component-type>
>             <renderer-type>org.apache.myfaces.DataScroller</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputDate</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputDate</component-type>
>             <renderer-type>org.apache.myfaces.Date</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputFileUpload</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlInputFileUpload</component-type>
>             <renderer-type>org.apache.myfaces.FileUpload</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputHtml</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.InputHtml</component-type>
>             <renderer-type>org.apache.myfaces.InputHtml</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>navigationMenuItem</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>navigationMenuItems</tag-name>
>         <component>
>             <component-type>javax.faces.SelectItems</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>jscookMenu</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.JSCookMenu</component-type>
>             <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelLayout</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelLayout</component-type>
>             <renderer-type>org.apache.myfaces.Layout</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelNavigation2</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelNavigationMenu</component-type>
>             <renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelNavigation</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
>             <renderer-type>org.apache.myfaces.Navigation</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelTab</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelTab</component-type>
>             <renderer-type>javax.faces.Group</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelTabbedPane</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelTabbedPane</component-type>
>             <renderer-type>org.apache.myfaces.TabbedPane</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>collapsiblePanel</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlCollapsiblePanel</component-type>
>             <renderer-type>org.apache.myfaces.CollapsiblePanel</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectOneCountry</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.SelectOneCountry</component-type>
>             <renderer-type>org.apache.myfaces.SelectOneCountryRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectOneLanguage</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.SelectOneLanguage</component-type>
>             <renderer-type>org.apache.myfaces.SelectOneLanguageRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>stylesheet</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Stylesheet</component-type>
>             <renderer-type>org.apache.myfaces.Stylesheet</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>div</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Div</component-type>
>             <renderer-type>org.apache.myfaces.HtmlTagRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>htmlTag</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlTag</component-type>
>             <renderer-type>org.apache.myfaces.HtmlTagRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>radio</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlRadio</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>tree</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlTree</component-type>
>             <renderer-type>org.apache.myfaces.HtmlTree</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>treeColumn</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlTreeColumn</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>treeCheckbox</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlTreeCheckbox</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>tree2</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlTree2</component-type>
>             <renderer-type>org.apache.myfaces.HtmlTree2</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>panelStack</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPanelStack</component-type>
>             <renderer-type>org.apache.myfaces.PanelStack</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>popup</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlPopup</component-type>
>             <renderer-type>org.apache.myfaces.Popup</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>newspaperTable</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
>             <renderer-type>org.apache.myfaces.HtmlNewspaperTable</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>aliasBean</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.AliasBean</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>aliasBeansScope</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.AliasBeansScope</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>buffer</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Buffer</component-type>
>             <renderer-type>org.apache.myfaces.Buffer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>saveState</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.SaveState</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>validateCreditCard</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.CreditCard</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>validateEmail</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.Email</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>validateRegExpr</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>validateEqual</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.Equal</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>swapImage</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSwapImage</component-type>
>             <renderer-type>org.apache.myfaces.SwapImage</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>columns</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlColumns</component-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>column</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlColumn</component-type>
>         </component>
>     </tag>
> </facelet-taglib>
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd" "facelet-taglib">
> <facelet-taglib>
>     <tag>
>         <tag-name>inputSuggest</tag-name>
>         <component>
>             <component-type>javax.faces.HtmlInputText</component-type>
>             <renderer-type>org.apache.myfaces.InputSuggest</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>planner</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Planner</component-type>
>             <renderer-type>org.apache.myfaces.Planner</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>schedule</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Schedule</component-type>
>             <renderer-type>org.apache.myfaces.Schedule</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputSuggestAjax</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.InputSuggestAjax</component-type>
>             <renderer-type>org.apache.myfaces.InputSuggestAjax</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>focus</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Focus</component-type>
>             <renderer-type>org.apache.myfaces.Focus</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>form</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlForm</component-type>
>             <renderer-type>org.apache.myfaces.Form</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>validateUrl</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.Url</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>validateISBN</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.ISBN</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>validateCompareTo</tag-name>
>         <validator>
>             <validator-id>org.apache.myfaces.validator.CompareTo</validator-id>
>         </validator>
>     </tag>
>     <tag>
>         <tag-name>autoUpdateDataTable</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.AutoUpdateDataTable</component-type>
>             <renderer-type>org.apache.myfaces.AutoUpdateDataTable</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>accordionPanel</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlAccordionPanel</component-type>
>             <renderer-type>org.apache.myfaces.AccordionPanel</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>fieldset</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Fieldset</component-type>
>             <renderer-type>org.apache.myfaces.FieldsetRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>graphicImageDynamic</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.GraphicImageDynamic</component-type>
>             <renderer-type>org.apache.myfaces.GraphicImageDynamicRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>effect</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.Div</component-type>
>             <renderer-type>script.aculo.us.renderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectManyPicklist</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectManyPicklist</component-type>
>             <renderer-type>org.apache.myfaces.PicklistRenderer</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectManyCheckboxAjax</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectManyCheckboxAjax</component-type>
>             <renderer-type>org.apache.myfaces.CheckboxAjax</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectOneRadioAjax</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlSelectOneRadioAjax</component-type>
>             <renderer-type>org.apache.myfaces.SelectOneRadioAjax</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>inputTextAjax</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.InputTextAjax</component-type>
>             <renderer-type>org.apache.myfaces.InputTextAjax</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectBooleanCheckboxAjax</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.SelectBooleanCheckboxAjax</component-type>
>             <renderer-type>org.apache.myfaces.CheckboxAjax</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>selectBooleanCheckboxAjax</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.SelectBooleanCheckboxAjax</component-type>
>             <renderer-type>org.apache.myfaces.CheckboxAjax</renderer-type>
>         </component>
>     </tag>
>     <tag>
>         <tag-name>message</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.HtmlMessage</component-type>
>             <renderer-type>org.apache.myfaces.MessageSandbox</renderer-type>
>         </component>
>     </tag>
> </facelet-taglib>
> 
> 
> 
> 
> 
> 
> 


Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Thomas Spiegl <th...@gmail.com>.
I just added a new build file build/facelets-build.xml, that generates the
facelets taglibs for tomahawk and sandbox.
Could someone who is using facelets have a look at the generated files
attached?

Thomas

On 12/18/05, Thomas Spiegl <th...@gmail.com> wrote:
>
> Concerining JSCookMenu:
>
> The renderer type in tomahawk.taglib.xml (http://wiki.apache.org/myfaces-data/attachments/Use_Facelets_with_Tomahawk/attachments/tomahawk.taglib.xml
> ) is missing.
>
>     <tag>
>         <tag-name>jscookMenu</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.JSCookMenu</component-type>
>             <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
>         </component>
>     </tag>
>
> Adding the renderer-type, JSCookMenu should work with facelets.
>
> Thomas
>
> On 12/17/05, Mike Kienenberger <mk...@gmail.com> wrote:
> >
> > Thomas,
> >
> > I can't say for sure which components aren't working.  All of the
> > components I'm using are working, but I'm not using all of them.
> >
> > The ones I've heard the most complaints about in the past are tree,
> > tree2, and jscookmenu.  But it's never been clear to me whether those
> > problems were solved.   Unfortunately, these aren't components I'm
> > using.
> >
> > I agree that we need some facelets examples, and at some point, I hope
> > to start converting the current examples over to jspx and then have
> > them work for both facelets and jsp with little-to-no changes, so that
> > very little effort is required to support both.
> >
> > A facelet component tag handler is the rarely-needed facelet
> > equivalent of a JSP Tag class.  Most of the time, all that's necessary
> > to use a component in facelets is to define it (associate the
> > namespace, tag name, component type, and render type together) in a
> > facelets taglib.xml file.   Facelets then works directly with the
> > component, never accessing the equivalent JSP Tag class.
> > Occasionally, a JSP tag class does something tricky, and you'll need
> > to write a facelet component tag handler.   Such a handler is
> > configured to do things like alias attributes (ie, if the user
> > specifies "showNav" for tree2, the handler could change that reference
> > to "org.apache.myfaces.tree2.SHOW_NAV"), specify method binding
> > signatures (like for "getBytesMethod" and "getContentTypeMethod"
> > attributes on graphicImageDynamic), and other weird stuff that happens
> > in Tag classes.
> >
> > If components are cleanly written (ie, no logic in the JSP tag), then
> > the only time you'd need a facelets component tag handler is to
> > specify the signature of an attribute that takes a method binding as
> > an argument.
> >
> > Sometimes, a non-component tag like updateActionListener can only be
> > implemented as a facelets tag handler (a facelets component tag
> > handler is a subclass of a facelets tag handler that's optimized for
> > dealing with components).  Andrew Robinson has written
> > updateActionListener as a facelet tag handler.
> >
> > http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?view=markup
> >
> >
> > Some might be asking what's the point if you have to rewrite facelet
> > tags.   However, most of the time, you don't need a facelet tag.   And
> > even when you do need one, the code to create it is pretty trivial
> > (one or two lines in a subclass) since the base component tag handler
> > class is rules-based, and all of the standard situations are already
> > handled with default rules.
> >
> > For instance, the tag handler for graphicImageDynamic looks like this:
> >
> >     protected MetaRuleset createMetaRuleset(Class type)
> >     {
> >         MetaRuleset m = super.createMetaRuleset(type);
> >
> >         m.addRule(new MethodRule("getBytesMethod", byte[].class, new
> > Class[0]));
> >         m.addRule(new MethodRule("getContentTypeMethod", String.class,
> > new Class[0]));
> >
> >         return m;
> >     }
> >
> > A partial tag handler for tree2 in its current state might look like
> > this:
> >
> > protected MetaRuleset createMetaRuleset(Class type) {
> >       MetaRuleset m = super.createMetaRuleset(type);
> >
> >       m.alias("showNav", "org.apache.myfaces.tree2.SHOW_NAV");
> >
> >       return m;
> > }
> >
> > As Adam mentioned before, the JSP tags for ADF Faces are about 1Mb in
> > size, but the equivalent facelet tag code is about 8k in size.
> >
> > Or to put it another way, I had the compareToValidator finished for
> > several weeks, but I was too lazy to write the JSP tag handler (I
> > didn't need a facelets tag handler) until recently.
> >
> > -Mike
> >
> > On 12/17/05, Thomas Spiegl <thomas.spiegl@gmail.com > wrote:
> > > Mike,
> > >
> > >  can you tell us which tomahawk components are not working properly
> > with
> > > facelets?
> > >
> > >  Some time ago I fixed panelNavigation2 to make it work
> > >  with facelets. I didn't test it recently, basically because I have no
> >
> > >  example application using facelets. It would be good to have
> > >  a facelets example in MyFaces.
> > >  I totally agree that taglib.xml should be created automatically.
> > > Unfortunatley
> > >  the xml definition files for code genartion are outdated or even not
> > > existend
> > >  for most tomahawk components.
> > >
> > >  What is the need for the facelet component tag handler you mentioned?
> > >
> > >  Thomas
> > >
> > >
> > >
> > > On 12/17/05, Martin Marinschek < martin.marinschek@gmail.com> wrote:
> > > > @facelets working with MyFaces:
> > > >
> > > > Well, I was under the impression (by what Jacob and Adam pointed
> > out)
> > > > that Myfaces and Facelets didn't work together exceptionally good.
> > > >
> > > > So you say it works and there are just some minor flaws?
> > > >
> > > > regards,
> > > >
> > > > Maritn
> > > >
> > > > So you are saying it works but
> > > > On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > > > Yes, they are still in old jsp format.
> > > > >
> > > > > We should rework them in jspx anyways at some point in time.
> > > > >
> > > > > regards,
> > > > >
> > > > > Martin
> > > > >
> > > > > On 12/16/05, Mike Kienenberger < mkienenb@gmail.com > wrote:
> > > > > > On 12/14/05, Martin Marinschek <ma...@gmail.com>
> > wrote:
> > > > > > > we haven't as we still have some open bugs which prevent
> > working
> > > > > > > Facelets perfectly with MyFaces. So this is a hen-egg problem.
> > If we
> > > > > > > got rid of those bugs, we'd use Facelets more, if Facelets was
> > used
> > > > > > > more, there might be someone inclined to get rid of those bugs
> > ;).
> > > > > >
> > > > > > As facelets end-user #1 (so I'm told), I can say that facelets
> > has
> > > > > > worked, and continues to work, fine with MyFaces (I have used
> > MyFaces
> > > > > > and facelets exclusively the last 6 months).   There's a few
> > tomahawk
> > > > > > and sandbox components out there that need better facelet
> > support, and
> > > > > > hopefully I can be instrumental in getting that developed, as
> > time
> > > > > > permits, but most of them work "as-is" right now.
> > > > > >
> > > > > > One of the things I'd like to see happen is to have the facelets
> > > > > > taglib.xml files generated automatically for the tomahawk and
> > sandbox
> > > > > > components.   That's probably going to require getting code
> > generation
> > > > > > working again, and I haven't had a chance to review that part of
> > the
> > > > > > project.  I think the Shale/Clay folks would like to see similar
> > > > > > functionality provided for their view handler.
> > > > > >
> > > > > > The other thing that will be helpful is to get some facelet
> > component
> > > > > > tag handler classes written and added to the myfaces codebase
> > for
> > > > > > those components that have non-ActionSource method bindings (or
> > > > > > non-pass-through Tag code behavior).   This will require a
> > build-time
> > > > > > dependency on facelets for tomahawk and sandbox, so it might
> > need to
> > > > > > be done in such a way as to make building these classes
> > optional.
> > > > > >
> > > > > > And, of course, we need some examples.   As Adam has mentioned,
> > > > > > facelet xhtml pages are so close to jspx pages that often times
> > you
> > > > > > can "convert" between the two simply by renaming them.
> > Unfortunately
> > > > > > (and I haven't looked at the examples in detail recently, so I
> > could
> > > > > > be wrong), the examples are mostly in jsp, and contain a lot of
> > > > > > embedded scriptlets.
> > > > > >
> > > > > > -Mike
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF powerhouse -
> > > > > JSF Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > >  Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> >
>
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Thomas Spiegl <th...@gmail.com>.
Concerining JSCookMenu:

The renderer type in tomahawk.taglib.xml (
http://wiki.apache.org/myfaces-data/attachments/Use_Facelets_with_Tomahawk/attachments/tomahawk.taglib.xml)
is missing.

    <tag>
        <tag-name>jscookMenu</tag-name>
        <component>
            <component-type>org.apache.myfaces.JSCookMenu</component-type>
            <renderer-type>org.apache.myfaces.JSCookMenu</renderer-type>
        </component>
    </tag>

Adding the renderer-type, JSCookMenu should work with facelets.

Thomas

On 12/17/05, Mike Kienenberger <mk...@gmail.com> wrote:
>
> Thomas,
>
> I can't say for sure which components aren't working.  All of the
> components I'm using are working, but I'm not using all of them.
>
> The ones I've heard the most complaints about in the past are tree,
> tree2, and jscookmenu.  But it's never been clear to me whether those
> problems were solved.   Unfortunately, these aren't components I'm
> using.
>
> I agree that we need some facelets examples, and at some point, I hope
> to start converting the current examples over to jspx and then have
> them work for both facelets and jsp with little-to-no changes, so that
> very little effort is required to support both.
>
> A facelet component tag handler is the rarely-needed facelet
> equivalent of a JSP Tag class.  Most of the time, all that's necessary
> to use a component in facelets is to define it (associate the
> namespace, tag name, component type, and render type together) in a
> facelets taglib.xml file.   Facelets then works directly with the
> component, never accessing the equivalent JSP Tag class.
> Occasionally, a JSP tag class does something tricky, and you'll need
> to write a facelet component tag handler.   Such a handler is
> configured to do things like alias attributes (ie, if the user
> specifies "showNav" for tree2, the handler could change that reference
> to "org.apache.myfaces.tree2.SHOW_NAV"), specify method binding
> signatures (like for "getBytesMethod" and "getContentTypeMethod"
> attributes on graphicImageDynamic), and other weird stuff that happens
> in Tag classes.
>
> If components are cleanly written (ie, no logic in the JSP tag), then
> the only time you'd need a facelets component tag handler is to
> specify the signature of an attribute that takes a method binding as
> an argument.
>
> Sometimes, a non-component tag like updateActionListener can only be
> implemented as a facelets tag handler (a facelets component tag
> handler is a subclass of a facelets tag handler that's optimized for
> dealing with components).  Andrew Robinson has written
> updateActionListener as a facelet tag handler.
>
>
> http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?view=markup
>
> Some might be asking what's the point if you have to rewrite facelet
> tags.   However, most of the time, you don't need a facelet tag.   And
> even when you do need one, the code to create it is pretty trivial
> (one or two lines in a subclass) since the base component tag handler
> class is rules-based, and all of the standard situations are already
> handled with default rules.
>
> For instance, the tag handler for graphicImageDynamic looks like this:
>
>     protected MetaRuleset createMetaRuleset(Class type)
>     {
>         MetaRuleset m = super.createMetaRuleset(type);
>
>         m.addRule(new MethodRule("getBytesMethod", byte[].class, new
> Class[0]));
>         m.addRule(new MethodRule("getContentTypeMethod", String.class,
> new Class[0]));
>
>         return m;
>     }
>
> A partial tag handler for tree2 in its current state might look like this:
>
> protected MetaRuleset createMetaRuleset(Class type) {
>       MetaRuleset m = super.createMetaRuleset(type);
>
>       m.alias("showNav", "org.apache.myfaces.tree2.SHOW_NAV");
>
>       return m;
> }
>
> As Adam mentioned before, the JSP tags for ADF Faces are about 1Mb in
> size, but the equivalent facelet tag code is about 8k in size.
>
> Or to put it another way, I had the compareToValidator finished for
> several weeks, but I was too lazy to write the JSP tag handler (I
> didn't need a facelets tag handler) until recently.
>
> -Mike
>
> On 12/17/05, Thomas Spiegl <th...@gmail.com> wrote:
> > Mike,
> >
> >  can you tell us which tomahawk components are not working properly with
> > facelets?
> >
> >  Some time ago I fixed panelNavigation2 to make it work
> >  with facelets. I didn't test it recently, basically because I have no
> >  example application using facelets. It would be good to have
> >  a facelets example in MyFaces.
> >  I totally agree that taglib.xml should be created automatically.
> > Unfortunatley
> >  the xml definition files for code genartion are outdated or even not
> > existend
> >  for most tomahawk components.
> >
> >  What is the need for the facelet component tag handler you mentioned?
> >
> >  Thomas
> >
> >
> >
> > On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > @facelets working with MyFaces:
> > >
> > > Well, I was under the impression (by what Jacob and Adam pointed out)
> > > that Myfaces and Facelets didn't work together exceptionally good.
> > >
> > > So you say it works and there are just some minor flaws?
> > >
> > > regards,
> > >
> > > Maritn
> > >
> > > So you are saying it works but
> > > On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > > Yes, they are still in old jsp format.
> > > >
> > > > We should rework them in jspx anyways at some point in time.
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > > On 12/16/05, Mike Kienenberger <mkienenb@gmail.com > wrote:
> > > > > On 12/14/05, Martin Marinschek <ma...@gmail.com>
> wrote:
> > > > > > we haven't as we still have some open bugs which prevent working
> > > > > > Facelets perfectly with MyFaces. So this is a hen-egg problem.
> If we
> > > > > > got rid of those bugs, we'd use Facelets more, if Facelets was
> used
> > > > > > more, there might be someone inclined to get rid of those bugs
> ;).
> > > > >
> > > > > As facelets end-user #1 (so I'm told), I can say that facelets has
> > > > > worked, and continues to work, fine with MyFaces (I have used
> MyFaces
> > > > > and facelets exclusively the last 6 months).   There's a few
> tomahawk
> > > > > and sandbox components out there that need better facelet support,
> and
> > > > > hopefully I can be instrumental in getting that developed, as time
> > > > > permits, but most of them work "as-is" right now.
> > > > >
> > > > > One of the things I'd like to see happen is to have the facelets
> > > > > taglib.xml files generated automatically for the tomahawk and
> sandbox
> > > > > components.   That's probably going to require getting code
> generation
> > > > > working again, and I haven't had a chance to review that part of
> the
> > > > > project.  I think the Shale/Clay folks would like to see similar
> > > > > functionality provided for their view handler.
> > > > >
> > > > > The other thing that will be helpful is to get some facelet
> component
> > > > > tag handler classes written and added to the myfaces codebase for
> > > > > those components that have non-ActionSource method bindings (or
> > > > > non-pass-through Tag code behavior).   This will require a
> build-time
> > > > > dependency on facelets for tomahawk and sandbox, so it might need
> to
> > > > > be done in such a way as to make building these classes optional.
> > > > >
> > > > > And, of course, we need some examples.   As Adam has mentioned,
> > > > > facelet xhtml pages are so close to jspx pages that often times
> you
> > > > > can "convert" between the two simply by renaming them.
> Unfortunately
> > > > > (and I haven't looked at the examples in detail recently, so I
> could
> > > > > be wrong), the examples are mostly in jsp, and contain a lot of
> > > > > embedded scriptlets.
> > > > >
> > > > > -Mike
> > > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> >  Courses in English and German
> >
> > Professional Support for Apache MyFaces
>



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Thomas Spiegl <th...@gmail.com>.
Yes, I will take care of this issue.

On 12/20/05, Matthias Wessendorf <mw...@gmail.com> wrote:
> ok mike.
>
> was only a reminder, that the ticket don't gets lost ;)
>
> -Matthias
>
> On 12/20/05, Mike Kienenberger <mk...@gmail.com> wrote:
> > On 12/19/05, Matthias Wessendorf <mw...@gmail.com> wrote:
> > > so we could resolve this ticket ?
> > >
> > > http://issues.apache.org/jira/browse/MYFACES-698
> >
> > We can't close this issue yet, but Thomas is definitely making progress on it.
> >
>
>
> --
> Matthias Wessendorf
> Zülpicher Wall 12, 239
> 50674 Köln
> http://www.wessendorf.net
> mwessendorf-at-gmail-dot-com
>


--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Matthias Wessendorf <mw...@gmail.com>.
ok mike.

was only a reminder, that the ticket don't gets lost ;)

-Matthias

On 12/20/05, Mike Kienenberger <mk...@gmail.com> wrote:
> On 12/19/05, Matthias Wessendorf <mw...@gmail.com> wrote:
> > so we could resolve this ticket ?
> >
> > http://issues.apache.org/jira/browse/MYFACES-698
>
> We can't close this issue yet, but Thomas is definitely making progress on it.
>


--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Mike Kienenberger <mk...@gmail.com>.
On 12/19/05, Matthias Wessendorf <mw...@gmail.com> wrote:
> so we could resolve this ticket ?
>
> http://issues.apache.org/jira/browse/MYFACES-698

We can't close this issue yet, but Thomas is definitely making progress on it.

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Matthias Wessendorf <mw...@gmail.com>.
Thomas.

so we could resolve this ticket ?

http://issues.apache.org/jira/browse/MYFACES-698

Regards,
Matthias

On 12/19/05, Mike Kienenberger <mk...@gmail.com> wrote:
> On 12/19/05, Thomas Spiegl <th...@gmail.com> wrote:
> >  I didn't know the ant task on SF. Would have saved some time.
>
> If I had known you were planning on writing an ant task, I would have
> mentioned it :)
>
>
> >  We should add the taghandlers to our tomahawk project by adding them to
> >  a) tomahawk/src/java
> >  b) tomahawk/src/facelets
> >  Regardless of which version we take, I think the handler should move into
> >  the same package as the component itself
> >  eg. GraphicImageDynamicComponentHandler moves into
> > org.apache.myfaces.custom.graphicimagedynamic
> > The same procedure applies for sandbox.
> >  What do you think?
>
> I think having the class in the same package is good.   I don't know
> if it's as good to have the class in the same folder.    Whatever we
> do should be generic enough so that we can support other viewhandlers
> in the future (like Shale Clay).
>
> I'm still unclear on how to deal with the new facelets jar dependency.
>
> If you'd like some examples for testing, you can get two facelet
> component handler classes for the sandbox from here (apache 2.0
> licensed), courtesy Peter Mahoney and myself:
>
> http://wiki.java.net/bin/view/Projects/FaceletsTaglibsMyfacesSandbox
>
> If you want to also make sure you're supporting non-component tag
> handlers for facelets, you can find a facelets tag handler for
> UpdateActionListener (apache 2.0 licensed) at this link, courtesy of
> Andrew Robinson:
>
> http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?rev=1.2&view=log
>
> If things slow down later this week, I will devote some time to
> converting over tomahawk and sandbox examples to facelets and jspx.
>
> As soon as we figure out how we're going to support facelets, I can
> also start adding any other needed component handlers to MyFaces.
>
> -Mike
>


--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Mike Kienenberger <mk...@gmail.com>.
On 12/19/05, Adam Winer <aw...@gmail.com> wrote:
> You (or Andrew Robinson) could check out the SetActionListenerTag code
> I contributed to Facelets at:
> https://facelets.dev.java.net/source/browse/facelets/contrib/1.4/adf/src/java/com/sun/facelets/oracle/adf/SetActionListenerTag.java?rev=1.1&view=auto&content-type=text/vnd.viewcvs-markup
>
> ... as an example of how to better take advantage of the Facelet API

Thanks, Adam.   I haven't looked at Andrew's code in detail, and I'm
not using updateActionListener myself.   When the class gets
committed, I'll add your comments to it.

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Adam Winer <aw...@gmail.com>.
Mike,

You (or Andrew Robinson) could check out the SetActionListenerTag code
I contributed to Facelets at:

https://facelets.dev.java.net/source/browse/facelets/contrib/1.4/adf/src/java/com/sun/facelets/oracle/adf/SetActionListenerTag.java?rev=1.1&view=auto&content-type=text/vnd.viewcvs-markup

... as an example of how to better take advantage of the Facelet API
to massively simplify the code, and make it much higher performance.
In particular:

 - Use the built-in ComponentSupport.isNew(UIComponent parent)
   instead of the custom sourceHasProperty() method
 - Use TagAttribute.getValueExpression() (and wrap in a ValueBinding
   adapter) instead of app.createValueBinding() (the value expressions
   are cached and reusable).

-- Adam



On 12/19/05, Mike Kienenberger <mk...@gmail.com> wrote:
> If you want to also make sure you're supporting non-component tag
> handlers for facelets, you can find a facelets tag handler for
> UpdateActionListener (apache 2.0 licensed) at this link, courtesy of
> Andrew Robinson:
>
> http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?rev=1.2&view=log

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Mike Kienenberger <mk...@gmail.com>.
On 12/19/05, Thomas Spiegl <th...@gmail.com> wrote:
>  I didn't know the ant task on SF. Would have saved some time.

If I had known you were planning on writing an ant task, I would have
mentioned it :)


>  We should add the taghandlers to our tomahawk project by adding them to
>  a) tomahawk/src/java
>  b) tomahawk/src/facelets
>  Regardless of which version we take, I think the handler should move into
>  the same package as the component itself
>  eg. GraphicImageDynamicComponentHandler moves into
> org.apache.myfaces.custom.graphicimagedynamic
> The same procedure applies for sandbox.
>  What do you think?

I think having the class in the same package is good.   I don't know
if it's as good to have the class in the same folder.    Whatever we
do should be generic enough so that we can support other viewhandlers
in the future (like Shale Clay).

I'm still unclear on how to deal with the new facelets jar dependency.

If you'd like some examples for testing, you can get two facelet
component handler classes for the sandbox from here (apache 2.0
licensed), courtesy Peter Mahoney and myself:

http://wiki.java.net/bin/view/Projects/FaceletsTaglibsMyfacesSandbox

If you want to also make sure you're supporting non-component tag
handlers for facelets, you can find a facelets tag handler for
UpdateActionListener (apache 2.0 licensed) at this link, courtesy of
Andrew Robinson:

http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?rev=1.2&view=log

If things slow down later this week, I will devote some time to
converting over tomahawk and sandbox examples to facelets and jspx.

As soon as we figure out how we're going to support facelets, I can
also start adding any other needed component handlers to MyFaces.

-Mike

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Thomas Spiegl <th...@gmail.com>.
Mike,

I didn't know the ant task on SF. Would have saved some time.
I will add the namespace to the generator and sort the tags alphabetically.

panelNavigation2 and jscookMenu share some code, but are
definitely different components.

We should add the taghandlers to our tomahawk project by adding them to
a) tomahwak/src/java
b) tomahawk/src/facelets
Regardless of which version we take, I think the handler should move into
the same
package as the component itself
eg. GraphicImageDynamicComponentHandler moves into
org.apache.myfaces.custom.graphicimagedynamic
The same procedure applys for sandbox.
What do you thnk?

Thomas

On 12/19/05, Mike Kienenberger <mk...@gmail.com> wrote:
>
> On 12/17/05, Mike Kienenberger <mk...@gmail.com> wrote:
> > The ones I've heard the most complaints about in the past are tree,
> > tree2, and jscookmenu.  But it's never been clear to me whether those
> > problems were solved.   Unfortunately, these aren't components I'm
> > using.
>
> Thomas,  I am not familiar with jscookmenu or navigationMenu[2?].
> It's possible that I'm wrongly lumping them together as one component
> set when they're parts of multiple component sets.
>



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Mike Kienenberger <mk...@gmail.com>.
On 12/17/05, Mike Kienenberger <mk...@gmail.com> wrote:
> The ones I've heard the most complaints about in the past are tree,
> tree2, and jscookmenu.  But it's never been clear to me whether those
> problems were solved.   Unfortunately, these aren't components I'm
> using.

Thomas,  I am not familiar with jscookmenu or navigationMenu[2?]. 
It's possible that I'm wrongly lumping them together as one component
set when they're parts of multiple component sets.

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Mike Kienenberger <mk...@gmail.com>.
Thomas,

I can't say for sure which components aren't working.  All of the
components I'm using are working, but I'm not using all of them.

The ones I've heard the most complaints about in the past are tree,
tree2, and jscookmenu.  But it's never been clear to me whether those
problems were solved.   Unfortunately, these aren't components I'm
using.

I agree that we need some facelets examples, and at some point, I hope
to start converting the current examples over to jspx and then have
them work for both facelets and jsp with little-to-no changes, so that
very little effort is required to support both.

A facelet component tag handler is the rarely-needed facelet
equivalent of a JSP Tag class.  Most of the time, all that's necessary
to use a component in facelets is to define it (associate the
namespace, tag name, component type, and render type together) in a
facelets taglib.xml file.   Facelets then works directly with the
component, never accessing the equivalent JSP Tag class.   
Occasionally, a JSP tag class does something tricky, and you'll need
to write a facelet component tag handler.   Such a handler is
configured to do things like alias attributes (ie, if the user
specifies "showNav" for tree2, the handler could change that reference
to "org.apache.myfaces.tree2.SHOW_NAV"), specify method binding
signatures (like for "getBytesMethod" and "getContentTypeMethod"
attributes on graphicImageDynamic), and other weird stuff that happens
in Tag classes.

If components are cleanly written (ie, no logic in the JSP tag), then
the only time you'd need a facelets component tag handler is to
specify the signature of an attribute that takes a method binding as
an argument.

Sometimes, a non-component tag like updateActionListener can only be
implemented as a facelets tag handler (a facelets component tag
handler is a subclass of a facelets tag handler that's optimized for
dealing with components).  Andrew Robinson has written
updateActionListener as a facelet tag handler.

http://cvs.sourceforge.net/viewcvs.py/jsf-comp/facelets/tagHandlers/src/net/sf/jsfcomp/facelets/taghandlers/tomahawk/UpdateActionListenerHandler.java?view=markup

Some might be asking what's the point if you have to rewrite facelet
tags.   However, most of the time, you don't need a facelet tag.   And
even when you do need one, the code to create it is pretty trivial
(one or two lines in a subclass) since the base component tag handler
class is rules-based, and all of the standard situations are already
handled with default rules.

For instance, the tag handler for graphicImageDynamic looks like this:

    protected MetaRuleset createMetaRuleset(Class type)
    {
        MetaRuleset m = super.createMetaRuleset(type);

        m.addRule(new MethodRule("getBytesMethod", byte[].class, new Class[0]));
        m.addRule(new MethodRule("getContentTypeMethod", String.class,
new Class[0]));

        return m;
    }

A partial tag handler for tree2 in its current state might look like this:

 protected MetaRuleset createMetaRuleset(Class type) {
      MetaRuleset m = super.createMetaRuleset(type);

      m.alias("showNav", "org.apache.myfaces.tree2.SHOW_NAV");

      return m;
}

As Adam mentioned before, the JSP tags for ADF Faces are about 1Mb in
size, but the equivalent facelet tag code is about 8k in size.

Or to put it another way, I had the compareToValidator finished for
several weeks, but I was too lazy to write the JSP tag handler (I
didn't need a facelets tag handler) until recently.

-Mike

On 12/17/05, Thomas Spiegl <th...@gmail.com> wrote:
> Mike,
>
>  can you tell us which tomahawk components are not working properly with
> facelets?
>
>  Some time ago I fixed panelNavigation2 to make it work
>  with facelets. I didn't test it recently, basically because I have no
>  example application using facelets. It would be good to have
>  a facelets example in MyFaces.
>  I totally agree that taglib.xml should be created automatically.
> Unfortunatley
>  the xml definition files for code genartion are outdated or even not
> existend
>  for most tomahawk components.
>
>  What is the need for the facelet component tag handler you mentioned?
>
>  Thomas
>
>
>
> On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> > @facelets working with MyFaces:
> >
> > Well, I was under the impression (by what Jacob and Adam pointed out)
> > that Myfaces and Facelets didn't work together exceptionally good.
> >
> > So you say it works and there are just some minor flaws?
> >
> > regards,
> >
> > Maritn
> >
> > So you are saying it works but
> > On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > Yes, they are still in old jsp format.
> > >
> > > We should rework them in jspx anyways at some point in time.
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 12/16/05, Mike Kienenberger <mkienenb@gmail.com > wrote:
> > > > On 12/14/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > > > we haven't as we still have some open bugs which prevent working
> > > > > Facelets perfectly with MyFaces. So this is a hen-egg problem. If we
> > > > > got rid of those bugs, we'd use Facelets more, if Facelets was used
> > > > > more, there might be someone inclined to get rid of those bugs ;).
> > > >
> > > > As facelets end-user #1 (so I'm told), I can say that facelets has
> > > > worked, and continues to work, fine with MyFaces (I have used MyFaces
> > > > and facelets exclusively the last 6 months).   There's a few tomahawk
> > > > and sandbox components out there that need better facelet support, and
> > > > hopefully I can be instrumental in getting that developed, as time
> > > > permits, but most of them work "as-is" right now.
> > > >
> > > > One of the things I'd like to see happen is to have the facelets
> > > > taglib.xml files generated automatically for the tomahawk and sandbox
> > > > components.   That's probably going to require getting code generation
> > > > working again, and I haven't had a chance to review that part of the
> > > > project.  I think the Shale/Clay folks would like to see similar
> > > > functionality provided for their view handler.
> > > >
> > > > The other thing that will be helpful is to get some facelet component
> > > > tag handler classes written and added to the myfaces codebase for
> > > > those components that have non-ActionSource method bindings (or
> > > > non-pass-through Tag code behavior).   This will require a build-time
> > > > dependency on facelets for tomahawk and sandbox, so it might need to
> > > > be done in such a way as to make building these classes optional.
> > > >
> > > > And, of course, we need some examples.   As Adam has mentioned,
> > > > facelet xhtml pages are so close to jspx pages that often times you
> > > > can "convert" between the two simply by renaming them.   Unfortunately
> > > > (and I haven't looked at the examples in detail recently, so I could
> > > > be wrong), the examples are mostly in jsp, and contain a lot of
> > > > embedded scriptlets.
> > > >
> > > > -Mike
> > > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
>  Courses in English and German
>
> Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Thomas Spiegl <th...@gmail.com>.
Mike,

can you tell us which tomahawk components are not working properly with
facelets?

Some time ago I fixed panelNavigation2 to make it work
with facelets. I didn't test it recently, basically because I have no
example application using facelets. It would be good to have
a facelets example in MyFaces.
I totally agree that taglib.xml should be created automatically.
Unfortunatley
the xml definition files for code genartion are outdated or even not
existend
for most tomahawk components.

What is the need for the facelet component tag handler you mentioned?

Thomas

On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
>
> @facelets working with MyFaces:
>
> Well, I was under the impression (by what Jacob and Adam pointed out)
> that Myfaces and Facelets didn't work together exceptionally good.
>
> So you say it works and there are just some minor flaws?
>
> regards,
>
> Maritn
>
> So you are saying it works but
> On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> > Yes, they are still in old jsp format.
> >
> > We should rework them in jspx anyways at some point in time.
> >
> > regards,
> >
> > Martin
> >
> > On 12/16/05, Mike Kienenberger <mk...@gmail.com> wrote:
> > > On 12/14/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > > we haven't as we still have some open bugs which prevent working
> > > > Facelets perfectly with MyFaces. So this is a hen-egg problem. If we
> > > > got rid of those bugs, we'd use Facelets more, if Facelets was used
> > > > more, there might be someone inclined to get rid of those bugs ;).
> > >
> > > As facelets end-user #1 (so I'm told), I can say that facelets has
> > > worked, and continues to work, fine with MyFaces (I have used MyFaces
> > > and facelets exclusively the last 6 months).   There's a few tomahawk
> > > and sandbox components out there that need better facelet support, and
> > > hopefully I can be instrumental in getting that developed, as time
> > > permits, but most of them work "as-is" right now.
> > >
> > > One of the things I'd like to see happen is to have the facelets
> > > taglib.xml files generated automatically for the tomahawk and sandbox
> > > components.   That's probably going to require getting code generation
> > > working again, and I haven't had a chance to review that part of the
> > > project.  I think the Shale/Clay folks would like to see similar
> > > functionality provided for their view handler.
> > >
> > > The other thing that will be helpful is to get some facelet component
> > > tag handler classes written and added to the myfaces codebase for
> > > those components that have non-ActionSource method bindings (or
> > > non-pass-through Tag code behavior).   This will require a build-time
> > > dependency on facelets for tomahawk and sandbox, so it might need to
> > > be done in such a way as to make building these classes optional.
> > >
> > > And, of course, we need some examples.   As Adam has mentioned,
> > > facelet xhtml pages are so close to jspx pages that often times you
> > > can "convert" between the two simply by renaming them.   Unfortunately
> > > (and I haven't looked at the examples in detail recently, so I could
> > > be wrong), the examples are mostly in jsp, and contain a lot of
> > > embedded scriptlets.
> > >
> > > -Mike
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Martin Marinschek <ma...@gmail.com>.
@facelets working with MyFaces:

Well, I was under the impression (by what Jacob and Adam pointed out)
that Myfaces and Facelets didn't work together exceptionally good.

So you say it works and there are just some minor flaws?

regards,

Maritn

So you are saying it works but
On 12/17/05, Martin Marinschek <ma...@gmail.com> wrote:
> Yes, they are still in old jsp format.
>
> We should rework them in jspx anyways at some point in time.
>
> regards,
>
> Martin
>
> On 12/16/05, Mike Kienenberger <mk...@gmail.com> wrote:
> > On 12/14/05, Martin Marinschek <ma...@gmail.com> wrote:
> > > we haven't as we still have some open bugs which prevent working
> > > Facelets perfectly with MyFaces. So this is a hen-egg problem. If we
> > > got rid of those bugs, we'd use Facelets more, if Facelets was used
> > > more, there might be someone inclined to get rid of those bugs ;).
> >
> > As facelets end-user #1 (so I'm told), I can say that facelets has
> > worked, and continues to work, fine with MyFaces (I have used MyFaces
> > and facelets exclusively the last 6 months).   There's a few tomahawk
> > and sandbox components out there that need better facelet support, and
> > hopefully I can be instrumental in getting that developed, as time
> > permits, but most of them work "as-is" right now.
> >
> > One of the things I'd like to see happen is to have the facelets
> > taglib.xml files generated automatically for the tomahawk and sandbox
> > components.   That's probably going to require getting code generation
> > working again, and I haven't had a chance to review that part of the
> > project.  I think the Shale/Clay folks would like to see similar
> > functionality provided for their view handler.
> >
> > The other thing that will be helpful is to get some facelet component
> > tag handler classes written and added to the myfaces codebase for
> > those components that have non-ActionSource method bindings (or
> > non-pass-through Tag code behavior).   This will require a build-time
> > dependency on facelets for tomahawk and sandbox, so it might need to
> > be done in such a way as to make building these classes optional.
> >
> > And, of course, we need some examples.   As Adam has mentioned,
> > facelet xhtml pages are so close to jspx pages that often times you
> > can "convert" between the two simply by renaming them.   Unfortunately
> > (and I haven't looked at the examples in detail recently, so I could
> > be wrong), the examples are mostly in jsp, and contain a lot of
> > embedded scriptlets.
> >
> > -Mike
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Facelet support in MyFaces [Was: svn commit: r356552 - in /incubator/tobago/trunk: src/site/fml/faq.fml tobago-theme/tobago-theme-richmond/pom.xml]

Posted by Martin Marinschek <ma...@gmail.com>.
Yes, they are still in old jsp format.

We should rework them in jspx anyways at some point in time.

regards,

Martin

On 12/16/05, Mike Kienenberger <mk...@gmail.com> wrote:
> On 12/14/05, Martin Marinschek <ma...@gmail.com> wrote:
> > we haven't as we still have some open bugs which prevent working
> > Facelets perfectly with MyFaces. So this is a hen-egg problem. If we
> > got rid of those bugs, we'd use Facelets more, if Facelets was used
> > more, there might be someone inclined to get rid of those bugs ;).
>
> As facelets end-user #1 (so I'm told), I can say that facelets has
> worked, and continues to work, fine with MyFaces (I have used MyFaces
> and facelets exclusively the last 6 months).   There's a few tomahawk
> and sandbox components out there that need better facelet support, and
> hopefully I can be instrumental in getting that developed, as time
> permits, but most of them work "as-is" right now.
>
> One of the things I'd like to see happen is to have the facelets
> taglib.xml files generated automatically for the tomahawk and sandbox
> components.   That's probably going to require getting code generation
> working again, and I haven't had a chance to review that part of the
> project.  I think the Shale/Clay folks would like to see similar
> functionality provided for their view handler.
>
> The other thing that will be helpful is to get some facelet component
> tag handler classes written and added to the myfaces codebase for
> those components that have non-ActionSource method bindings (or
> non-pass-through Tag code behavior).   This will require a build-time
> dependency on facelets for tomahawk and sandbox, so it might need to
> be done in such a way as to make building these classes optional.
>
> And, of course, we need some examples.   As Adam has mentioned,
> facelet xhtml pages are so close to jspx pages that often times you
> can "convert" between the two simply by renaming them.   Unfortunately
> (and I haven't looked at the examples in detail recently, so I could
> be wrong), the examples are mostly in jsp, and contain a lot of
> embedded scriptlets.
>
> -Mike
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces