Announcement Announcement Module
Collapse
No announcement yet.
Traverse and polpulate a list on jsp -- please help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X