You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by alexeinov <al...@combitech.se> on 2006/09/20 11:03:13 UTC

JScookMenu is not rendered with Facelets

I'm trying to use JSCookMenu in an application that is based on Trinidad and
Facelets, it does not work.

JScookMenu will not render at all. I followed recommendations of MyFaces
Wiki  http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk
Use_Facelets_with_Tomahawk  and included tomahawk.taglib.xml in my WEB-INF.
After that, I checked if other Tomahawk components work, they did work. I
checked if JSCookMenu works at all with Trinidad. 

I switched off Facelets and put the same menu sample into JSP, it did work.
That made me think that it's a combination of JSCookMenu and Facelets that
does not get along well. Have anybody experienced the same problem?

Here is my facelet that does not work
<html xmlns="http://www.w3.org/1999/xhtml"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
	  			xmlns:t="http://myfaces.apache.org/tomahawk">
<body>
	<h:form>
    <t:jscookMenu layout="hbr" theme="ThemeOffice"
styleLocation="css/jscookmenu">
    <t:navigationMenuItem id="nav_53"
        itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
/>

	</t:jscookMenu>
	</h:form>
</body>
</html>

And JSP that works
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<html>
<body>
<f:view>
	<h:form>
    <t:jscookMenu layout="hbr" theme="ThemeOffice"
styleLocation="css/jscookmenu">
    <t:navigationMenuItem id="nav_53"
        itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
/>

	</t:jscookMenu>
	</h:form>
</f:view>
</body>
</html>
-- 
View this message in context: http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.html#a6404005
Sent from the My Faces - Dev mailing list archive at Nabble.com.


RE: JScookMenu is not rendered with Facelets

Posted by Tom Innes <To...@allTiers.com>.
1.15 Snapshot from about a month ago and Extension Filter is active.

Tom

-----Original Message-----
From: Thomas Spiegl [mailto:thomas.spiegl@gmail.com] 
Sent: Wednesday, September 20, 2006 10:23 AM
To: MyFaces Development
Subject: Re: JScookMenu is not rendered with Facelets

Which MyFaces version do you use? Is the MyFaces ExtensionFilter active?

On 9/20/06, Tom Innes <To...@alltiers.com> wrote:
> I can't speak for Trinidad by I have JSCookMenu working with Facelets.
>
> There is a bug however if you try to override the Stylesheet.
>
> Look at https://issues.apache.org/jira/browse/TOMAHAWK-575 which describes
> how to work around this issue.
>
> Also look at
>
http://www.nabble.com/JSCookMenu-Stylesheet-and-Facelets-Problem-tf2274040.h
> tml#a6314425
>
> Tom
>
>
>
> -----Original Message-----
> From: alexeinov [mailto:alexei.novikov@combitech.se]
> Sent: Wednesday, September 20, 2006 5:03 AM
> To: dev@myfaces.apache.org
> Subject: JScookMenu is not rendered with Facelets
>
>
> I'm trying to use JSCookMenu in an application that is based on Trinidad
and
> Facelets, it does not work.
>
> JScookMenu will not render at all. I followed recommendations of MyFaces
> Wiki  http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk
> Use_Facelets_with_Tomahawk  and included tomahawk.taglib.xml in my
WEB-INF.
> After that, I checked if other Tomahawk components work, they did work. I
> checked if JSCookMenu works at all with Trinidad.
>
> I switched off Facelets and put the same menu sample into JSP, it did
work.
> That made me think that it's a combination of JSCookMenu and Facelets that
> does not get along well. Have anybody experienced the same problem?
>
> Here is my facelet that does not work
> <html xmlns="http://www.w3.org/1999/xhtml"
>                                 xmlns:h="http://java.sun.com/jsf/html"
>                                 xmlns:f="http://java.sun.com/jsf/core"
>
> xmlns:t="http://myfaces.apache.org/tomahawk">
> <body>
>         <h:form>
>     <t:jscookMenu layout="hbr" theme="ThemeOffice"
> styleLocation="css/jscookmenu">
>     <t:navigationMenuItem id="nav_53"
>         itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
> />
>
>         </t:jscookMenu>
>         </h:form>
> </body>
> </html>
>
> And JSP that works
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
>
> <html>
> <body>
> <f:view>
>         <h:form>
>     <t:jscookMenu layout="hbr" theme="ThemeOffice"
> styleLocation="css/jscookmenu">
>     <t:navigationMenuItem id="nav_53"
>         itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
> />
>
>         </t:jscookMenu>
>         </h:form>
> </f:view>
> </body>
> </html>
> --
> View this message in context:
>
http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.htm
> l#a6404005
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>
>


-- 
http://www.irian.at

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

Professional Support for Apache MyFaces


Re: JScookMenu is not rendered with Facelets

Posted by Thomas Spiegl <th...@gmail.com>.
Which MyFaces version do you use? Is the MyFaces ExtensionFilter active?

On 9/20/06, Tom Innes <To...@alltiers.com> wrote:
> I can't speak for Trinidad by I have JSCookMenu working with Facelets.
>
> There is a bug however if you try to override the Stylesheet.
>
> Look at https://issues.apache.org/jira/browse/TOMAHAWK-575 which describes
> how to work around this issue.
>
> Also look at
> http://www.nabble.com/JSCookMenu-Stylesheet-and-Facelets-Problem-tf2274040.h
> tml#a6314425
>
> Tom
>
>
>
> -----Original Message-----
> From: alexeinov [mailto:alexei.novikov@combitech.se]
> Sent: Wednesday, September 20, 2006 5:03 AM
> To: dev@myfaces.apache.org
> Subject: JScookMenu is not rendered with Facelets
>
>
> I'm trying to use JSCookMenu in an application that is based on Trinidad and
> Facelets, it does not work.
>
> JScookMenu will not render at all. I followed recommendations of MyFaces
> Wiki  http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk
> Use_Facelets_with_Tomahawk  and included tomahawk.taglib.xml in my WEB-INF.
> After that, I checked if other Tomahawk components work, they did work. I
> checked if JSCookMenu works at all with Trinidad.
>
> I switched off Facelets and put the same menu sample into JSP, it did work.
> That made me think that it's a combination of JSCookMenu and Facelets that
> does not get along well. Have anybody experienced the same problem?
>
> Here is my facelet that does not work
> <html xmlns="http://www.w3.org/1999/xhtml"
>                                 xmlns:h="http://java.sun.com/jsf/html"
>                                 xmlns:f="http://java.sun.com/jsf/core"
>
> xmlns:t="http://myfaces.apache.org/tomahawk">
> <body>
>         <h:form>
>     <t:jscookMenu layout="hbr" theme="ThemeOffice"
> styleLocation="css/jscookmenu">
>     <t:navigationMenuItem id="nav_53"
>         itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
> />
>
>         </t:jscookMenu>
>         </h:form>
> </body>
> </html>
>
> And JSP that works
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
>
> <html>
> <body>
> <f:view>
>         <h:form>
>     <t:jscookMenu layout="hbr" theme="ThemeOffice"
> styleLocation="css/jscookmenu">
>     <t:navigationMenuItem id="nav_53"
>         itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
> />
>
>         </t:jscookMenu>
>         </h:form>
> </f:view>
> </body>
> </html>
> --
> View this message in context:
> http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.htm
> l#a6404005
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>
>


-- 
http://www.irian.at

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

Professional Support for Apache MyFaces

Re: JScookMenu is not rendered with Facelets

Posted by alexeinov <al...@combitech.se>.


Martin Marinschek wrote:
> 
> Pleaaaseee put the fix back in the wiki as well.
> 

