Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A cleaner way to display LinkedHashMap/ArrayList

 
Crystal Bazil
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a process I am trying to display using JSTL. The process is as follows:



So in theory the form could look something like this




I am storing my data for each section in an ArrayList of LinkedHashMaps whose values are ArrayLists.

And currently to display the data I am counting the items in the ArrayList and displaying accordingly.


It all works but.. it's ugly. I am just curious if there is an easier way to do this? Any direction would be appreciated!

Crystal
[ September 19, 2007: Message edited by: Crystal Bazil ]
 
Crystal Bazil
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First I removed the first ArrayList, not sure why I had that in there. Secondly, I dug around and found what I would like to accomplish. I am still running into problems. See below.



Current Display




Wanted Display





When I attempt the 2nd JSTL display I get the error :




I followed a couple examples I have found on the forums/google but each variation proves the same error message. I think I am maybe not setting things properly but am not sure what I need to do. Any direction on this would be appreciated. Thanks!

Crystal
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.servlet.ServletException: Unable to find a value for "value" in object of class "java.lang.String" using operator "."

That message usually happens when you forget to wrap a value with the ${} chars, meaning that you're dealing with a string instead of an object.
 
Crystal Bazil
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben - That sorta helped but moreso confused me. I am still exetremely confused about what I am doing however so extended help would be appreciated. I am going to post relevent bits of my code so you can get the full picture.


Servlet


Method


Interface



Process.java




JSP



My question/trouble is how can I call the ArrayList items(affect,class_) by name when I iterate through the ArrayList? Apparently, I am not doing something right when I am creating the list but I am not sure what I should be doing.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic