title: Binding an edit box control to a specific Vector element in managed bean?
body: <p>I have a Vector of Scores for test grades, as a property of my Assignment class.</p>
  
  <p>I have an Edit Box on an xpage where I want to edit the value and write back to the Vector in the managed bean. The value binding of the Edit Box is:
  <code>&lt;xp:this.value&gt;&lt;![CDATA[#{rpt.scores[rowIndex]}]]&gt;&lt;/xp:this.value&gt;</code> Where <code>rpt</code> is the Assignment object from my bean. The Edit Box is in a repeat control because I don't know how many students will be taking the test each time. So I am using the <code>rowIndex</code> of the repeat control to identify which element of the Scores Vector I want to bind to. </p>
  
  <p>It is reading the value from the Scores Vector correctly, but I cannot seem to change the value and have it written back to the Vector.</p>
  
  <p>How do I get it to write the value back to the Scores[n] element of the Assignment class?</p>
  
  <p>here is the Assignment Class from my bean:</p>
  
  <pre><code>package com.logickey.gradebook;
  
  import java.io.Serializable;
  import java.util.Vector;
  
  
  public class Assignment implements Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = -1500382996574385949L;
      private String Name;
      private String Teacher;
      private String AssignNum;
      private String AssignDate;
      private Vector&lt;String&gt; Scores;
  
      public Assignment() {
          Name = "";
          Teacher = "";
          AssignNum = "";
          AssignDate = "";
          Scores = new Vector&lt;String&gt;();
      }
      public Assignment(String name, String teacher, String assignNum, String assignDate, Vector&lt;String&gt; scores){
          Name = name;
          Teacher = teacher;
          AssignNum = assignNum;
          AssignDate = assignDate;
          Scores = scores;
      }
  
  
      public String getName() {
          return Name;
      }
  
      public void setName(String name) {
          Name = name;
      }
  
      public String getTeacher() {
          return Teacher;
      }
  
      public void setTeacher(String teacher) {
          Teacher = teacher;
      }
  
      public String getAssignNum() {
          return AssignNum;
      }
  
      public void setAssignNum(String assignNum) {
          AssignNum = assignNum;
      }
  
      public String getAssignDate() {
          return AssignDate;
      }
  
      public void setAssignDate(String assignDate) {
          AssignDate = assignDate;
      }
  
  
      public Vector&lt;String&gt; getScores() {
          return Scores;
      }
  
      public void addScore(String input) {
          if (Scores==null) {
              Scores = new Vector&lt;String&gt;();
          }
          Scores.add(input);
      }
  
  
  }
  </code></pre>