• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

t:jscookMenu with Tiles

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying to use jscookMenu with Struts Tiles definition template.
When I try to call my page I get 'element.jscook_action' is null or not an object. And then my menu does not show up.

I wonder whether anybody used jsCookMenu with tiles definition templates?? My guess is that there is some confliction amoung Javascripts, JSF, and tiles definition templates. I am able to get most of the common h:, f: and t: tags work with tiles, only the jsCookMenu is giving problems.


Any comments/suggetions will be greatly appreciated.

Here is the full description of my problem.


------------------------------------------
My index.jsp page calls welcome.jsp.

----------------------------------------------
Welcome.jsp looks like this

<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<tiles:insert definition="welcome.page" flush="true" />


------------------------------------------
My tiles-defs.xml got the following definitions

<tiles-definitions>

<definition name="layout" path="/pages/layout.jsp">
<put name="title" value="Sample Page Title" />
<put name="header" value="/pages/header.jsp" />
<put name="footer" value="/pages/footer.jsp" />
<put name="menuBody" value="/pages/menu.jsp" />
<put name="body" value="" />
</definition>

<definition name="welcome.page" extends="layout">
<put name="body" value="/pages/welcome_body.jsp"/>
</definition>

<tiles-definitions>

------------------------------------------
My menu.jsp looks like following

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


<f:view>
<f:loadBundle basename="bundle.Messages" var="Message"/>
<t:jscookMenu layout="hbr" theme="ThemeOffice">
<t:navigationMenuItem id="nav_1" itemLabel="Home" action="go_display" />
</t:jscookMenu>
</f:view>
-------------------------------------------

My welcome_body.jsp page is a plain simple JSP with some html tags


In web.xml, I set the filter and filter-mapping

<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
....

</filter>


<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>

----------------------------------------------
Thanks again in advance
Thilina
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I have a similar problem...
i'm using jscookMenu with struts tiles...The jscookMenu works perfectly without tiles but when i insert the page containing the menu in a template page created using tiles, the menu is never diplayed...

<f:subview id="menuHeader">
<tiles:insert attribute="Header" flush="false"/>
</f:subview>

<f:subview id="Body">
<tiles:insert attribute="Body" flush="false"/>
</f:subview>


i dont have enough javascript knowledge to be able to trace the problem...but when i tried to investigate and trace the html code generated at the rendering time, i found that the inclusion of the jscookMenu.js, theme.js and theme.css is put at the end of the html code(in a new html and head tag) after the java script that is supposed to display the menu [ cmdraw() ]....
please, if anyone could help or have any suggestions, this will be appreciated...

Thanks all
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic