• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Struts 2: datetimepicker tag

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see the Dojo plugin is or will be deprecated. I need a date picker for an app I'm writing. Should I use the datetimepicker tag or look elsewhere?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Meh: personally, I'd look elsewhere. I'm not sure if they're doing a date/time thing for the new jQuery plugin, though--if they are, I'd consider that since it's likely to be supported for some time. (See [1])

As a personal preference, I do all my JavaScript "raw" since taglibs have a tendency to scatter JavaScript throughout the page and take away my ability to control it.

[1] We really just got rid of the Dojo tags because the Dojo API changed so much between 0.4.3 and 1.0 and the amount of work was a bit overwhelming.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried the jQuery plugin? I can't get it to work. I dropped the struts2-jquery-plugin-1.7.3.jar into my WEB-INF/lib directory and added a date picker to my JSP page:


When the page loads, I get a Javascript error:


Googling for "$elem.datepicker is not a function" returns no hits. Any ideas?>
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was talking about the official Struts 2 jQuery plugin (currently in the sandbox, maybe?) and I don't know which, if any, widgets it includes out-of-the-box.

I do, however, believe that the plugin you're talking about has a "jqueryui" attribute that needs to be set for the datepicker to work, if I'm reading the example correctly:I might be misunderstanding what that attribute does, though.

Edit: Based on the info here, I'd say I'm guessing right.

But to answer your question, no, I haven't used it.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:I was talking about the official Struts 2 jQuery plugin (currently in the sandbox, maybe?) and I don't know which, if any, widgets it includes out-of-the-box.



Ah, I just searched for "struts 2 jquery plugin" and picked the first one that came up. It appears to be the same one in the Struts 2 Wiki. Am I looking in the wrong place?

David Newton wrote:I do, however, believe that the plugin you're talking about has a "jqueryui" attribute that needs to be set for the datepicker to work, i



That did the trick. You saved my day!
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Woohoo!

Well, the official one is still only quasi-official (that may have changed--I've been out-of-the-loop for the last couple of months). IIRC some of the features of the Google code one are being baked in to the official release, but I'm not sure. The struts-user list would be the best place to look for info about all that.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic