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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED] > 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 < [EMAIL PROTECTED] > 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 < [EMAIL PROTECTED]> 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 < [EMAIL PROTECTED]> 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 < [EMAIL PROTECTED] > wrote:
> > > > > > > On 12/14/05, Martin Marinschek < [EMAIL PROTECTED]>
> 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
>

Reply via email to