• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Struts 2 s:div doubleselect problem ?

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the rendered HTML look like?
 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
What? What, what, what? What what tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic