* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+import java.util.Collections;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
}
@Override
- public Country[] allCountries () {
+ public List<Country> allCountries () {
// Return "cached" version
- return (Country[]) this.countryList.toArray();
+ return Collections.unmodifiableList(this.countryList);
}
@PostConstruct
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
import java.io.Serializable;
+import java.util.List;
import org.mxchange.jcountry.data.Country;
/**
* <p>
* @return All countries
*/
- public Country[] allCountries ();
+ public List<Country> allCountries ();
}
<div class="table_right">
<h:selectOneMenu class="select" id="country" value="#{userController.country}">
- <f:selectItems value="#{country.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{msg[c.messageKey]}" />
+ <f:selectItems value="#{country.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{msg[c.countryI18nkey]}" />
</h:selectOneMenu>
</div>