Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>its always better to provide the error/exception being thrown by the system else its very hard for the other to tell anything.Moreover no one have that much time to write the programe in there system and see the error.</p> <p>my first shot for possible error is</p> <pre><code>&lt;p:select name="country" list="countryList" label="Select a country" /&gt; </code></pre> <p>which means it will try to find the respected getter method <code>getCountryList()</code> in your action class but your action class have the following method</p> <pre><code>public ArrayList getCountrylist()/*getting countrylist*/ { return countrylist; } </code></pre> <p>either change the select to </p> <pre><code> &lt;p:select name="country" list="countrylist" label="Select a country" /&gt; </code></pre> <p>or do the required correction in your action class.</p> <p>Its always advisable to program to interface rather than implementation which will provide you more flexibility.</p> <p>You can create <code>List</code> and initialize it with <code>ArrayList</code>.Here is what is working for me</p> <h2>Action Class</h2> <pre><code>List&lt;String&gt; countryList; public List&lt;String&gt; getCountryList() { return countryList; } public void setCountryList(List&lt;String&gt; countryList) { this.countryList = countryList; } countryList=new ArrayList&lt;String&gt;(); countryList.add("1"); countryList.add("!"); countryList.add("1"); </code></pre> <h2>JSP Class</h2> <pre><code>&lt;s:select name="country" list="countryList" label="Select a country" /&gt; </code></pre> <h2>OutPut</h2> <p><img src="https://i.stack.imgur.com/9IEdf.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload