The following code works. I believe it is because I have a Rule.java object as my middle tier and a RuleDAO.java object as my backend and the jstl tag somehow magically knows this. If I experiment and change the name of my class, or change the name of the list in forEach, the data does not surface in my list. So I am going forward with a bit of faith. My next step is to try to modify the query that is being executed in RuleDAO.java based on the dropdown lists that I have added. User will choose values from the selection boxes and I will take their selected values and "SOMEHOW" create a where clause that I can use/append to the magic of the forEach.
Two questions, obiwan (or obiwans).
1. Is this possible or do I have to use another approach.
2. If possible, can I get a hint?
Maybe I should restate what I want, now that I am closer and...
I have the page that displays a list of all rows.
I have added a form and a number of select boxes.
When the user first requests the page, they get all rows. Then, they can choose to filter by selecting values from the dropdowns. When they submit the form, I do a 'Get' instead of a 'Post' and drop through code in my controller where I can build my where clause, then call a different DAO method that handles the where clause and returns a jimited rowset.
OK, sounds straight-forward enough. It doesn't seem to have much to do with the forEach tags though. They'll just iterate through whatever is sent to the JSP.
What's the real issue?
P.S. I've done similar things in the past; but I would not show all the data at outset. Why bother to fetch and show a bunch of stuff they;re just going to filter away? Or are you also paging as well as filtering?
I have found, through out my career, that when I am noodling on something, I often times don't know what the real issue is until I begin trying to spell it out to someone. Then, just with the process of give and take, someone, you in this case, says one thing that leads me to a clearer understanding of what I am after. In this case, I was after an approach to build a where clause based on user input -- to filter the list. And I have it -- almost -- working. Next step will be to use the displayTag ( I think that is what it is called) to paginate, and introduce sorting of columns. I believe with displayTag, I will be able to return just a few rows. I didn't intend to return all rows but before I get to pagination, sorting, I had to deal with the mechanism for filtering.
stephen r davidson wrote:I have found, through out my career, that when I am noodling on something, I often times don't know what the real issue is until I begin trying to spell it out to someone. Then, just with the process of give and take, someone, you in this case, says one thing that leads me to a clearer understanding of what I am after.
In the worst case you get the second-rate solution implemented and in production before somebody points out the real answer. But yeah, talking to somebody who doesn't know what the heck you're talking about is often a good strategy.