-
Jul 30th, 2007, 08:13 AM
#1
Traverse and polpulate a list on jsp -- please help
The problem i am facing is:-
I have to read all file names from a Directory and populate them in a drop down.
String[] myResult = getTemplates(myURL+"/templates");
ArrayList myResultList = new ArrayList(Arrays.asList(myResult ));
ex1.setmyResultListName(myResultList);
return ex1;
--------------------------------this is where i declare the arraylist
class ex1{
private ArrayList mylist;
--------------------------------------
<td colspan="1">Template Name
<smvc:select path="templateName" cssClass="smallFont" id="Template">
<smvc:option value="">Select Template Name</smvc:option>
<c:forEach var="qfm" items="${command.mylist}" varStatus="s">
<smvc:option value="${qfm}">${qfm}</smvc:option>
</c:forEach>
</smvc:select>
</td>
i am unable to find a way to traverse this lsit and get it populated i'll really appreciate your help.
Thanks in advance
-
Jul 31st, 2007, 12:59 AM
#2
its done
it s done .. i just typecast it into a generic arraylist of one of the pojo class type.
It works fine now
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules