Announcement Announcement Module
Collapse
No announcement yet.
select list values Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Re: select list values

    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: :?: :!:

    Comment


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

      Comment

      Working...
      X