Is there some beautiful web pages using sitemesh?

158 views
Skip to first unread message

hao wang

unread,
Jun 14, 2011, 4:08:33 AM6/14/11
to SiteMesh 3 Users
I'd like learn some outstanding sitemesh examples for more
understanding, does anyone know?

phamti

unread,
Jun 19, 2011, 1:24:56 AM6/19/11
to SiteMesh 3 Users
Hi Hao,

Are you looking for end user websites or looking for code samples?

Regards,

Tin

hao wang

unread,
Jun 20, 2011, 5:23:56 AM6/20/11
to sitemes...@googlegroups.com
Hi Tin,

Yeah, as your said. I want to see some really sitemesh examples, to decide weather continue using sitemesh, because when I using sitemesh, struts2 tags always be disabled, and I had to add some pages to excluded path.

Regards,
-Hao

2011/6/19 phamti <tin....@gmail.com>

phamti

unread,
Jun 20, 2011, 11:58:31 PM6/20/11
to sitemes...@googlegroups.com
Hi Hao,

Here are two sites,
www.lemonbistro.com
http://opensource.adobe.com/wiki/display/blazeds/BlazeDS - is powered by Confluence which uses SiteMesh

Regarding your Struts 2 and SiteMesh issue, I suggest starting a post with some more details of what you are trying to accomplish and some examples.

Having said that, if I took a guess you might be interested in the Struts2 SiteMesh Plugin, http://struts.apache.org/2.2.1/docs/sitemesh-plugin.html

Tin

hao wang

unread,
Jun 21, 2011, 2:13:28 AM6/21/11
to sitemes...@googlegroups.com
Hi Tin,

Thank you very much for your kindness.I just want to unify my project styles, there are some pages contain struts2 tags, like:

<s:form  name="editForm" action="save"  method="post" >
<s:textfield name="task.memoname" maxlength="50" label="memoname"></s:textfield>
<s:textfield name="task.taskname" maxlength="50" label="taskname"></s:textfield>
<sx:datetimepicker name="task.date" label="date" ></sx:datetimepicker>
<s:submit value="submit"></s:submit>

but if I configure sitemesh on these pages, tags like <sx:datatimepicker/> will not work. And tag <sx:tabbedpanel > can't work too. So I want to someone can help me solve them, or I may use another frame instead of struts2 or sitemesh.

Regards,
-Hao

2011/6/21 phamti <tin....@gmail.com>

phamti

unread,
Jun 21, 2011, 4:29:23 PM6/21/11
to SiteMesh 3 Users
Hi Hao,

Based on my knowledge of Struts 1.2 I would guess that the
<sx:datatimepicker/> tag is most likely some javascript, images, html
and possibly using ajax calls to render a calendar menu item.

I think that the reason those Struts tags are not working is that
SiteMesh is setup to decorate the contents of what is rendered by
<sx:datatimepicker/>. Here is how I would solve the problem,
1. Turn off sitemesh and use a tool like iewatch to determine
generally where the resources (css, html, js ect...) of the struts
tags are being pulled from
2. Ensure that your excludes from decorator.xml covers the top level
paths of the resources of the struts tags
3. Makes your decorator pattern and your view folder specific. For
example, in most of my applications I keep all my jsp and servlets in
specific location. For a simple Struts 1.2 application I might use the
following patterns,
1. <pattern>/view/*.do</pattern>
2. <pattern>/view/*.jsp</pattern>
I am not done writing the tutorials yet, but this might be helpful,
http://www.sitemesh.homeip.net/wiki/display/sitemesh/Learn+-+Getting+Started+with+SiteMesh

Note that this site is using a temporary domain name will change in
the future most likely to http://docs.sitemesh.org

Hope that helps.

Tin


On 21 June, 02:13, hao wang <f1v...@gmail.com> wrote:
> Hi Tin,
>
> Thank you very much for your kindness.I just want to unify my project
> styles, there are some pages contain struts2 tags, like:
>
> <s:form  name="editForm" action="save"  method="post" >
> <s:textfield name="task.memoname" maxlength="50"
> label="memoname"></s:textfield>
> <s:textfield name="task.taskname" maxlength="50"
> label="taskname"></s:textfield>
> <sx:datetimepicker name="task.date" label="date" ></sx:datetimepicker>
> <s:submit value="submit"></s:submit>
>
> but if I configure sitemesh on these pages, tags like <sx:datatimepicker/>
> will not work. And tag <sx:tabbedpanel > can't work too. So I want to
> someone can help me solve them, or I may use another frame instead of
> struts2 or sitemesh.
>
> Regards,
> -Hao
>
> 2011/6/21 phamti <tin.p...@gmail.com>
>
>
>
>
>
>
>
> > Hi Hao,
>
> > Here are two sites,
> >www.lemonbistro.com
> >http://opensource.adobe.com/wiki/display/blazeds/BlazeDS- is powered by

SansunS

unread,
Nov 26, 2012, 12:52:01 PM11/26/12
to sitemes...@googlegroups.com
Hi Tin,
 
Sorry to ressurect this link, I am also facing the same issue what Hao has described here.
Following your suggestions, when I disable the sitemesh and look at the resource that used for the Calendar Icon and other DOJO or JavaScripts, I get something like this where SimpleEvents are my web context root name:
<script laguage="JavaScript" src="SimpleEvents/struts/dojo/struts_dojo.js" type="text/javascript"></script>
<link href="/SimpleEvents/struts/xhtml/styles.css" rel="stylesheet" type="text/css" />
<link href="/SimpleEvents/struts/ajax/dojoRequire.js" type="text/javascript
.
.
.
.
So I had added in my excludes of the decorators.xml as:
<pattern>/struts/xhtml/*</pattern>
<pattern>/struts/ajax/*</pattern>  (also I tried with /SimpleEvents/struts/* , ../SimpleEvents/struts/*, and other various paths.)
 
but it still not showing the dateicon.gif or the input box. It only shows the label of the datetimepicker.
 
I assume that either my exclude pattern is not correct or its not working at all as intended.
 
I am using Struts2 2.2.3 and struts2-dojo-plugin 2.2.3.
 
Appreciate any help.
 
Tks.
 
Sansun

phamti

unread,
Nov 26, 2012, 3:48:08 PM11/26/12
to sitemes...@googlegroups.com
Hi SansunS,

No problems, I'm happy to help. If I understand correctly, you've posted item #3. Can you also give the other items I listed? I really need them to see the differences and understand how you used SiteMesh.
  1. Decorator file.
  2. The page being decorated. 
  3. Rendered html source code of the working page. (provided below)
  4. Rendered html source code of the not working page.
Tin
Reply all
Reply to author
Forward
0 new messages