R
Robert Jones
Ok Folks, I've got a problem using the iteration variable from a forEach
tag in a custom tag I wrote. The custom tag is supposed to use the
iteration variable as an index into an array. When I try to access the
JSP page I get the following exception:
org.apache.jasper.JasperException: For input string: "${current}"
Along with this Root Cause:
java.lang.NumberFormatException: For input string: "${current}"
Now, I've defined my custom tag to take index as a String, Integer or
int. I've basically overloaded the setIndex function.
<c:forEach begin="0" end="5" step="1" var="current">
<tr>
<td><salsys:location index="${current}" type="location" /></td>
<td><salsys:location index="${current}" type="calloutNumber" /></td>
</tr>
</c:forEach>
So anyway, I've just come across something that says I can't use the EL
evaluator with Custom Actions. Fine. Then my problem is as follows:
I need to examine a list of files, whose names have the same canonical
form, i.e. x.location. This list is variable from one invocation to the
next. I then want to display some information about each file.
I've written a bean that can get a list of x.location files and stores
the properties I need access to (I've written the appropriate getter
methods). I also wrote a corresponding custom tag to get access to the
bean.
So, how can I handle the variable list of files? Do I have to do
everything in the custom tag? This seems kind of clunky as it will
require me to tie the view to the controller. What am I missing?
I'm not really sure where this questions falls, so I cross-posted.
Thanks,
Robert Jones
tag in a custom tag I wrote. The custom tag is supposed to use the
iteration variable as an index into an array. When I try to access the
JSP page I get the following exception:
org.apache.jasper.JasperException: For input string: "${current}"
Along with this Root Cause:
java.lang.NumberFormatException: For input string: "${current}"
Now, I've defined my custom tag to take index as a String, Integer or
int. I've basically overloaded the setIndex function.
<c:forEach begin="0" end="5" step="1" var="current">
<tr>
<td><salsys:location index="${current}" type="location" /></td>
<td><salsys:location index="${current}" type="calloutNumber" /></td>
</tr>
</c:forEach>
So anyway, I've just come across something that says I can't use the EL
evaluator with Custom Actions. Fine. Then my problem is as follows:
I need to examine a list of files, whose names have the same canonical
form, i.e. x.location. This list is variable from one invocation to the
next. I then want to display some information about each file.
I've written a bean that can get a list of x.location files and stores
the properties I need access to (I've written the appropriate getter
methods). I also wrote a corresponding custom tag to get access to the
bean.
So, how can I handle the variable list of files? Do I have to do
everything in the custom tag? This seems kind of clunky as it will
require me to tie the view to the controller. What am I missing?
I'm not really sure where this questions falls, so I cross-posted.
Thanks,
Robert Jones