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 <[EMAIL PROTECTED]> wrote:
On 5/31/07, J. David Mendoza <[EMAIL PROTECTED]> wrote: > Answered down below... > > Matt Raible wrote: > > On 5/31/07, J. David Mendoza <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > >> >> >> >> For additional commands, e-mail: > >> [EMAIL PROTECTED] > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > -- > >> >> >> > 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: [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] > > -- http://raibledesigns.com
-- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
