You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mu...@aeso.ca on 2003/07/17 00:59:03 UTC

Tiles and tabs layout don't work together?

I'm trying to use a tab layout within a tiles JSP, using a tiles
definition...but not having much luck.

tiles-defs.xml:
  <definition name="layout.default">
    <put name="title" value="XXX" />
    <put name="body-content" value="tabslayout.default" />
  </definition>

  <definition name="tabslayout.default" path="/jsp/layouts/tabslayout.jsp">
    <put name="selectedIndex" value="0" />
    <put name="parameterName" value="selected" />
	<item value="Tab A" link="/jsp/taba.jsp" />
	<item value="Tab B" link="/jsp/tabb.jsp" />
    </putList>
  </definition>

and I have set up a ForwardAction in my struts-config.xml:

	<action-mappings>
          <action path="/home"
type="org.apache.struts.actions.ForwardAction" parameter="layout.default" />
	</action-mappings>

When I navigate to /home.do, the page renders OK....but I cursor over each
tab and I get the URL of the layout JSP directly...e.g.
/jsp/layouts/tabslayout.jsp?selected=0...and clicking the tab link doesn't
work properly:

java.lang.NullPointerException:
org.apache.struts.taglib.tiles.InsertTag$TagHandler
org.apache.struts.taglib.tiles.InsertTag.processAttribute(java.lang.String) 

Is this because the request isn't going through the Tiles request processor?
How is this supposed to work?
I tried using a Struts action as the link URL, but I still get the same
exception.

Any help is appreciated.







---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org