You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by daveck <de...@holstein.com> on 2008/02/14 17:50:44 UTC
Ajax tabbedPanel and sitemesh problem
Hi,
I am having problem using an ajax tabbedPanel with sitemesh.
If I don't decorate page.jsp, the tabbedPanel works fine.
As soon as I decorate it, the <s:head theme="ajax" /> in the <head> section
of page.jsp doesn't make it through to the final decorated page. As a
result, only the html is displayed.
Any help would be appreciated.
Thank you.
David
web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<filter>
<filter-name>struts-cleanup</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ActionContextCleanUp
</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter
</filter-class>
</filter>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
decorators.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<decorators defaultdir="/decorators">
<decorator name="main" page="main.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
main.jsp (main decorator):
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
prefix="decorator" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><decorator:title default="Default Title" /> </title>
<%@ include file="/includes/style.jsp"%>
</head>
<body>
<%@ include file="/includes/header.jsp"%>
<%@ include file="/includes/loginStatus.jsp"%>
<table class="main" width="1000">
<tr>
<td width="180" valign="top">
<%@ include file="/includes/navbar.jsp"%>
</td>
<td width="820" valign="top">
<div class="content"><decorator:body/></div>
</td>
</tr>
<tr>
<td colspan="2" width="1000" valign="top">
<%@ include file="/includes/footer.jsp"%>
</td>
</tr>
</table>
</body>
</html>
page.jsp to be decorated.
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Cow Quest</title>
<s:head theme="ajax" />
</head>
<body>
<table>
<tr>
<td>
<s:tabbedPanel id="test">
<s:div id="first" label="First Tab" theme="ajax" labelposition="top"
>
<p>
Tab content here....
</p>
</s:div>
<s:div id="second" label="Second Tab" theme="ajax"
labelposition="top" >
<p>
Tab content here....
</p>
</s:div>
<s:div id="third" label="Third Tab" theme="ajax" labelposition="top"
>
<p>
Tab content here....
</p>
</s:div>
</s:tabbedPanel>
</td>
</tr>
</table>
</body>
</html>
--
View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15481642.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Ajax tabbedPanel and sitemesh problem
Posted by daveck <de...@holstein.com>.
Yes. Shortly after I sent this message I added it in. Now I'm having
another problem. The contents of the <tabbedPanel>....</tabbedPanel> tag of
the page being decorated is being replaced with the contents of the first
html tag in the decorator.
Jeromy Evans - Blue Sky Minds wrote:
>
> Is it possible your decorator is missing the <decorator:head/> tag in
> its head section?
>
> daveck wrote:
>> It works if I put <s:head theme="ajax"/> in the <body> of the html.
>>
>>
>> daveck wrote:
>>
>>> Hi,
>>> I am having problem using an ajax tabbedPanel with sitemesh.
>>> If I don't decorate page.jsp, the tabbedPanel works fine.
>>> As soon as I decorate it, the <s:head theme="ajax" /> in the <head>
>>> section of page.jsp doesn't make it through to the final decorated page.
>>> As a result, only the html is displayed.
>>> Any help would be appreciated.
>>> Thank you.
>>> David
>>>
>>>
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15500875.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Ajax tabbedPanel and sitemesh problem
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Is it possible your decorator is missing the <decorator:head/> tag in
its head section?
daveck wrote:
> It works if I put <s:head theme="ajax"/> in the <body> of the html.
>
>
> daveck wrote:
>
>> Hi,
>> I am having problem using an ajax tabbedPanel with sitemesh.
>> If I don't decorate page.jsp, the tabbedPanel works fine.
>> As soon as I decorate it, the <s:head theme="ajax" /> in the <head>
>> section of page.jsp doesn't make it through to the final decorated page.
>> As a result, only the html is displayed.
>> Any help would be appreciated.
>> Thank you.
>> David
>>
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Ajax tabbedPanel and sitemesh problem
Posted by daveck <de...@holstein.com>.
It works if I put <s:head theme="ajax"/> in the <body> of the html.
daveck wrote:
>
> Hi,
> I am having problem using an ajax tabbedPanel with sitemesh.
> If I don't decorate page.jsp, the tabbedPanel works fine.
> As soon as I decorate it, the <s:head theme="ajax" /> in the <head>
> section of page.jsp doesn't make it through to the final decorated page.
> As a result, only the html is displayed.
> Any help would be appreciated.
> Thank you.
> David
>
>
>
--
View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15484121.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org