Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

JSP combobox problem

  • 01-05-2012 06:56PM
    #1
    Closed Accounts Posts: 82 ✭✭


    I am working on my FYP and i need to create new jobs that will be added to the database.At the moment i am trying to populate the combobox with skills from the database.My problem is with the following JSP code is that the combobox is diplayed on the page but no skills are in the dropdown??% Also there is a textfield appearing above the combobox that i have not asked to display.Thanks

    JSP:

    <s:form action="createJobs">
    <s:textfield name="jobName" label="Job Name" />
    <s:textfield name="startDate" label="Start Date"/>
    <s:textfield name="endDate" label="End Date" />
    <s:textfield name="salary" label="Salary" />
    <s:textfield name="description" label="Description" />
    <s:combobox label="Skill" name="skillName" list="skills"/>
    <s:submit />
    </s:form>




    session.put("skillName", getSkillName());
    session.put("skills", this.skills);
    this.skillsQuery();//populate skillsSet
    this.skills = new ArrayList<Skill>();

    System.out.println("before");
    Collections.sort(skills);
    System.out.println("after");
    session.put("skills", this.skills);
    System.out.println(skills.size());


Advertisement