aspose file tools*
The moose likes Struts and the fly likes Struts 2 s:div doubleselect problem ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 s:div doubleselect problem ?" Watch "Struts 2 s:div doubleselect problem ?" New topic
Author

Struts 2 s:div doubleselect problem ?

Rahul Nair
Ranch Hand

Joined: Dec 01, 2007
Posts: 138
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 ?

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What does the rendered HTML look like?
Rahul Nair
Ranch Hand

Joined: Dec 01, 2007
Posts: 138
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

Joined: Dec 01, 2007
Posts: 138
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 s:div doubleselect problem ?
 
Similar Threads
jQuery select option
<s:select onchange="changeAmt()"> not working
Sorting array in bind("change", function()
Populating subsequent select boxes with DWR
how to hide and show contents with struts2 div tag