Announcement Announcement Module
Collapse
No announcement yet.
JSP not showing the integer value Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSP not showing the integer value

    Hi,
    I am new to this forum and hoping some will help me with this question.

    I am unable to display the value that is passed by jsp to the controller.

    This is the jsp code
    Var num = 10
    var sel = document.getElementById("selection");
    sel.options.length=0
    var opt=0;
    for (var a = 1; a < parseInt(num)+1; a++) {
    sel.options.add( new Option(a,a) );
    opt++;
    }
    This is my domain code
    private String selection;
    public void setmySelection(String selection)
    {this. selection = selection;
    }
    public String getmySelection() {
    return selection; }
    getmySelection() only returns a null values.
    Can someone help?
    Thanks you.
Working...
X