But what I want to do is pass a empty collection to a select box without having to go through an action class. I have the following code and in MyActionClass all I am doing is setting an empty collection (areas)
struts.xml
jsp page
If I can pass an empty collection parameter then I can avoid having MyActionClass? (The select does eventually get populated via javascript according to client interaction with the html...)
i have two select boxes. when an option in the first one is selected the areas select is updated. when the client hits the submit button validation takes place and if that validation fails it will redirect to the page and should display the areas which were present prior to hitting submit
You said you were populating it with JavaScript: you can't have it both ways.
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
posted
0
In my last post I was doing what you suggested "Just use an empty list via OGNL" which is not what I want. What I want was clearly specified in my first post. Is anyone else able to provide a code example. cheers
In your first post you wrote:But what I want to do is pass a empty collection to a select box without having to go through an action class
But now you're saying you *sometimes* want to pass an empty collection, and sometimes you don't.
That's different.
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
posted
0
What I require was clearly specified in my first two posts. Those who understand the requirements if you are able to assist with the issue it would be much appreciated. cheers
You can either specify an immediate list, or you can load the appropriate list via an action property. The bottom line is that you can't do both; you need to decide which you're going to do. Assuming I don't understand your problem is unlikely to lead to a solution.
vik ar
Ranch Hand
Joined: Jul 31, 2009
Posts: 104
posted
0
In that case on the intitial load of the page I will have to continue to pass an empty collection via a action class. thanks for the assistance.