2008年6月23日 星期一

How to get rid of sitemesh decorators in Appfuse 2.x

I am encountering a strange problem to exclude the decorator. I can't get rid
of the sitemesh's decorator.
I want to use the dojo script to construct my user interface for an action
call pjm.html.
Here is my action setting:

<package name="gbike" extends="default" namespace="/gbike">
<default-interceptor-ref name="autowiring">
<action name="pjm" class="ProjectAction" method="list">
<result
name="success">/WEB-INF/pages<wbr>/pjm/ProjectMain.jsp</result>
</action>
</package>

I also copy the decorators.xml and modified it in the
src/main/webapp/WEB-INF<wbr>/decorators.xml.
as following
<decorators defaultdir="/decorators">
<excludes>
<pattern>/40*.jsp</pattern>
<pattern>/*ajax=true*</pattern<wbr>>
<pattern>/gbike/*</pattern>
<pattern>/gbike/pjm.html<<wbr>/pattern>
<pattern>/gbike/pjm.html*<<wbr>/pattern>
<pattern>/scripts/dojo/*<<wbr>/pattern>
<pattern>/struts/dojo/*<<wbr>/pattern>
<pattern>/resources/*</pattern<wbr>>
</excludes>
<decorator name="default" page="default.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
Does anything I miss ?
Well, I forgot to check the sitmesh setting in web.xml.
The sitemesh in web.xml was configured with dispatcher REQUEST.
For this kind of dispatcher we have to also exclude the jsp file.
So, add ProjectMain.jsp to exclude section.
Thanks to <small>mraible, you really pull me out of the trouble.

沒有留言: