Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 - DateTimePicker

 
Scott Selikoff
author
Saloon Keeper
Posts: 3895
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to implement the 'easy to use' datetimepicker (or datepicker) for a Struts 2 application based on this example and I'm getting the following error when I use the tag:

org.apache.jasper.JasperException: /MyApp.jsp(21,1) No tag "datetimepicker" defined in tag library imported with prefix "s"

I opened up the struts-tags.tld library for 2.1.6 and I don't see the tag defined. I'm guessing I'm missing a library but I can't tell which one.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3895
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I found the solution... I added the "struts2-dojo-plugin-2.1.6.jar" to my class-path and I added a second tag library:

<%@taglib prefix="d" uri="/struts-dojo-tags"%>

I must have 'missed' the documentation that covered these steps.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The S2.1 series release notes discuss the move to a Dojo tag plugin and the Ajax tag documentation includes the same information. As has been noted by others here on JavaRanch, RoseIndia isn't always your best bet for reliable, current information.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3895
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RoseIndia seems to come up with a lot of examples in google. Either way I'm still having trouble with the datetimepicker. The code compiles and runs, but it doesn't do much, as in, I see "Enter Date:" but that's about it. What other config do I need to add/install to make it work?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Number of hits != useful.

Do you have the <sx:head/> tag in your pages <head> section? (Also in the S2 docs.)
 
Scott Selikoff
author
Saloon Keeper
Posts: 3895
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, that did it. I saw an empty tag when the include ajax theme was taken out, and just 'assumed' it wasn't do anything anymore. My bad.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic