Results 1 to 3 of 3

Thread: select list values

  1. #1
    Join Date
    Apr 2005
    Posts
    6

    Default select list values

    Hi Everybody

    Iam working Spring MVC with Hibernate. to selecting values from list i have written follwing code


    <spring:bind path="configContNew.contWhId">
    <tr>
    <td><span class="styleScrName">
    <fmt:message key="NGV_WAREHOUSE.WAREHOUSEID"/>
    </span></td>
    <td><span class="styleEntrFld">
    <select name="contWhId">
    <option selected value="">
    <c:forEach var="myval" items="${configContNew.whTable}">
    <OPTION VALUE="<c:out value="${myval}"/>" > <c:out value="${myval}"/> </OPTION>
    </c:forEach>
    </select>
    </span></td>
    </tr>
    </spring:bind>

    iam unable to binding this values the error iam getting is as follws



    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items" w
    ith value "${configContNew. WhTable}": Unable to find a value for "WhTable" in object of class "com.
    voxware.voxmanager.command.ConfigContSearch2Comman d" using operator "." (null)
    at org.apache.taglibs.standard.lang.jstl.Evaluator.ev aluate(Evaluator.java:146)
    at org.apache.taglibs.standard.lang.jstl.Evaluator.ev aluate(Evaluator.java:166)
    at org.apache.taglibs.standard.lang.support.Expressio nEvaluatorManager.evaluate(ExpressionEv
    aluatorManager.java:112)

    please let me know about this ..
    Thanks & regards
    Rasheed M.A
    Paradigm Hyderabad :o :shock: :? :lol: :x :oops: :cry: :wink: :arrow: :idea: :?: :!:

  2. #2
    Join Date
    Apr 2005
    Posts
    6

    Default Re: select list values

    Quote Originally Posted by Rasheed
    Hi Everybody

    Iam working Spring MVC with Hibernate. to selecting values from list i have written follwing code


    <spring:bind path="configContNew.contWhId">
    <tr>
    <td><span class="styleScrName">
    <fmt:message key="NGV_WAREHOUSE.WAREHOUSEID"/>
    </span></td>
    <td><span class="styleEntrFld">
    <select name="contWhId">
    <option selected value="">
    <c:forEach var="myval" items="${configContNew.whTable}">
    <OPTION VALUE="<c:out value="${myval}"/>" > <c:out value="${myval}"/> </OPTION>
    </c:forEach>
    </select>
    </span></td>
    </tr>
    </spring:bind>

    iam unable to binding this values the error iam getting is as follws



    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items" w
    ith value "${configContNew. WhTable}": Unable to find a value for "WhTable" in object of class "com.
    voxware.voxmanager.command.ConfigContSearch2Comman d" using operator "." (null)
    at org.apache.taglibs.standard.lang.jstl.Evaluator.ev aluate(Evaluator.java:146)
    at org.apache.taglibs.standard.lang.jstl.Evaluator.ev aluate(Evaluator.java:166)
    at org.apache.taglibs.standard.lang.support.Expressio nEvaluatorManager.evaluate(ExpressionEv
    aluatorManager.java:112)

    please let me know about this ..
    Thanks & regards
    Rasheed M.A
    Paradigm Hyderabad :o :shock: :? :lol: :x :oops: :cry: :wink: :arrow: :idea: :?: :!:

  3. #3
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    Once strange thing I notice from what you posted:

    In the JSP fragment you have: ${configContNew.whTable}
    And in the error it says: Unable to find a value for "WhTable"

    So there seems to be a capitalisation issue. "whTable" would end up being "getWhTable()" on com.
    voxware.voxmanager.command.ConfigContSearch2Comman d.

    BTW: try to use sensible names for all you stuff! Having crazy names like that is not very clear and hard read/maintain.

    Erwin

Similar Threads

  1. Replies: 37
    Last Post: Aug 10th, 2009, 03:35 PM
  2. hibernate pagination
    By oliverchua in forum Data
    Replies: 8
    Last Post: Sep 23rd, 2005, 06:06 PM
  3. Odd behaviour when injecting TransactionTemplate
    By damon311 in forum Container
    Replies: 3
    Last Post: Jul 23rd, 2005, 11:21 AM
  4. bind problems: list, select
    By pir8ped in forum Web
    Replies: 2
    Last Post: Jun 28th, 2005, 12:51 AM
  5. Replies: 2
    Last Post: May 5th, 2005, 09:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •