Hi Nathan/Prasad,
 
We had implemented this a couple of years ago, so can't exactly remember how I did it, but we definitely used only Javascript. Basically we created an array of Javascript objects(Option objects) that are used by HTML element Selectbox for populating it's elements.
 
This will very easily solves what you really want. But this mechanism has it's inherent problems.
 
(a) You will have a chunk of data on the client side and that is what you'll have to live with because you are not requesting the data from the server once the page is loaded in the client browser.
(b) Because there is only 1 request to the server to fetch all the data, there are chances that the data that user has, may be stale.
This purely depends on your application and how frequent does the data change.
To make things clearer, here are 2 example scenarios which will explain what I am talking about.
 
e.g -->   
1.)        This example is no problem, because this data is not going to change frequently.
            Dropdown 1 --> List Of Countries,
            Dropdown 2 --> List of States in 1 specific country (selected in Dropdown1),
            Dropdown 3 --> List of Cities in 1 specific state (selected in Dropdown2).
 
2.)        You may have a problem here, if your application has to fetch data that changes very frequently.
            Dropdown 1 --> List Of Discussion Forums in a User Group,
            Dropdown 2 --> List of Discussion Topics in 1 specific Forum(selected in Dropdown1),
            Dropdown 3 --> List of User Postings in 1 specific Category(selected in Dropdown2).
 
When we developed this solution there were no custom tags so we had one query to fetch all the data and then we build objects in Javascript to play with it.
Using customtags, what u can do is maybe give a more concrete structure in a way the fetched data is stored in collection objects, so the data extraction in javascript is much more simpler. Needless to mention, java being much more powerful than javascript, maximum work shud be done in java, essentially your custom-tag.
 
 
Let me know if this was of any help.
 
 
Good Luck,
 
- J.U
 
----- Original Message -----
From: nathan
To: JDJList
Sent: Wednesday, October 17, 2001 11:58 PM
Subject: [jdjlist] JSP TAGS Interaction

I am not sure how to handle the following.
 
I need to a  WEB From which three drop down having Grand parent, Parent, Child Relation. If the user select an option on
the Grand Parent the Parent dropdown should show the items filtered based on the selection. The same relation holds good for
parent and child drop down. 
 
I am trying to create a Reusable JSP Custom tag Which will show items on the dropdown.
 
I am not sure how do I send information form Grand Parent to Parent Dropdown?
 
I am not sure this cannot be achieved with JSP TAGS. 
 
Do I need to use JAVA SCRIPT to achive this?
 
I Welcome  suggestions.
 
Thanks in Advance.
 
Prasad
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to