This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Struts 2 s:div doubleselect problem ?

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to implement doubleselect functionality using the struts s:div tag in my application.

On jsp page there is Department and Employee Select tag, when user selects department i want to populate the employee select tag with the employee in that Department.

The struts2 select tag for Department is as follows:

and the script function is follows:

when i hit the URL it will populate the Employee Select Box with Defalut values which we have assigned to Headerkey in Department Tag....

But it will never display me alert box ? Can you please tell me what is the problem in this code ?

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the rendered HTML look like?
 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thanks for reply!
It is working now...
The problem is in a javascript function..... it did not get called on onchange event....so i put it in header then it works....

Anyways...i want some another solution for populate select boxes down in the hierarchy.... e.g. Suppose i have departments, managers for that department, supervisors working under that manager in that particular department... and under that super wiser i want to add Employee.....

Obviously...i want to show user the the 3 select Boxes for selection....here i want to populate the manager select box according to department and so on ....so i use dojo plugin but it has much complex, deprecated and it will not populate downside box after selection.....

Now, i am using jquery plugin.....for that but it too gives me freemarker template error though i am not using the freemarket template ? i don't know what is wrong...

can you please help me for the clue or any other way to implement above functionality ?
 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i am using jquery plugin to populate select box in downtree....

After running the application...the very first Department List is also empty... and FreeMarker Template error shows on the screen...
The error is as follows:


FreeMarker template error!

Error reading included file template/simple/css.ftl
The problematic instruction:
----------
==> include "/${parameters.templateDir}/simple/css.ftl" [on line 40, column 1 in template/jquery/select.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateException: Error reading included file template/simple/css.ftl
at freemarker.core.Include.accept(Include.java:153)



So, can you please help me regarding the same ?

You reply is highly appreciated.

Thanks
Rahul
 
This is my favorite show. And this is my favorite tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!