What I guessed is right it is a problem with struts
/template/simple/head.ftl
Just override it
create head.ftl in webapp/template/simple and paste the text below.
Works just fine. Only thing. The css does not render the calendar too
well.
<script language="JavaScript" type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "<@s.url includeParams='none'
value='/struts/dojo/' includeParams="none" encode='false'/>",
isDebug: ${parameters.debug?default(false)},
bindEncoding: "${parameters.encoding}",
debugAtAllCosts: true // not needed, but allows the Venkman
debugger to work with the includes
};
</script>
<script language="JavaScript" type="text/javascript"
src="<@s.url includeParams='none' value='/struts/dojo/dojo.js'
includeParams="none" encode='false'/>"></script>
<script language="JavaScript" type="text/javascript"
src="<@s.url includeParams='none'
value='/struts/simple/dojoRequire.js' includeParams="none"
encode='false'/>"></script>
J. David Mendoza wrote:
My guess is that sitemesh is you have a problem with sitemesh...
Just add the action url that shows this page to the decorators.xml to
make sure
<excludes>
<pattern>/testAction.aspx</pattern>
<pattern>/struts/dojo/*</pattern>
<pattern>/resources/*</pattern>
</excludes>
Thomas Ramapuram wrote:
After removing the staicFilter altogether I seem to be getting
dojo.js but now there are a whole lot of dependecies failing eg.
http://localhost:8080/struts/dojostruts/widget/Bind.js
http://localhost:8080/struts/dojostruts/__package__.js
looks like the
baseRelativePath: "/struts/dojo",
should have been "/struts/dojo/"
This gets rendered by
<s:head theme="ajax" calendarcss="calendar-green" debug="true"/>
Is there a way to override this?
Thanks in advance,
Thomas
J. David Mendoza wrote:
Thomas, once you rename the action mappings you don't have to
extract the struts content... just get rid of the StaticFilter in
the web.xml and it should work with the standard struts2 ajax tags...
Cheers...
David M.
On 3/05/07 02:27 AM, Matt Raible <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Here's an issue for the datepicker - feel free to re-open it or add to
it if there's things we can improve.
http://issues.appfuse.org/browse/APF-739
FWIW, we still include Matt Kruse's JavaScript calendar (in
scripts/calendar.js).
http://www.mattkruse.com/javascript/calendarpopup/
We could change to use JSCalendar from
http://www.dynarch.com/projects/calendar. This is what most web
frameworks use, unless they're Apache, which doesn't allow an LGPL
library.
Matt
On 5/3/07, Nathan Anderson wrote:
> I'm glad to see someone is having more luck than I am with the
datepicker ;)
>
> I have only tried to do it without extracting the static files and
without changing the struts action mapping to something other than
.html, but those goals might be asking for a bit much :)
>
> As for the recommendation, I think it would be safe to say either
one. Both projects have a good supporting community and should work
just fine with Struts 2. I'd say use the one you like or feel is
easier to work with.
>
> Nathan
>
>
> ----- Original Message -----
> From: "Thomas Ramapuram" > To: "Appfuse User" > Sent: Wednesday,
May 2, 2007 10:49:01 PM (GMT-0800) America/Los_Angeles
> Subject: [appfuse-user] Recomended Pratice (Struts2 Dojo)
>
> Hi,
> I just went through setting up datepicker yesterday. I was able
to do
> it but I had to make quite a few changes to the application which
I have
> given below. I also read somewhere that the Ajax theme is going
to be
> refactored to a plugin. I wanted to know what is the best pratice
with
> regard to appfuse and struts2. Should I use tools like scriptacalous
> for autocomplete or use Struts2 Dojo UI tags?
>
>
> Changes made to get datepicker working:
>
> 1. Change the extension from html to apsx
> This ment that I had to change quite a few links in the
> application. Everywhere there was a link with .html I had to
change it
> to .aspx.
>
> 2. Copied the files in struts.jar (org/apache/struts2/static/dojo) to
> /scripts/dojo
> (This did not work so I had to copy
org/apache/struts2/static/dojo/src
> to /src)
> Now I have 2 copies of /scr folder but I have not checked what
happens
> if I delete the one in /scripts/dojo/
>
> 3. I changed the decorator.xml and added the following lines.
> /src/*
> /scripts/dojo/*
>
> 4. Added the line below to the head section of the page
> .
> I tried
> > but this is trying to get resources from
> http://localhost:8080/struts/dojosrc/namespaces/dojo.js etc.
because the
> head renders the foll:
>
> > > > > >
> Looks like there the baseRelativePath needs to be changed from
> /struts/dojo to /scripts/dojo/ this requires to change the head.ftm
>
> This got the datepicker working but the calendar formatting was
all wrong.
> This requires some changes in the css files. Will be looking into
this too.
>
> ---------------------------------------------------------------------
> 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]
>
>
--
http://raibledesigns.com
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]