• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

struts 2: ajax theme problem

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am creating 2 select boxes in struts 2 page. on selecting the first select box, the values in the second box will update using ajax theme. i have written the below jsp code:

i added struts2-dojo-plugin-2.1.6.jar and json-lib-2.1.jar to my lib folder for ajax support.



but i am getting the freemarker template error:

Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl.


i added <sx:head parseContent="false"/> to resolve the error. but its still coming.

any help will be highly appreciated. thank you.
 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
now, i have removed all the complexities from the above code. infact, just by including <s:head theme="ajax" /> tag under head tag the same error is coming:

Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl.

please help me in resolving the error.

i guess, i am getting the error because of one of the three reasons:
1. i might not have included a required jar file to lib folder.
2. Or, there is some versioning issue.
3. Or, there is any settings to be done before using ajax theme?

please check the list of jars i have included in the lib folder:

commons-digester-2.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.0.4.jar
commons-logging-api-1.1.jar
commons-validator-1.3.1.jar
freemarker-2.3.15.jar
json-lib-2.1.jar
ognl-2.7.3.jar
struts2-convention-plugin-2.1.8.jar
struts2-core-2.1.8.jar
struts2-dojo-plugin-2.1.8.jar
struts2-sitemesh-plugin-2.1.8.jar
struts2-tiles-plugin-2.1.8.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar
xwork-core-2.1.6.jar
 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Dojo plugin will be deprecated on Struts 2.1

this is mentioned in the http://struts.apache.org/2.1.6/docs/ajax-and-javascript-recipes.html site. so, do we use any other plug-in for ajax theme support in struts 2.1.8 version. please suggest.
 
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
The <s:head> tag shouldn't have an "ajax" theme in S2.1.

There's no direct replacement for the Dojo widgets as of yet. A few people are working on a jQuery plugin (I believe it's currently in the sandbox, so you could use it if you wanted) but I don't know what, if any, jQuery UI widgets it's currently using.

Personally, I do almost all JavaScript-type stuff manually without the use of a custom tag library. It gives me a lot more control over when, and how, my JavaScript is loaded.
 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks newton for the response. i guess then i should also use javascript instead.
reply
    Bookmark Topic Watch Topic
  • New Topic