You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Steve Olson <s....@charter.net> on 2006/12/17 04:17:46 UTC
Clay, Tomahawk and jscookmenu
I'm exploring Clay and Shale and have been trying to use jscookmenu (Clay 1.0.3 and Tomahawk 1.1.3) and am having trouble. I've only tried a few Tomahawk components so far, and the ones I've tried work fine except for jscookmenu. Are there any examples around of Clay using jscookmenu?
SV: Clay, Tomahawk and jscookmenu
Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi
Your assumptions are correct. As I stated in my first mail, I had to do some
tweaks. In the jscookmenu that comes with tomahawk 1.3 there are some coding
errors/presumptions that need to be worked around. Mainly, assumptions about
where pages are situated relative to the jscookmenu stuff. That is why I
grabbed the script from the originators of jscookmenu and used that script
instead (Also had to alter some hardcoded stuff in there).
I have not had the time to look into 1.5 of Tomahawk yet to see if that
version works better that the 1.3 version, but I have it on my agenda to do
so during the upcomming holidays. If there are issues related to Clay, I
will try to identify and rectify them.
Hermod
-----Opprinnelig melding-----
Fra: Steve Olson [mailto:s.olson@charter.net]
Sendt: 17. desember 2006 17:55
Til: user@shale.apache.org
Emne: Re: Clay, Tomahawk and jscookmenu
Thanks for the info. I looked at both the code below and your site, and
have a couple questions. It looks like you had to essentially render your
own menu, as if the jscookmenu renderer wasn't used. Also the call to
cmDrawFromText - the jscookmenu.js that comes with the tomahawk 1.1.3 jar
doesn't seem to define cmDrawFromText. I can see on the jscook site that
this is a valid function so are you using a newer jscook version than the
tomhawk jar does, or am I just missing something?
Also, it looked like you had to extract the resources (.js, .gif, etc) for
jscookmenu from the tomahawk jar into your own directories and explicitly
include them, as if org.apache.myfaces.webapp.filter.ExtensionsFilter also
wasn't working. Is that what you had to do? Am I understanding things
correctly here?
I was hoping to get html something like this working, but this just renders
a default submit Query button as an input control (!?):
<span jsfid="t:jscookMenu" layout="vbr" id="mainMenu" rendered="true"
theme="ThemeOffice">
<span jsfid="t:navigationMenuItem" value="#{messages['menu1']}">
<span jsfid="t:navigationMenuItem" id="menu1" itemLabel="label1"
itemValue="#{messages['menu1']}" action="#{homePage.menu1}"/>
<span jsfid="t:navigationMenuItem" split="true"/>
<span jsfid="t:navigationMenuItem" id="menu2" itemLabel="label2"
itemValue="#{messages['menu2']}" action="#{homePage.menu2}"/>
</span>
</span>
It'd be nice if this would rely on the tomahawk infastructure to provide the
same rendering it does without using Clay. Is there a conflict/bug here
between Clay and tomahawk with how it renders jscookmenu controls?
If this is a bug or an RFE, I don't see anything listed in the Shale Jira.
I'm also assuming this is a Clay issue, since it works in JSP, but maybe
that's a bad assumption :-). Anyway, I have some time available and would
be interested in contributing a patch (assuming I can figure one out :-) if
that would be useful.
Do you agree that this is a Clay bug? Do you know of anyone else already
looking into this? Should this be a new clay Jira issue?
----- Original Message -----
From: "Hermod Opstvedt" <he...@opstvedt.com>
To: <us...@shale.apache.org>
Sent: Sunday, December 17, 2006 7:29 AM
Subject: SV: Clay, Tomahawk and jscookmenu
> Hi
>
> Look at http://test.os-seilforening.org. This uses the aforementioned
> combination. However, I had to tweak it a bit to get it working.
>
> Here is the code:
>
> <div id="globalNavMenu">
> <ul style="visibility: hidden">
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/index.xml"
> target="_self" alt="#{messages['nav_Home.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Home']}"></span>
> </span>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/medlem.xml"
> target="_self" alt="#{messages['nav_Medlem.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Medlem']}"></span>
> </span>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/regatta.xml"
> target="_self" alt="#{messages['nav_Regatta.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta']}"></span>
> </span>
> <ul>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=O2" target="_self" alt="#{messages['nav_Regatta_Otto.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Otto']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=SF" target="_self"
> alt="#{messages['nav_Regatta_Snoefoeyka.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Snoefoeyka']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=TV" target="_self" alt="#{messages['nav_Regatta_Trimvar.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Trimvar']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=KF" target="_self" alt="#{messages['nav_Regatta_Kors.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Kors']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=HU" target="_self"
> alt="#{messages['nav_Regatta_Huftaroey.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Huftaroey']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=TH" target="_self" alt="#{messages['nav_Regatta_Trimhost.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Trimhost']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
>
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=OM" target="_self" alt="#{messages['nav_Regatta_Osmest.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Osmest']}"></span>
> </span>
> </li>
> </ul>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/havna.xml"
> target="_self" alt="#{messages['nav_Havna.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Havna']}"></span>
> </span>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/jolle.xml"
> target="_self" alt="#{messages['nav_Jolle.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Jolle']}"></span>
> </span>
> </li>
> </ul>
> </div> <!-- end globalNavMenu -->
>
> <script type="text/javascript">
> // <![CDATA[
> cmDrawFromText ('globalNavMenu', 'hbr', cmThemeOffice,
> 'ThemeOffice');
> // ]]>
> </script>
>
> Hermod
>
> -----Opprinnelig melding-----
> Fra: Steve Olson [mailto:s.olson@charter.net]
> Sendt: 17. desember 2006 04:18
> Til: user@shale.apache.org
> Emne: Clay, Tomahawk and jscookmenu
>
> I'm exploring Clay and Shale and have been trying to use jscookmenu (Clay
> 1.0.3 and Tomahawk 1.1.3) and am having trouble. I've only tried a few
> Tomahawk components so far, and the ones I've tried work fine except for
> jscookmenu. Are there any examples around of Clay using jscookmenu?
>
Re: Clay, Tomahawk and jscookmenu
Posted by Steve Olson <s....@charter.net>.
Thanks for the info. I looked at both the code below and your site, and
have a couple questions. It looks like you had to essentially render your
own menu, as if the jscookmenu renderer wasn't used. Also the call to
cmDrawFromText - the jscookmenu.js that comes with the tomahawk 1.1.3 jar
doesn't seem to define cmDrawFromText. I can see on the jscook site that
this is a valid function so are you using a newer jscook version than the
tomhawk jar does, or am I just missing something?
Also, it looked like you had to extract the resources (.js, .gif, etc) for
jscookmenu from the tomahawk jar into your own directories and explicitly
include them, as if org.apache.myfaces.webapp.filter.ExtensionsFilter also
wasn't working. Is that what you had to do? Am I understanding things
correctly here?
I was hoping to get html something like this working, but this just renders
a default submit Query button as an input control (!?):
<span jsfid="t:jscookMenu" layout="vbr" id="mainMenu" rendered="true"
theme="ThemeOffice">
<span jsfid="t:navigationMenuItem" value="#{messages['menu1']}">
<span jsfid="t:navigationMenuItem" id="menu1" itemLabel="label1"
itemValue="#{messages['menu1']}" action="#{homePage.menu1}"/>
<span jsfid="t:navigationMenuItem" split="true"/>
<span jsfid="t:navigationMenuItem" id="menu2" itemLabel="label2"
itemValue="#{messages['menu2']}" action="#{homePage.menu2}"/>
</span>
</span>
It'd be nice if this would rely on the tomahawk infastructure to provide the
same rendering it does without using Clay. Is there a conflict/bug here
between Clay and tomahawk with how it renders jscookmenu controls?
If this is a bug or an RFE, I don't see anything listed in the Shale Jira.
I'm also assuming this is a Clay issue, since it works in JSP, but maybe
that's a bad assumption :-). Anyway, I have some time available and would
be interested in contributing a patch (assuming I can figure one out :-) if
that would be useful.
Do you agree that this is a Clay bug? Do you know of anyone else already
looking into this? Should this be a new clay Jira issue?
----- Original Message -----
From: "Hermod Opstvedt" <he...@opstvedt.com>
To: <us...@shale.apache.org>
Sent: Sunday, December 17, 2006 7:29 AM
Subject: SV: Clay, Tomahawk and jscookmenu
> Hi
>
> Look at http://test.os-seilforening.org. This uses the aforementioned
> combination. However, I had to tweak it a bit to get it working.
>
> Here is the code:
>
> <div id="globalNavMenu">
> <ul style="visibility: hidden">
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/index.xml"
> target="_self" alt="#{messages['nav_Home.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Home']}"></span>
> </span>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/medlem.xml"
> target="_self" alt="#{messages['nav_Medlem.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Medlem']}"></span>
> </span>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/regatta.xml"
> target="_self" alt="#{messages['nav_Regatta.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta']}"></span>
> </span>
> <ul>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=O2" target="_self" alt="#{messages['nav_Regatta_Otto.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Otto']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=SF" target="_self"
> alt="#{messages['nav_Regatta_Snoefoeyka.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Snoefoeyka']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=TV" target="_self" alt="#{messages['nav_Regatta_Trimvar.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Trimvar']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=KF" target="_self" alt="#{messages['nav_Regatta_Kors.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Kors']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=HU" target="_self"
> alt="#{messages['nav_Regatta_Huftaroey.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Huftaroey']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=TH" target="_self" alt="#{messages['nav_Regatta_Trimhost.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Trimhost']}"></span>
> </span>
> </li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
> ml?arrid=OM" target="_self" alt="#{messages['nav_Regatta_Osmest.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Regatta_Osmest']}"></span>
> </span>
> </li>
> </ul>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/havna.xml"
> target="_self" alt="#{messages['nav_Havna.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Havna']}"></span>
> </span>
> </li>
> <li></li>
> <li><span> </span>
> <span jsfid="outputLink"
> value="#{facesContext.externalContext.requestContextPath}/open/jolle.xml"
> target="_self" alt="#{messages['nav_Jolle.alt']}">
> <span jsfid="outputText"
> value="#{messages['nav_Jolle']}"></span>
> </span>
> </li>
> </ul>
> </div> <!-- end globalNavMenu -->
>
> <script type="text/javascript">
> // <![CDATA[
> cmDrawFromText ('globalNavMenu', 'hbr', cmThemeOffice,
> 'ThemeOffice');
> // ]]>
> </script>
>
> Hermod
>
> -----Opprinnelig melding-----
> Fra: Steve Olson [mailto:s.olson@charter.net]
> Sendt: 17. desember 2006 04:18
> Til: user@shale.apache.org
> Emne: Clay, Tomahawk and jscookmenu
>
> I'm exploring Clay and Shale and have been trying to use jscookmenu (Clay
> 1.0.3 and Tomahawk 1.1.3) and am having trouble. I've only tried a few
> Tomahawk components so far, and the ones I've tried work fine except for
> jscookmenu. Are there any examples around of Clay using jscookmenu?
>
SV: Clay, Tomahawk and jscookmenu
Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi
Look at http://test.os-seilforening.org. This uses the aforementioned
combination. However, I had to tweak it a bit to get it working.
Here is the code:
<div id="globalNavMenu">
<ul style="visibility: hidden">
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/index.xml"
target="_self" alt="#{messages['nav_Home.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Home']}"></span>
</span>
</li>
<li></li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/medlem.xml"
target="_self" alt="#{messages['nav_Medlem.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Medlem']}"></span>
</span>
</li>
<li></li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/regatta.xml"
target="_self" alt="#{messages['nav_Regatta.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta']}"></span>
</span>
<ul>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=O2" target="_self" alt="#{messages['nav_Regatta_Otto.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Otto']}"></span>
</span>
</li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=SF" target="_self" alt="#{messages['nav_Regatta_Snoefoeyka.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Snoefoeyka']}"></span>
</span>
</li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=TV" target="_self" alt="#{messages['nav_Regatta_Trimvar.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Trimvar']}"></span>
</span>
</li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=KF" target="_self" alt="#{messages['nav_Regatta_Kors.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Kors']}"></span>
</span>
</li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=HU" target="_self" alt="#{messages['nav_Regatta_Huftaroey.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Huftaroey']}"></span>
</span>
</li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=TH" target="_self" alt="#{messages['nav_Regatta_Trimhost.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Trimhost']}"></span>
</span>
</li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/arrangement.x
ml?arrid=OM" target="_self" alt="#{messages['nav_Regatta_Osmest.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Regatta_Osmest']}"></span>
</span>
</li>
</ul>
</li>
<li></li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/havna.xml"
target="_self" alt="#{messages['nav_Havna.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Havna']}"></span>
</span>
</li>
<li></li>
<li><span> </span>
<span jsfid="outputLink"
value="#{facesContext.externalContext.requestContextPath}/open/jolle.xml"
target="_self" alt="#{messages['nav_Jolle.alt']}">
<span jsfid="outputText"
value="#{messages['nav_Jolle']}"></span>
</span>
</li>
</ul>
</div> <!-- end globalNavMenu -->
<script type="text/javascript">
// <![CDATA[
cmDrawFromText ('globalNavMenu', 'hbr', cmThemeOffice,
'ThemeOffice');
// ]]>
</script>
Hermod
-----Opprinnelig melding-----
Fra: Steve Olson [mailto:s.olson@charter.net]
Sendt: 17. desember 2006 04:18
Til: user@shale.apache.org
Emne: Clay, Tomahawk and jscookmenu
I'm exploring Clay and Shale and have been trying to use jscookmenu (Clay
1.0.3 and Tomahawk 1.1.3) and am having trouble. I've only tried a few
Tomahawk components so far, and the ones I've tried work fine except for
jscookmenu. Are there any examples around of Clay using jscookmenu?