I think my dojo stuff is loading correctly now. I compared the differences
between m4 and m5-snapshot and it appears the filter mappings need to have the
proper dispatchers:
--- snip from working web.xml ---
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>staticFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
----- Original Message -----
From: "Nathan Anderson" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, May 1, 2007 1:14:23 PM (GMT-0800) America/Los_Angeles
Subject: Re: [appfuse-user] datepicker problems in appfuse 2m4
I'm trying to apply this technique in an AppFuse 2.0-M4 app but it doesn't seem
to be working for me. In Firebug I see that the requests are being made to the
various .js and .html files under /struts/dojo, but they all are returning 404
errors.
I've added the <s:head theme="ajax"/> to my .jsp
- included the latest sitemesh.xml and decorators.xml
- updated web.xml
Are there any other differences between 2.0-M5-SNAPSHOT and 2.0-M4 that should
make a difference in this?
Thanks,
Nathan
----- Original Message -----
From: "J. David Mendoza" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, April 26, 2007 1:25:42 PM (GMT-0800) America/Los_Angeles
Subject: Re: [appfuse-user] datepicker problems in appfuse 2m4
You're right Matt... the StaticFilter works!
I finally have it working... I didn't have to extract the static folder
in struts.jar or change the extension from *.html to something else, I
just had to:
- Change the parser in sitemesh.xml to (commented out the 3 lines of
HTMLPageParser):
<parser content-type="text/html"
class="com.opensymphony.module.sitemesh.parser.FastPageParser"/>
- Added struts/dojo/* to the excludes part in the decorators.xml file.
<excludes>
<pattern>/struts/dojo/*</pattern>
<pattern>/resources/*</pattern>
</excludes>
- And changed back the includes param of the StaticFilter in the web.xml
from /scripts/dojo/* to /struts/dojo/*
<init-param>
<param-name>includes</param-name>
<param-value>/struts/dojo/*</param-value>
</init-param>
This way you can do things as in the doco :) <s:head theme="ajax" /> for
the <s:autocompleter/> tag or just <s:head/> for the <s:datetimepicker
/> tag...
Hope this helps...
David M.
Matt Raible wrote:
> AFAIK, the StaticFilter works if the resource in on the filesystem. It
> doesn't work if the resource is in Struts' JAR file. If it's served
> from a JAR file, it's not exactly static is it. ;-)
>
> Since Struts recommends moving the Dojo files to your filesystem, I
> don't know that if we should fix the StaticFilter. One thing we could
> do is do the extraction for you, so Dojo is already there.
>
> Matt
>
> On 4/25/07, J. David Mendoza <[EMAIL PROTECTED]> wrote:
>> Another way to get the struts2 ajax features working (dojo), is to add
>> some lines to the decorators.xml, change the parser in the sitemesh.xml
>> and change the .html struts mapping so you can remove the staticFilter.
>>
>> Decorator's lines:
>> <excludes>
>> <pattern>/styles/*</pattern>
>> <pattern>/scripts/*</pattern>
>> <pattern>/images/*</pattern>
>> <pattern>/dojo/*</pattern>
>> <pattern>/struts/*</pattern>
>> <pattern>/resources/*</pattern>
>> </excludes>
>>
>> Sitemesh's parser (I commented out the HTMLParser lines):
>> <parser content-type="text/html"
>> class="com.opensymphony.module.sitemesh.parser.FastPageParser"/>
>>
>> The painful part is having to move every .html mapping to some other
>> thing, so if someone has a fix for the staticFilter, I'll be happy to
>> hear about it.
>>
>> Cheers
>>
>> David M.
>>
>> Michael Horwitz wrote:
>> > I inlcuded this in a separate css style file to overide the typo.css
>> > styling (no need to comment out anything in typo.css):
>> >
>> > /**
>> > * Overide the settings from typo.css to make sure the Dojo calendar
>> > dropdown displays properly.
>> > */
>> >
>> > table.calendarContainer, table.monthContainer,
>> > table.calendarBodyContainer, table.yearContainer
>> > {
>> > margin: 0 0 0 0 !important;
>> > padding: 0 0 0 0 !important;
>> > font-size: 110% !important;
>> > }
>> >
>> > table.calendarContainer tfoot td
>> > {
>> > border: 0px !important;
>> > }
>> >
>> > /**
>> > * End typo.css override.
>> > */
>> >
>> > Mike.
>> >
>> >
>> > On 4/23/07, *Will Berger* <[EMAIL PROTECTED]
>> > <mailto:[EMAIL PROTECTED]>> wrote:
>> >
>> >
>> > Ok...I think I am finally there. Thanks everyone for the
>> > input. Here is
>> > what my findings were.
>> >
>> >
>> > 1. I need to copy /scripts/dojo directory in the struts jar to
>> > webapp/scripts dir
>> > 2. I needed to include
>> > <script type="text/javascript" src="<c:url
>> > value='/scripts/dojo/dojo/dojo.js'/>"></script>.
>> >
>> > It did not require to be in the body.
>> >
>> > 3. Sitemesh does need to have the following entry in the
>> > decorators.xml file
>> > <excludes>
>> > <pattern>/resources/*</pattern>
>> > <pattern>/scripts/dojo/*</pattern>
>> > </excludes>
>> >
>> > This gets rid of the header footer repainting itself when you
>> > click on the
>> > calendar icon.
>> >
>> > 4. I did not have any issues with scriptaculous or prototype.js
>> >
>> > 5. Had css rendering problems on specifically the datepicker not
>> > the time
>> > picker. It would insert a blank row between the month header and
>> > the days
>> > header and between the days and the year footer of the datepicker
>> > window.
>> > Also the font size was extremely small. After some investigation,
>> > found the
>> > problem to be in the theme's typos.css'. Specifically, when I
>> > comment out
>> > the following it seems to render properly.
>> >
>> > // Fixes the problem of the blank rows in the under the month
>> > header and
>> > above the year footer. The year footer still doesn't display
>> > properly.
>> > You can see the borderof the table
>> > /* table {
>> > font-size: 1em;
>> > margin: 0 0 1.5em 0;
>> > padding: 0;
>> > }
>> > */
>> >
>> > // This fixes the days displaying in very small font size. Causes
>> > undersired effects everywhere else in the app. Fonts to big.
>> > body {
>> > text-align: left;
>> > font-family: verdana, arial, helvetica, sans-serif;
>> > font-size: 100%; /* Use to be 76% */
>> > line-height: 1em;
>> > color: #444;
>> > }
>> >
>> > If anyone could recommend some css changes that would be
>> > great. I know
>> > very little about css.
>> >
>> > Will
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/datepicker-problems-in-appfuse-2m4-tf3603239s2369.html#a10143327
>>
>>
>> > Sent from the AppFuse - User mailing list archive at Nabble.com
>> > <http://Nabble.com>.
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > <mailto:[EMAIL PROTECTED]>
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> > <mailto:[EMAIL PROTECTED]>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]