As I discovered now, there already is a fixed version of a taglib there. It
was just very stupid of me not to notice it :(

/Alexei
-- 
View this message in context: http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.html#a6428171
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: JScookMenu is not rendered with Facelets

Posted by Martin Marinschek <ma...@gmail.com>.
Pleaaaseee put the fix back in the wiki as well.

regards,

Martin

On 9/21/06, alexeinov <al...@combitech.se> wrote:
>
>
>
> Thomas Spiegl wrote:
> >
> > So now we got it. The rederer-type is missing in your
> > /WEB-INF/tomahawk.taglib.xml
> >
>
> Bingo! It was that. I took taglib from MyFaces Wiki, and the renderer-type
> was missing in it for some reason.
>
> Thanks a lot Thomas!
> You saved my day.
>
> /Alexei
> --
> View this message in context: http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.html#a6426441
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>


-- 

http://www.irian.at

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

Professional Support for Apache MyFaces

Re: JScookMenu is not rendered with Facelets

Posted by alexeinov <al...@combitech.se>.


Thomas Spiegl wrote:
> 
> So now we got it. The rederer-type is missing in your
> /WEB-INF/tomahawk.taglib.xml
> 

Bingo! It was that. I took taglib from MyFaces Wiki, and the renderer-type
was missing in it for some reason.

Thanks a lot Thomas! 
You saved my day.

/Alexei
-- 
View this message in context: http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.html#a6426441
Sent from the My Faces - Dev mailing list archive at Nabble.com.


Re: JScookMenu is not rendered with Facelets

Posted by Thomas Spiegl <th...@gmail.com>.
So now we got it. The rederer-type is missing in your
/WEB-INF/tomahawk.taglib.xml

<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>

-Thomas

On 9/21/06, alexeinov <al...@combitech.se> wrote:
>
>
>
> Tom Innes wrote:
> >
> >
> > There is a bug however if you try to override the Stylesheet.
> >
> >
>
> Thanks for reply, Tom. My problem is that the menu is not rendered at all.
> The following line of HTML is all that I get in the rendered page:
> <!-- Start: javax.faces.Command["_id0"] --><input id="_id0" name="_id0"
> type="submit" value="">
>
> I never come to the point where the stylesheet could be a problem. Anyway, I
> applied the fix suggested in
> https://issues.apache.org/jira/browse/TOMAHAWK-575 but it does not change
> anything.
>
> I tried MyFaces and Tomahawk both 1.1.3 and 1.1.5 snapshot - same result.
>
> There must be something special about Facelets and JSCookMenu that I'm
> missing. The tag is described in /WEB-INF/tomahawk.taglib.xml as
>
>     <tag>
>         <tag-name>jscookMenu</tag-name>
>         <component>
>             <component-type>org.apache.myfaces.JSCookMenu</component-type>
>         </component>
>     </tag>
>
> faces-config definse JSCookMenu as
> <component>
> <component-type>org.apache.myfaces.JSCookMenu</component-type>
> <component-class>org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu</component-class>
> </component>
>
> Still something is wrong
> --
> View this message in context: http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.html#a6423955
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>


-- 
http://www.irian.at

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

Professional Support for Apache MyFaces

RE: JScookMenu is not rendered with Facelets

Posted by alexeinov <al...@combitech.se>.


Tom Innes wrote:
> 
> 
> There is a bug however if you try to override the Stylesheet.
> 
> 

Thanks for reply, Tom. My problem is that the menu is not rendered at all.
The following line of HTML is all that I get in the rendered page:
<!-- Start: javax.faces.Command["_id0"] --><input id="_id0" name="_id0"
type="submit" value="">

I never come to the point where the stylesheet could be a problem. Anyway, I
applied the fix suggested in
https://issues.apache.org/jira/browse/TOMAHAWK-575 but it does not change
anything.

I tried MyFaces and Tomahawk both 1.1.3 and 1.1.5 snapshot - same result.

There must be something special about Facelets and JSCookMenu that I'm
missing. The tag is described in /WEB-INF/tomahawk.taglib.xml as

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

faces-config definse JSCookMenu as
<component>
<component-type>org.apache.myfaces.JSCookMenu</component-type>
<component-class>org.apache.myfaces.custom.navmenu.jscookmenu.HtmlCommandJSCookMenu</component-class>
</component>

Still something is wrong
-- 
View this message in context: http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.html#a6423955
Sent from the My Faces - Dev mailing list archive at Nabble.com.


RE: JScookMenu is not rendered with Facelets

Posted by Tom Innes <To...@allTiers.com>.
I can't speak for Trinidad by I have JSCookMenu working with Facelets.

There is a bug however if you try to override the Stylesheet.

Look at https://issues.apache.org/jira/browse/TOMAHAWK-575 which describes
how to work around this issue. 

Also look at
http://www.nabble.com/JSCookMenu-Stylesheet-and-Facelets-Problem-tf2274040.h
tml#a6314425

Tom



-----Original Message-----
From: alexeinov [mailto:alexei.novikov@combitech.se] 
Sent: Wednesday, September 20, 2006 5:03 AM
To: dev@myfaces.apache.org
Subject: JScookMenu is not rendered with Facelets


I'm trying to use JSCookMenu in an application that is based on Trinidad and
Facelets, it does not work.

JScookMenu will not render at all. I followed recommendations of MyFaces
Wiki  http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk
Use_Facelets_with_Tomahawk  and included tomahawk.taglib.xml in my WEB-INF.
After that, I checked if other Tomahawk components work, they did work. I
checked if JSCookMenu works at all with Trinidad. 

I switched off Facelets and put the same menu sample into JSP, it did work.
That made me think that it's a combination of JSCookMenu and Facelets that
does not get along well. Have anybody experienced the same problem?

Here is my facelet that does not work
<html xmlns="http://www.w3.org/1999/xhtml"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
	
xmlns:t="http://myfaces.apache.org/tomahawk">
<body>
	<h:form>
    <t:jscookMenu layout="hbr" theme="ThemeOffice"
styleLocation="css/jscookmenu">
    <t:navigationMenuItem id="nav_53"
        itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
/>

	</t:jscookMenu>
	</h:form>
</body>
</html>

And JSP that works
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<html>
<body>
<f:view>
	<h:form>
    <t:jscookMenu layout="hbr" theme="ThemeOffice"
styleLocation="css/jscookmenu">
    <t:navigationMenuItem id="nav_53"
        itemLabel="Apache MyFaces Home" action="http://myfaces.apache.org"
/>

	</t:jscookMenu>
	</h:form>
</f:view>
</body>
</html>
-- 
View this message in context:
http://www.nabble.com/JScookMenu-is-not-rendered-with-Facelets-tf2303975.htm
l#a6404005
Sent from the My Faces - Dev mailing list archive at Nabble.com.