|
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
____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________ |
- [jdjlist] JSP TAGS Interaction nathan
- [jdjlist] Re: JSP TAGS Interaction Java User
- [jdjlist] Re: JSP TAGS Interaction willineuer
