|
|
|
Will Berger
|
was wondering if anyone has gotten the struts2 datepicker and the ajax working together on the same page.
If i add the ajax tags, the datepicker stop working. If I take out datepicker and the dojo include, the ajax tags start working. Any help much appreciated. Will |
|||||||||||||||
|
mraible
|
Do you have example code so I can try to reproduce this problem locally?
Thanks, Matt On 5/24/07, Will Berger <[hidden email]> wrote: > > was wondering if anyone has gotten the struts2 datepicker and the ajax > working together on the same page. > > If i add the ajax tags, the datepicker stop working. > > If I take out datepicker and the dojo include, the ajax tags start working. > > Any help much appreciated. > > Will > -- > View this message in context: http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10796147 > Sent from the AppFuse - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
I've tried just about everything to get the <s:datetimepicker> tag to
work in 2.0 M5. I've disabled SiteMesh (as well as all other filters), changed the extension to .action, copied the dojo files locally and turned off static rendering using <constant name="struts.serve.static" value="false"/>. Nothing works. Does anyone have a example that works with any workaround? Thanks, Matt On 5/24/07, Matt Raible <[hidden email]> wrote: > Do you have example code so I can try to reproduce this problem locally? > > Thanks, > > Matt > > On 5/24/07, Will Berger <[hidden email]> wrote: > > > > was wondering if anyone has gotten the struts2 datepicker and the ajax > > working together on the same page. > > > > If i add the ajax tags, the datepicker stop working. > > > > If I take out datepicker and the dojo include, the ajax tags start working. > > > > Any help much appreciated. > > > > Will > > -- > > View this message in context: http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10796147 > > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > -- > http://raibledesigns.com > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Will Berger
|
Fyi...in 2m4 and probably 2m5, there seems to be a problem where the datepicker and the ajax head tag can't coexist on a page and function properly. On 2m4 I was doing the dojo.js include suggested in previous posts, which is the only way i could get the datepicker running.
Will
|
|||||||||||||||
|
J. David Mendoza R.
|
what browser are you trying it on? I've had problems with ie, with
firefox it works fine... David M. Will Berger wrote: > Fyi...in 2m4 and probably 2m5, there seems to be a problem where the > datepicker and the ajax head tag can't coexist on a page and function > properly. On 2m4 I was doing the dojo.js include suggested in previous > posts, which is the only way i could get the datepicker running. > > Will > > > > mraible wrote: > >> I've tried just about everything to get the <s:datetimepicker> tag to >> work in 2.0 M5. I've disabled SiteMesh (as well as all other filters), >> changed the extension to .action, copied the dojo files locally and >> turned off static rendering using <constant name="struts.serve.static" >> value="false"/>. Nothing works. Does anyone have a example that works >> with any workaround? >> >> Thanks, >> >> Matt >> >> On 5/24/07, Matt Raible <[hidden email]> wrote: >> >>> Do you have example code so I can try to reproduce this problem locally? >>> >>> Thanks, >>> >>> Matt >>> >>> On 5/24/07, Will Berger <[hidden email]> wrote: >>> >>>> was wondering if anyone has gotten the struts2 datepicker and the ajax >>>> working together on the same page. >>>> >>>> If i add the ajax tags, the datepicker stop working. >>>> >>>> If I take out datepicker and the dojo include, the ajax tags start >>>> >>> working. >>> >>>> Any help much appreciated. >>>> >>>> Will >>>> -- >>>> View this message in context: >>>> >>> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10796147 >>> >>>> Sent from the AppFuse - User mailing list archive at Nabble.com. >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [hidden email] >>>> For additional commands, e-mail: [hidden email] >>>> >>>> >>>> >>> -- >>> http://raibledesigns.com >>> >>> >> -- >> http://raibledesigns.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Jason Thrasher
|
In reply to this post
by mraible
I have the datepicker working on 2.0-M4 (modular Struts2) after adding dojo v0.4.2 files to the web module. Here's what I had to do:
1) Unzip dojo js files into myproject/web/src/main/webapp/scripts/dojo/. The "dojo.js" and the dojo "src" directory should be there at a minimum. 2) Add an excludes pattern to the decorators.xml: <pattern>/scripts/dojo/*</pattern> 3) Add djConfig and reference the dojo.js file from the default decorator file: edit: myproject/web/src/main/webapp/decorators/default.jsp add this inside the <head> content: <script type="text/javascript"> var djConfig = { "isDebug":true, "debugContainerId":"dojoDebugOutput", "baseRelativePath":"<c:url value='/scripts/dojo/'/>", "preventBackButtonFix":false // "parseWidgets":false // "locale":"en-us" // ,"baseScriptUri":"/scripts/dojo/" } </script> <script type="text/javascript" src="<c:url value='/scripts/dojo/dojo.js'/>"></script> 4) Add the s:datetimepicker tag to your file (like signup.jsp, to get the birthdate) as: <s:datetimepicker key="user.birthdate" required="true" toggleType="wipe" toggleDuration="300" displayFormat="MM/dd/yyyy" cssClass="text large"/> 5) Add the appropriate setXXX method to your Action or Model class as needed (User.setBirthdate(Date)). hope it helps, Jason |
|||||||||||||||
|
Jason Thrasher
|
Just a note after some testing: the aforementioned technique seems to work for M4 and M5. However, I didn't realize that this may be simplified in M5 by this:
http://issues.appfuse.org/browse/APF-739 -Jason |
|||||||||||||||
|
mraible
|
Thanks Jason - these instructions worked!
I'm going to make the following changes for RC1: 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo 2. Change Struts' decorators/default.jsp to load Dojo (so users won't need <s:head theme="ajax"/>). 3. Modify decorators.xml and web.xml to properly include/exclude Dojo requests. 4. Add css to forms.css that makes the calendar look right on all AppFuse's default themes. I've re-opened APF-739 to track these changes. Matt On 5/27/07, thrasher <[hidden email]> wrote:
-- http://raibledesigns.com |
||||||||||||||||
|
Jason Thrasher
|
Glad it worked! and +1 for adding to RC1. I forgot to mention that you can see dojo's debug output by adding this to the bottom of default.jsp:
<authz:authorize ifAllGranted="ROLE_ADMIN"> <div id="dojoDebugOutput"></div> </authz:authorize> -Jason
|
|||||||||||||||
|
mraible
|
I took the debugging part out and used what the Struts folks were
outputting instead. <script type="text/javascript"> // Dojo configuration djConfig = { baseRelativePath: "<c:url value='/scripts/dojo/'/>", isDebug: false, bindEncoding: "UTF-8" }; </script> <script type="text/javascript" src="<c:url value='/scripts/dojo/dojo.js'/>"></script> Of course, it should be easy enough to add it back in. A word of caution for folks hoping to use this widget. Dojo seems as slow as ever - it takes a second or two for the calendar icons and date input fields to appear on the page (after the rest of the page has loaded). Matt On 5/30/07, Jason Thrasher <[hidden email]> wrote: > > Glad it worked! and +1 for adding to RC1. I forgot to mention that you can > see dojo's debug output by adding this to the bottom of default.jsp: > <authz:authorize ifAllGranted="ROLE_ADMIN"> > <div id="dojoDebugOutput"></div> > </authz:authorize> > > -Jason > > > > mraible wrote: > > > > Thanks Jason - these instructions worked! > > > > I'm going to make the following changes for RC1: > > > > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo > > 2. Change Struts' decorators/default.jsp to load Dojo (so users won't need > > <s:head theme="ajax"/>). > > 3. Modify decorators.xml and web.xml to properly include/exclude Dojo > > requests. > > 4. Add css to forms.css that makes the calendar look right on all > > AppFuse's > > default themes. > > > > I've re-opened APF-739 to track these changes. > > > > Matt > > > > On 5/27/07, thrasher <[hidden email]> wrote: > >> > >> > >> Just a note after some testing: the aforementioned technique seems to > >> work > >> for M4 and M5. However, I didn't realize that this may be simplified in > >> M5 > >> by this: > >> http://issues.appfuse.org/browse/APF-739 > >> > >> -Jason > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 > >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [hidden email] > >> For additional commands, e-mail: [hidden email] > >> > >> > > > > > > -- > > http://raibledesigns.com > > > > > > -- > View this message in context: http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 > Sent from the AppFuse - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
J. David Mendoza R.
|
Does the autocompleter tag work with this solution?
David M. Matt Raible wrote: > I took the debugging part out and used what the Struts folks were > outputting instead. > > <script type="text/javascript"> > // Dojo configuration > djConfig = { > baseRelativePath: "<c:url value='/scripts/dojo/'/>", > isDebug: false, > bindEncoding: "UTF-8" > }; > </script> > <script type="text/javascript" src="<c:url > value='/scripts/dojo/dojo.js'/>"></script> > > Of course, it should be easy enough to add it back in. > > A word of caution for folks hoping to use this widget. Dojo seems as > slow as ever - it takes a second or two for the calendar icons and > date input fields to appear on the page (after the rest of the page > has loaded). > > Matt > > On 5/30/07, Jason Thrasher <[hidden email]> wrote: >> >> Glad it worked! and +1 for adding to RC1. I forgot to mention that >> you can >> see dojo's debug output by adding this to the bottom of default.jsp: >> <authz:authorize ifAllGranted="ROLE_ADMIN"> >> <div id="dojoDebugOutput"></div> >> </authz:authorize> >> >> -Jason >> >> >> >> mraible wrote: >> > >> > Thanks Jason - these instructions worked! >> > >> > I'm going to make the following changes for RC1: >> > >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users >> won't need >> > <s:head theme="ajax"/>). >> > 3. Modify decorators.xml and web.xml to properly include/exclude Dojo >> > requests. >> > 4. Add css to forms.css that makes the calendar look right on all >> > AppFuse's >> > default themes. >> > >> > I've re-opened APF-739 to track these changes. >> > >> > Matt >> > >> > On 5/27/07, thrasher <[hidden email]> wrote: >> >> >> >> >> >> Just a note after some testing: the aforementioned technique seems to >> >> work >> >> for M4 and M5. However, I didn't realize that this may be >> simplified in >> >> M5 >> >> by this: >> >> http://issues.appfuse.org/browse/APF-739 >> >> >> >> -Jason >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [hidden email] >> >> For additional commands, e-mail: [hidden email] >> >> >> >> >> > >> > >> > -- >> > http://raibledesigns.com >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
It should - do you have an example you'd like me to try? There's lots
on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer to try something that you've tried and doesn't work. Matt On 5/31/07, J. David Mendoza <[hidden email]> wrote: > Does the autocompleter tag work with this solution? > > David M. > > Matt Raible wrote: > > I took the debugging part out and used what the Struts folks were > > outputting instead. > > > > <script type="text/javascript"> > > // Dojo configuration > > djConfig = { > > baseRelativePath: "<c:url value='/scripts/dojo/'/>", > > isDebug: false, > > bindEncoding: "UTF-8" > > }; > > </script> > > <script type="text/javascript" src="<c:url > > value='/scripts/dojo/dojo.js'/>"></script> > > > > Of course, it should be easy enough to add it back in. > > > > A word of caution for folks hoping to use this widget. Dojo seems as > > slow as ever - it takes a second or two for the calendar icons and > > date input fields to appear on the page (after the rest of the page > > has loaded). > > > > Matt > > > > On 5/30/07, Jason Thrasher <[hidden email]> wrote: > >> > >> Glad it worked! and +1 for adding to RC1. I forgot to mention that > >> you can > >> see dojo's debug output by adding this to the bottom of default.jsp: > >> <authz:authorize ifAllGranted="ROLE_ADMIN"> > >> <div id="dojoDebugOutput"></div> > >> </authz:authorize> > >> > >> -Jason > >> > >> > >> > >> mraible wrote: > >> > > >> > Thanks Jason - these instructions worked! > >> > > >> > I'm going to make the following changes for RC1: > >> > > >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo > >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users > >> won't need > >> > <s:head theme="ajax"/>). > >> > 3. Modify decorators.xml and web.xml to properly include/exclude Dojo > >> > requests. > >> > 4. Add css to forms.css that makes the calendar look right on all > >> > AppFuse's > >> > default themes. > >> > > >> > I've re-opened APF-739 to track these changes. > >> > > >> > Matt > >> > > >> > On 5/27/07, thrasher <[hidden email]> wrote: > >> >> > >> >> > >> >> Just a note after some testing: the aforementioned technique seems to > >> >> work > >> >> for M4 and M5. However, I didn't realize that this may be > >> simplified in > >> >> M5 > >> >> by this: > >> >> http://issues.appfuse.org/browse/APF-739 > >> >> > >> >> -Jason > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 > >> > >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [hidden email] > >> >> For additional commands, e-mail: [hidden email] > >> >> > >> >> > >> > > >> > > >> > -- > >> > http://raibledesigns.com > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 > >> > >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [hidden email] > >> For additional commands, e-mail: [hidden email] > >> > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
J. David Mendoza R.
|
I've just tried the autocompleter after seen the datetimepicker and
optiontransferselect tags work... the autocompleter tag uses struts 2 js that don't come in the dojo distribution. And yes it takes forever to load/build the calendar. If you're going to use this tag just for the calendar I'd suggest using a faster one. (The optiontransferselect tag works, so my guess is every tag that doesn't use the ajax theme should work, haven't tested it though) David M. Matt Raible wrote: > It should - do you have an example you'd like me to try? There's lots > on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer > to try something that you've tried and doesn't work. > > Matt > > On 5/31/07, J. David Mendoza <[hidden email]> wrote: >> Does the autocompleter tag work with this solution? >> >> David M. >> >> Matt Raible wrote: >> > I took the debugging part out and used what the Struts folks were >> > outputting instead. >> > >> > <script type="text/javascript"> >> > // Dojo configuration >> > djConfig = { >> > baseRelativePath: "<c:url value='/scripts/dojo/'/>", >> > isDebug: false, >> > bindEncoding: "UTF-8" >> > }; >> > </script> >> > <script type="text/javascript" src="<c:url >> > value='/scripts/dojo/dojo.js'/>"></script> >> > >> > Of course, it should be easy enough to add it back in. >> > >> > A word of caution for folks hoping to use this widget. Dojo seems as >> > slow as ever - it takes a second or two for the calendar icons and >> > date input fields to appear on the page (after the rest of the page >> > has loaded). >> > >> > Matt >> > >> > On 5/30/07, Jason Thrasher <[hidden email]> wrote: >> >> >> >> Glad it worked! and +1 for adding to RC1. I forgot to mention that >> >> you can >> >> see dojo's debug output by adding this to the bottom of default.jsp: >> >> <authz:authorize ifAllGranted="ROLE_ADMIN"> >> >> <div id="dojoDebugOutput"></div> >> >> </authz:authorize> >> >> >> >> -Jason >> >> >> >> >> >> >> >> mraible wrote: >> >> > >> >> > Thanks Jason - these instructions worked! >> >> > >> >> > I'm going to make the following changes for RC1: >> >> > >> >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo >> >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users >> >> won't need >> >> > <s:head theme="ajax"/>). >> >> > 3. Modify decorators.xml and web.xml to properly include/exclude >> Dojo >> >> > requests. >> >> > 4. Add css to forms.css that makes the calendar look right on all >> >> > AppFuse's >> >> > default themes. >> >> > >> >> > I've re-opened APF-739 to track these changes. >> >> > >> >> > Matt >> >> > >> >> > On 5/27/07, thrasher <[hidden email]> wrote: >> >> >> >> >> >> >> >> >> Just a note after some testing: the aforementioned technique >> seems to >> >> >> work >> >> >> for M4 and M5. However, I didn't realize that this may be >> >> simplified in >> >> >> M5 >> >> >> by this: >> >> >> http://issues.appfuse.org/browse/APF-739 >> >> >> >> >> >> -Jason >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> >> >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 >> >> >> >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: [hidden email] >> >> >> For additional commands, e-mail: [hidden email] >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > http://raibledesigns.com >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 >> >> >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [hidden email] >> >> For additional commands, e-mail: [hidden email] >> >> >> >> >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
J. David Mendoza R.
|
Couldn't make the ajax theme tags work... so there's no autocompleter
with this solution :( David M. J. David Mendoza wrote: > I've just tried the autocompleter after seen the datetimepicker and > optiontransferselect tags work... the autocompleter tag uses struts 2 > js that don't come in the dojo distribution. > > And yes it takes forever to load/build the calendar. If you're going > to use this tag just for the calendar I'd suggest using a faster one. > (The optiontransferselect tag works, so my guess is every tag that > doesn't use the ajax theme should work, haven't tested it though) > > David M. > > Matt Raible wrote: >> It should - do you have an example you'd like me to try? There's lots >> on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer >> to try something that you've tried and doesn't work. >> >> Matt >> >> On 5/31/07, J. David Mendoza <[hidden email]> wrote: >>> Does the autocompleter tag work with this solution? >>> >>> David M. >>> >>> Matt Raible wrote: >>> > I took the debugging part out and used what the Struts folks were >>> > outputting instead. >>> > >>> > <script type="text/javascript"> >>> > // Dojo configuration >>> > djConfig = { >>> > baseRelativePath: "<c:url value='/scripts/dojo/'/>", >>> > isDebug: false, >>> > bindEncoding: "UTF-8" >>> > }; >>> > </script> >>> > <script type="text/javascript" src="<c:url >>> > value='/scripts/dojo/dojo.js'/>"></script> >>> > >>> > Of course, it should be easy enough to add it back in. >>> > >>> > A word of caution for folks hoping to use this widget. Dojo seems as >>> > slow as ever - it takes a second or two for the calendar icons and >>> > date input fields to appear on the page (after the rest of the page >>> > has loaded). >>> > >>> > Matt >>> > >>> > On 5/30/07, Jason Thrasher <[hidden email]> wrote: >>> >> >>> >> Glad it worked! and +1 for adding to RC1. I forgot to mention that >>> >> you can >>> >> see dojo's debug output by adding this to the bottom of default.jsp: >>> >> <authz:authorize ifAllGranted="ROLE_ADMIN"> >>> >> <div id="dojoDebugOutput"></div> >>> >> </authz:authorize> >>> >> >>> >> -Jason >>> >> >>> >> >>> >> >>> >> mraible wrote: >>> >> > >>> >> > Thanks Jason - these instructions worked! >>> >> > >>> >> > I'm going to make the following changes for RC1: >>> >> > >>> >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo >>> >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users >>> >> won't need >>> >> > <s:head theme="ajax"/>). >>> >> > 3. Modify decorators.xml and web.xml to properly >>> include/exclude Dojo >>> >> > requests. >>> >> > 4. Add css to forms.css that makes the calendar look right on all >>> >> > AppFuse's >>> >> > default themes. >>> >> > >>> >> > I've re-opened APF-739 to track these changes. >>> >> > >>> >> > Matt >>> >> > >>> >> > On 5/27/07, thrasher <[hidden email]> wrote: >>> >> >> >>> >> >> >>> >> >> Just a note after some testing: the aforementioned technique >>> seems to >>> >> >> work >>> >> >> for M4 and M5. However, I didn't realize that this may be >>> >> simplified in >>> >> >> M5 >>> >> >> by this: >>> >> >> http://issues.appfuse.org/browse/APF-739 >>> >> >> >>> >> >> -Jason >>> >> >> >>> >> >> -- >>> >> >> View this message in context: >>> >> >> >>> >> >>> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 >>> >>> >> >>> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >>> >> >> >>> >> >> >>> --------------------------------------------------------------------- >>> >> >> To unsubscribe, e-mail: [hidden email] >>> >> >> For additional commands, e-mail: [hidden email] >>> >> >> >>> >> >> >>> >> > >>> >> > >>> >> > -- >>> >> > http://raibledesigns.com >>> >> > >>> >> > >>> >> >>> >> -- >>> >> View this message in context: >>> >> >>> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 >>> >>> >> >>> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >>> >> >>> >> >>> --------------------------------------------------------------------- >>> >> To unsubscribe, e-mail: [hidden email] >>> >> For additional commands, e-mail: [hidden email] >>> >> >>> >> >>> > >>> > >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >>> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
In reply to this post
by J. David Mendoza R.
On 5/31/07, J. David Mendoza <[hidden email]> wrote:
> I've just tried the autocompleter after seen the datetimepicker and > optiontransferselect tags work... the autocompleter tag uses struts 2 js > that don't come in the dojo distribution. Do these require changing dojo to be local as well as adding dojo.js and such to the decorators <head>? > > And yes it takes forever to load/build the calendar. If you're going to > use this tag just for the calendar I'd suggest using a faster one. (The > optiontransferselect tag works, so my guess is every tag that doesn't > use the ajax theme should work, haven't tested it though) I'm kind of at a loss of what to do. We can support Struts' DateTimePicker by doing the Dojo hack. At that point, it seems to make sense to use Dojo for Spring MVC's date picker as well. Here's the options as I seem them: 1. Use Dojo for Struts and Spring MVC. Pros: can use Struts widgets. Cons: requires Selenium and will likely push the 2.0 release date back a week or more. 2. Render regular input fields for dates (when using appfuse:gen) and use some sort of popup calendar (jsCalendar or the scriptaculous one I mentioned earlier). Pros: less invasive, you don't get 5 MB of Dojo files in your project. Cons: Struts' datetimepicker won't work. 3. Add Dojo and the hack so Struts users can use datetimepicker, but use #2 for the code generation. #2 might take some work to get the CSS and JS working properly, but we also might be able to hide/show Dojo DatePicker (not the DropDownDatePicker). I've already got #1 done in my local workspace and in appfuse-demos/struts2-crud, but I'm hesitant to check it in because of the need to convert to Selenium to truly support it. #2 or #3 would allow us to push off the Selenium conversion to a later date. Matt > > David M. > > Matt Raible wrote: > > It should - do you have an example you'd like me to try? There's lots > > on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer > > to try something that you've tried and doesn't work. > > > > Matt > > > > On 5/31/07, J. David Mendoza <[hidden email]> wrote: > >> Does the autocompleter tag work with this solution? > >> > >> David M. > >> > >> Matt Raible wrote: > >> > I took the debugging part out and used what the Struts folks were > >> > outputting instead. > >> > > >> > <script type="text/javascript"> > >> > // Dojo configuration > >> > djConfig = { > >> > baseRelativePath: "<c:url value='/scripts/dojo/'/>", > >> > isDebug: false, > >> > bindEncoding: "UTF-8" > >> > }; > >> > </script> > >> > <script type="text/javascript" src="<c:url > >> > value='/scripts/dojo/dojo.js'/>"></script> > >> > > >> > Of course, it should be easy enough to add it back in. > >> > > >> > A word of caution for folks hoping to use this widget. Dojo seems as > >> > slow as ever - it takes a second or two for the calendar icons and > >> > date input fields to appear on the page (after the rest of the page > >> > has loaded). > >> > > >> > Matt > >> > > >> > On 5/30/07, Jason Thrasher <[hidden email]> wrote: > >> >> > >> >> Glad it worked! and +1 for adding to RC1. I forgot to mention that > >> >> you can > >> >> see dojo's debug output by adding this to the bottom of default.jsp: > >> >> <authz:authorize ifAllGranted="ROLE_ADMIN"> > >> >> <div id="dojoDebugOutput"></div> > >> >> </authz:authorize> > >> >> > >> >> -Jason > >> >> > >> >> > >> >> > >> >> mraible wrote: > >> >> > > >> >> > Thanks Jason - these instructions worked! > >> >> > > >> >> > I'm going to make the following changes for RC1: > >> >> > > >> >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo > >> >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users > >> >> won't need > >> >> > <s:head theme="ajax"/>). > >> >> > 3. Modify decorators.xml and web.xml to properly include/exclude > >> Dojo > >> >> > requests. > >> >> > 4. Add css to forms.css that makes the calendar look right on all > >> >> > AppFuse's > >> >> > default themes. > >> >> > > >> >> > I've re-opened APF-739 to track these changes. > >> >> > > >> >> > Matt > >> >> > > >> >> > On 5/27/07, thrasher <[hidden email]> wrote: > >> >> >> > >> >> >> > >> >> >> Just a note after some testing: the aforementioned technique > >> seems to > >> >> >> work > >> >> >> for M4 and M5. However, I didn't realize that this may be > >> >> simplified in > >> >> >> M5 > >> >> >> by this: > >> >> >> http://issues.appfuse.org/browse/APF-739 > >> >> >> > >> >> >> -Jason > >> >> >> > >> >> >> -- > >> >> >> View this message in context: > >> >> >> > >> >> > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 > >> > >> >> > >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> >> >> > >> >> >> > >> --------------------------------------------------------------------- > >> >> >> To unsubscribe, e-mail: [hidden email] > >> >> >> For additional commands, e-mail: [hidden email] > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > http://raibledesigns.com > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 > >> > >> >> > >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [hidden email] > >> >> For additional commands, e-mail: [hidden email] > >> >> > >> >> > >> > > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [hidden email] > >> For additional commands, e-mail: [hidden email] > >> > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
J. David Mendoza R.
|
Answered down below...
Matt Raible wrote: > On 5/31/07, J. David Mendoza <[hidden email]> wrote: >> I've just tried the autocompleter after seen the datetimepicker and >> optiontransferselect tags work... the autocompleter tag uses struts 2 js >> that don't come in the dojo distribution. > > Do these require changing dojo to be local as well as adding dojo.js > and such to the decorators <head>? Yeap, did all that... > >> >> And yes it takes forever to load/build the calendar. If you're going to >> use this tag just for the calendar I'd suggest using a faster one. (The >> optiontransferselect tag works, so my guess is every tag that doesn't >> use the ajax theme should work, haven't tested it though) > > I'm kind of at a loss of what to do. We can support Struts' > DateTimePicker by doing the Dojo hack. At that point, it seems to make > sense to use Dojo for Spring MVC's date picker as well. > > Here's the options as I seem them: > > 1. Use Dojo for Struts and Spring MVC. Pros: can use Struts widgets. > Cons: requires Selenium and will likely push the 2.0 release date back > a week or more. > > 2. Render regular input fields for dates (when using appfuse:gen) and > use some sort of popup calendar (jsCalendar or the scriptaculous one I > mentioned earlier). Pros: less invasive, you don't get 5 MB of Dojo > files in your project. Cons: Struts' datetimepicker won't work. > as soon as possible, as you've just said the Struts2 popup calendar is way slow, so I don't see the benefit from making it work this way. It would be better to see a tutorial in the site of how to get the jsCalendar or the scriptaculous one working though :). With the dojo unpacked the development cycle gets slow (jetty takes longer to get up). And for the ones that can't live without the ajax/datetimepicker tags there are proven workarounds :) (I'm using one ;)), we even could get lucky and get/produce a much better workaround. David M. > 3. Add Dojo and the hack so Struts users can use datetimepicker, but > use #2 for the code generation. > > #2 might take some work to get the CSS and JS working properly, but we > also might be able to hide/show Dojo DatePicker (not the > DropDownDatePicker). > > I've already got #1 done in my local workspace and in > appfuse-demos/struts2-crud, but I'm hesitant to check it in because of > the need to convert to Selenium to truly support it. #2 or #3 would > allow us to push off the Selenium conversion to a later date. > > Matt > >> >> David M. >> >> Matt Raible wrote: >> > It should - do you have an example you'd like me to try? There's lots >> > on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer >> > to try something that you've tried and doesn't work. >> > >> > Matt >> > >> > On 5/31/07, J. David Mendoza <[hidden email]> wrote: >> >> Does the autocompleter tag work with this solution? >> >> >> >> David M. >> >> >> >> Matt Raible wrote: >> >> > I took the debugging part out and used what the Struts folks were >> >> > outputting instead. >> >> > >> >> > <script type="text/javascript"> >> >> > // Dojo configuration >> >> > djConfig = { >> >> > baseRelativePath: "<c:url value='/scripts/dojo/'/>", >> >> > isDebug: false, >> >> > bindEncoding: "UTF-8" >> >> > }; >> >> > </script> >> >> > <script type="text/javascript" src="<c:url >> >> > value='/scripts/dojo/dojo.js'/>"></script> >> >> > >> >> > Of course, it should be easy enough to add it back in. >> >> > >> >> > A word of caution for folks hoping to use this widget. Dojo >> seems as >> >> > slow as ever - it takes a second or two for the calendar icons and >> >> > date input fields to appear on the page (after the rest of the page >> >> > has loaded). >> >> > >> >> > Matt >> >> > >> >> > On 5/30/07, Jason Thrasher <[hidden email]> wrote: >> >> >> >> >> >> Glad it worked! and +1 for adding to RC1. I forgot to mention >> that >> >> >> you can >> >> >> see dojo's debug output by adding this to the bottom of >> default.jsp: >> >> >> <authz:authorize ifAllGranted="ROLE_ADMIN"> >> >> >> <div id="dojoDebugOutput"></div> >> >> >> </authz:authorize> >> >> >> >> >> >> -Jason >> >> >> >> >> >> >> >> >> >> >> >> mraible wrote: >> >> >> > >> >> >> > Thanks Jason - these instructions worked! >> >> >> > >> >> >> > I'm going to make the following changes for RC1: >> >> >> > >> >> >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo >> >> >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users >> >> >> won't need >> >> >> > <s:head theme="ajax"/>). >> >> >> > 3. Modify decorators.xml and web.xml to properly include/exclude >> >> Dojo >> >> >> > requests. >> >> >> > 4. Add css to forms.css that makes the calendar look right on >> all >> >> >> > AppFuse's >> >> >> > default themes. >> >> >> > >> >> >> > I've re-opened APF-739 to track these changes. >> >> >> > >> >> >> > Matt >> >> >> > >> >> >> > On 5/27/07, thrasher <[hidden email]> wrote: >> >> >> >> >> >> >> >> >> >> >> >> Just a note after some testing: the aforementioned technique >> >> seems to >> >> >> >> work >> >> >> >> for M4 and M5. However, I didn't realize that this may be >> >> >> simplified in >> >> >> >> M5 >> >> >> >> by this: >> >> >> >> http://issues.appfuse.org/browse/APF-739 >> >> >> >> >> >> >> >> -Jason >> >> >> >> >> >> >> >> -- >> >> >> >> View this message in context: >> >> >> >> >> >> >> >> >> >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 >> >> >> >> >> >> >> >> >> >> Sent from the AppFuse - User mailing list archive at >> Nabble.com. >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> >> To unsubscribe, e-mail: [hidden email] >> >> >> >> For additional commands, e-mail: >> [hidden email] >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > http://raibledesigns.com >> >> >> > >> >> >> > >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> >> >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 >> >> >> >> >> >> >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: [hidden email] >> >> >> For additional commands, e-mail: [hidden email] >> >> >> >> >> >> >> >> > >> >> > >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [hidden email] >> >> For additional commands, e-mail: [hidden email] >> >> >> >> >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
On 5/31/07, J. David Mendoza <[hidden email]> wrote:
> Answered down below... > > Matt Raible wrote: > > On 5/31/07, J. David Mendoza <[hidden email]> wrote: > >> I've just tried the autocompleter after seen the datetimepicker and > >> optiontransferselect tags work... the autocompleter tag uses struts 2 js > >> that don't come in the dojo distribution. > > > > Do these require changing dojo to be local as well as adding dojo.js > > and such to the decorators <head>? > Yeap, did all that... > > > >> > >> And yes it takes forever to load/build the calendar. If you're going to > >> use this tag just for the calendar I'd suggest using a faster one. (The > >> optiontransferselect tag works, so my guess is every tag that doesn't > >> use the ajax theme should work, haven't tested it though) > > > > I'm kind of at a loss of what to do. We can support Struts' > > DateTimePicker by doing the Dojo hack. At that point, it seems to make > > sense to use Dojo for Spring MVC's date picker as well. > > > > Here's the options as I seem them: > > > > 1. Use Dojo for Struts and Spring MVC. Pros: can use Struts widgets. > > Cons: requires Selenium and will likely push the 2.0 release date back > > a week or more. > > > > 2. Render regular input fields for dates (when using appfuse:gen) and > > use some sort of popup calendar (jsCalendar or the scriptaculous one I > > mentioned earlier). Pros: less invasive, you don't get 5 MB of Dojo > > files in your project. Cons: Struts' datetimepicker won't work. > > > My suggestion is to use this one. This way we would have the RC1 release > as soon as possible, as you've just said the Struts2 popup calendar is > way slow, so I don't see the benefit from making it work this way. It > would be better to see a tutorial in the site of how to get the > jsCalendar or the scriptaculous one working though :). With the dojo > unpacked the development cycle gets slow (jetty takes longer to get up). > And for the ones that can't live without the ajax/datetimepicker tags > there are proven workarounds :) (I'm using one ;)), we even could get > lucky and get/produce a much better workaround. Spring MVC and Struts 2. The files (CSS and JS) are available for Tapestry and JSF too - but their datepickers works, so you shouldn't need it. Here's instructions for integrating into 2.0-RC1: http://issues.appfuse.org/browse/APF-268#action_11788 If you'd like to see all the changes to add this library, see: http://fisheye4.cenqua.com/changelog/appfuse/?cs=2764 If you'd like to use this functionality, I'd suggest upgrading to 2.0-rc1-SNAPSHOT. Attached is a screenshot of what it looks like by default when using AMP. Matt > > David M. > > 3. Add Dojo and the hack so Struts users can use datetimepicker, but > > use #2 for the code generation. > > > > #2 might take some work to get the CSS and JS working properly, but we > > also might be able to hide/show Dojo DatePicker (not the > > DropDownDatePicker). > > > > I've already got #1 done in my local workspace and in > > appfuse-demos/struts2-crud, but I'm hesitant to check it in because of > > the need to convert to Selenium to truly support it. #2 or #3 would > > allow us to push off the Selenium conversion to a later date. > > > > Matt > > > >> > >> David M. > >> > >> Matt Raible wrote: > >> > It should - do you have an example you'd like me to try? There's lots > >> > on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer > >> > to try something that you've tried and doesn't work. > >> > > >> > Matt > >> > > >> > On 5/31/07, J. David Mendoza <[hidden email]> wrote: > >> >> Does the autocompleter tag work with this solution? > >> >> > >> >> David M. > >> >> > >> >> Matt Raible wrote: > >> >> > I took the debugging part out and used what the Struts folks were > >> >> > outputting instead. > >> >> > > >> >> > <script type="text/javascript"> > >> >> > // Dojo configuration > >> >> > djConfig = { > >> >> > baseRelativePath: "<c:url value='/scripts/dojo/'/>", > >> >> > isDebug: false, > >> >> > bindEncoding: "UTF-8" > >> >> > }; > >> >> > </script> > >> >> > <script type="text/javascript" src="<c:url > >> >> > value='/scripts/dojo/dojo.js'/>"></script> > >> >> > > >> >> > Of course, it should be easy enough to add it back in. > >> >> > > >> >> > A word of caution for folks hoping to use this widget. Dojo > >> seems as > >> >> > slow as ever - it takes a second or two for the calendar icons and > >> >> > date input fields to appear on the page (after the rest of the page > >> >> > has loaded). > >> >> > > >> >> > Matt > >> >> > > >> >> > On 5/30/07, Jason Thrasher <[hidden email]> wrote: > >> >> >> > >> >> >> Glad it worked! and +1 for adding to RC1. I forgot to mention > >> that > >> >> >> you can > >> >> >> see dojo's debug output by adding this to the bottom of > >> default.jsp: > >> >> >> <authz:authorize ifAllGranted="ROLE_ADMIN"> > >> >> >> <div id="dojoDebugOutput"></div> > >> >> >> </authz:authorize> > >> >> >> > >> >> >> -Jason > >> >> >> > >> >> >> > >> >> >> > >> >> >> mraible wrote: > >> >> >> > > >> >> >> > Thanks Jason - these instructions worked! > >> >> >> > > >> >> >> > I'm going to make the following changes for RC1: > >> >> >> > > >> >> >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo > >> >> >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users > >> >> >> won't need > >> >> >> > <s:head theme="ajax"/>). > >> >> >> > 3. Modify decorators.xml and web.xml to properly include/exclude > >> >> Dojo > >> >> >> > requests. > >> >> >> > 4. Add css to forms.css that makes the calendar look right on > >> all > >> >> >> > AppFuse's > >> >> >> > default themes. > >> >> >> > > >> >> >> > I've re-opened APF-739 to track these changes. > >> >> >> > > >> >> >> > Matt > >> >> >> > > >> >> >> > On 5/27/07, thrasher <[hidden email]> wrote: > >> >> >> >> > >> >> >> >> > >> >> >> >> Just a note after some testing: the aforementioned technique > >> >> seems to > >> >> >> >> work > >> >> >> >> for M4 and M5. However, I didn't realize that this may be > >> >> >> simplified in > >> >> >> >> M5 > >> >> >> >> by this: > >> >> >> >> http://issues.appfuse.org/browse/APF-739 > >> >> >> >> > >> >> >> >> -Jason > >> >> >> >> > >> >> >> >> -- > >> >> >> >> View this message in context: > >> >> >> >> > >> >> >> > >> >> > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 > >> > >> >> > >> >> >> > >> >> >> >> Sent from the AppFuse - User mailing list archive at > >> Nabble.com. > >> >> >> >> > >> >> >> >> > >> >> --------------------------------------------------------------------- > >> >> >> >> To unsubscribe, e-mail: [hidden email] > >> >> >> >> For additional commands, e-mail: > >> [hidden email] > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > -- > >> >> >> > http://raibledesigns.com > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> -- > >> >> >> View this message in context: > >> >> >> > >> >> > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 > >> > >> >> > >> >> >> > >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> >> >> > >> >> >> > >> --------------------------------------------------------------------- > >> >> >> To unsubscribe, e-mail: [hidden email] > >> >> >> For additional commands, e-mail: [hidden email] > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [hidden email] > >> >> For additional commands, e-mail: [hidden email] > >> >> > >> >> > >> > > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [hidden email] > >> For additional commands, e-mail: [hidden email] > >> > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
FWIW, I checked all the Dojo integration into the "dojo-integration"
branch. If you'd like to see how to implement the DropdownDatePicker widget with Struts or Spring MVC, checkout the following links. https://guest:@appfuse.dev.java.net/svn/appfuse/branches/dojo-integration/ Changelog: http://fisheye4.cenqua.com/changelog/appfuse/?cs=2756 Matt On 6/1/07, Matt Raible <[hidden email]> wrote: > On 5/31/07, J. David Mendoza <[hidden email]> wrote: > > Answered down below... > > > > Matt Raible wrote: > > > On 5/31/07, J. David Mendoza <[hidden email]> wrote: > > >> I've just tried the autocompleter after seen the datetimepicker and > > >> optiontransferselect tags work... the autocompleter tag uses struts 2 js > > >> that don't come in the dojo distribution. > > > > > > Do these require changing dojo to be local as well as adding dojo.js > > > and such to the decorators <head>? > > Yeap, did all that... > > > > > >> > > >> And yes it takes forever to load/build the calendar. If you're going to > > >> use this tag just for the calendar I'd suggest using a faster one. (The > > >> optiontransferselect tag works, so my guess is every tag that doesn't > > >> use the ajax theme should work, haven't tested it though) > > > > > > I'm kind of at a loss of what to do. We can support Struts' > > > DateTimePicker by doing the Dojo hack. At that point, it seems to make > > > sense to use Dojo for Spring MVC's date picker as well. > > > > > > Here's the options as I seem them: > > > > > > 1. Use Dojo for Struts and Spring MVC. Pros: can use Struts widgets. > > > Cons: requires Selenium and will likely push the 2.0 release date back > > > a week or more. > > > > > > 2. Render regular input fields for dates (when using appfuse:gen) and > > > use some sort of popup calendar (jsCalendar or the scriptaculous one I > > > mentioned earlier). Pros: less invasive, you don't get 5 MB of Dojo > > > files in your project. Cons: Struts' datetimepicker won't work. > > > > > My suggestion is to use this one. This way we would have the RC1 release > > as soon as possible, as you've just said the Struts2 popup calendar is > > way slow, so I don't see the benefit from making it work this way. It > > would be better to see a tutorial in the site of how to get the > > jsCalendar or the scriptaculous one working though :). With the dojo > > unpacked the development cycle gets slow (jetty takes longer to get up). > > And for the ones that can't live without the ajax/datetimepicker tags > > there are proven workarounds :) (I'm using one ;)), we even could get > > lucky and get/produce a much better workaround. > > I ended up implementing jscalendar (http://jscalendar.sf.net) for both > Spring MVC and Struts 2. The files (CSS and JS) are available for > Tapestry and JSF too - but their datepickers works, so you shouldn't > need it. Here's instructions for integrating into 2.0-RC1: > > http://issues.appfuse.org/browse/APF-268#action_11788 > > If you'd like to see all the changes to add this library, see: > > http://fisheye4.cenqua.com/changelog/appfuse/?cs=2764 > > If you'd like to use this functionality, I'd suggest upgrading to > 2.0-rc1-SNAPSHOT. Attached is a screenshot of what it looks like by > default when using AMP. > > Matt > > > > > David M. > > > 3. Add Dojo and the hack so Struts users can use datetimepicker, but > > > use #2 for the code generation. > > > > > > #2 might take some work to get the CSS and JS working properly, but we > > > also might be able to hide/show Dojo DatePicker (not the > > > DropDownDatePicker). > > > > > > I've already got #1 done in my local workspace and in > > > appfuse-demos/struts2-crud, but I'm hesitant to check it in because of > > > the need to convert to Selenium to truly support it. #2 or #3 would > > > allow us to push off the Selenium conversion to a later date. > > > > > > Matt > > > > > >> > > >> David M. > > >> > > >> Matt Raible wrote: > > >> > It should - do you have an example you'd like me to try? There's lots > > >> > on http://struts.apache.org/2.0.6/docs/ajax-tags.html, but I'd prefer > > >> > to try something that you've tried and doesn't work. > > >> > > > >> > Matt > > >> > > > >> > On 5/31/07, J. David Mendoza <[hidden email]> wrote: > > >> >> Does the autocompleter tag work with this solution? > > >> >> > > >> >> David M. > > >> >> > > >> >> Matt Raible wrote: > > >> >> > I took the debugging part out and used what the Struts folks were > > >> >> > outputting instead. > > >> >> > > > >> >> > <script type="text/javascript"> > > >> >> > // Dojo configuration > > >> >> > djConfig = { > > >> >> > baseRelativePath: "<c:url value='/scripts/dojo/'/>", > > >> >> > isDebug: false, > > >> >> > bindEncoding: "UTF-8" > > >> >> > }; > > >> >> > </script> > > >> >> > <script type="text/javascript" src="<c:url > > >> >> > value='/scripts/dojo/dojo.js'/>"></script> > > >> >> > > > >> >> > Of course, it should be easy enough to add it back in. > > >> >> > > > >> >> > A word of caution for folks hoping to use this widget. Dojo > > >> seems as > > >> >> > slow as ever - it takes a second or two for the calendar icons and > > >> >> > date input fields to appear on the page (after the rest of the page > > >> >> > has loaded). > > >> >> > > > >> >> > Matt > > >> >> > > > >> >> > On 5/30/07, Jason Thrasher <[hidden email]> wrote: > > >> >> >> > > >> >> >> Glad it worked! and +1 for adding to RC1. I forgot to mention > > >> that > > >> >> >> you can > > >> >> >> see dojo's debug output by adding this to the bottom of > > >> default.jsp: > > >> >> >> <authz:authorize ifAllGranted="ROLE_ADMIN"> > > >> >> >> <div id="dojoDebugOutput"></div> > > >> >> >> </authz:authorize> > > >> >> >> > > >> >> >> -Jason > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> mraible wrote: > > >> >> >> > > > >> >> >> > Thanks Jason - these instructions worked! > > >> >> >> > > > >> >> >> > I'm going to make the following changes for RC1: > > >> >> >> > > > >> >> >> > 1. Add Dojo 0.4.3 to struts/src/main/webapp/scripts/dojo > > >> >> >> > 2. Change Struts' decorators/default.jsp to load Dojo (so users > > >> >> >> won't need > > >> >> >> > <s:head theme="ajax"/>). > > >> >> >> > 3. Modify decorators.xml and web.xml to properly include/exclude > > >> >> Dojo > > >> >> >> > requests. > > >> >> >> > 4. Add css to forms.css that makes the calendar look right on > > >> all > > >> >> >> > AppFuse's > > >> >> >> > default themes. > > >> >> >> > > > >> >> >> > I've re-opened APF-739 to track these changes. > > >> >> >> > > > >> >> >> > Matt > > >> >> >> > > > >> >> >> > On 5/27/07, thrasher <[hidden email]> wrote: > > >> >> >> >> > > >> >> >> >> > > >> >> >> >> Just a note after some testing: the aforementioned technique > > >> >> seems to > > >> >> >> >> work > > >> >> >> >> for M4 and M5. However, I didn't realize that this may be > > >> >> >> simplified in > > >> >> >> >> M5 > > >> >> >> >> by this: > > >> >> >> >> http://issues.appfuse.org/browse/APF-739 > > >> >> >> >> > > >> >> >> >> -Jason > > >> >> >> >> > > >> >> >> >> -- > > >> >> >> >> View this message in context: > > >> >> >> >> > > >> >> >> > > >> >> > > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10830881 > > >> > > >> >> > > >> >> >> > > >> >> >> >> Sent from the AppFuse - User mailing list archive at > > >> Nabble.com. > > >> >> >> >> > > >> >> >> >> > > >> >> --------------------------------------------------------------------- > > >> >> >> >> To unsubscribe, e-mail: [hidden email] > > >> >> >> >> For additional commands, e-mail: > > >> [hidden email] > > >> >> >> >> > > >> >> >> >> > > >> >> >> > > > >> >> >> > > > >> >> >> > -- > > >> >> >> > http://raibledesigns.com > > >> >> >> > > > >> >> >> > > > >> >> >> > > >> >> >> -- > > >> >> >> View this message in context: > > >> >> >> > > >> >> > > >> http://www.nabble.com/ajax-and-datepicker-on-2m4-tf3813840s2369.html#a10884706 > > >> > > >> >> > > >> >> >> > > >> >> >> Sent from the AppFuse - User mailing list archive at Nabble.com. > > >> >> >> > > >> >> >> > > >> --------------------------------------------------------------------- > > >> >> >> To unsubscribe, e-mail: [hidden email] > > >> >> >> For additional commands, e-mail: [hidden email] > > >> >> >> > > >> >> >> > > >> >> > > > >> >> > > > >> >> > > >> >> --------------------------------------------------------------------- > > >> >> To unsubscribe, e-mail: [hidden email] > > >> >> For additional commands, e-mail: [hidden email] > > >> >> > > >> >> > > >> > > > >> > > > >> > > >> --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: [hidden email] > > >> For additional commands, e-mail: [hidden email] > > >> > > >> > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > -- > http://raibledesigns.com > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |