Ok this seems weird....

There is a map with some keys named
field.0.type, field.1.type etc (don't ask reasoning, I was given this:)

There is also fieldCount as a map property so I know how many of the annoying field.X.type keys there are.

What I need to do now is loop over the count and get out the value of the keys (field.1.type, etc). So what I intially have is:

<c:forEach begin="0" end="${fieldCount - 1}" var="fieldNum">
  <c:set var='theField'
  value='${metaProps["field."+fieldNum+".type"]}'/>
...

When doing the above I get the error...

javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/associateProfile.jsp': An exception occured
trying to convert String "field." to type "java.lang.Double"


I even tried using the fn:trim tag which is supposed to return a String thinking that should work:

<c:set var='theField' value='${metaProps["field."+fn:trim(fieldNum)+".type"]}'/>

and yet same error!

I know I can get around this by setting the value in a temporary var, but there must be a way to display this in one expression?

Ideas what could be going wrong? Stupid Human Error? Thanks.

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to