title: Jsf El Expression getter and setter ArrayList
body: <p>i m using inside the backing bean an</p>
  
  <pre><code>private ArrayList&lt;String&gt; myList;
  
  
  init(){
    myList = new ArrayList&lt;String&gt;();
    myList.add("XYZ");
  }
  
  public ArrayList&lt;String&gt; getMyList(){
      return myList;
  }
  
  public setMyList(ArrayList&lt;String&gt; l){
      myList = l;
  
  }
  </code></pre>
  
  <p>insde the xhtml </p>
  
  <p>i show the elements by doing:</p>
  
  <pre><code>   &lt;h:outputText value="Item: " /&gt;  
                  &lt;p:inputText required="true" label="Item"  
                          value="#{mybean.myList[0]}" /&gt;  
  </code></pre>
  
  <p>when i show the page i see the value:</p>
  
  <pre><code> XYZ 
  </code></pre>
  
  <p>in the page.</p>
  
  <p>So my question is: </p>
  
  <p>If I do NOT set "XYZ" inside the ArrayList and the user writes inside <code>p:inputText</code> the value "HKJ", will I find on server-side inside <code>myList</code> at position 0 the expected "HKJ"?
  Can I use <code>ArrayList</code> for display and set values or do i have to use <code>String[]</code> ?</p>
  
  <p>you can find here similar question:</p>
  
  <pre><code>  http://www.velocityreviews.com/forums/t303520-jsf-using-arrays-arraylist-in-the-backing-bean.html
  </code></pre>