|
From: Johan T. <jt...@us...> - 2007-01-17 22:57:39
|
Update of /cvsroot/boakeity/boakeity/src/se/biobanksregistersyd/boakeity/action In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29534/src/se/biobanksregistersyd/boakeity/action Modified Files: BiobankUi.java BiobankUiAction.java Log Message: Add facility for choosing the country where the biobank resides. Index: BiobankUiAction.java =================================================================== RCS file: /cvsroot/boakeity/boakeity/src/se/biobanksregistersyd/boakeity/action/BiobankUiAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- BiobankUiAction.java 16 Jan 2007 23:32:23 -0000 1.4 +++ BiobankUiAction.java 17 Jan 2007 22:56:49 -0000 1.5 @@ -65,6 +65,10 @@ @Out(required = false) private List < SelectItem > biobankTypeList; + /** A list of possible choices for biobankCountryType, for use in JSF. */ + @Out(required = false) + private List < SelectItem > biobankCountryTypeList; + /** Entity manager for entities in the primary database. */ @PersistenceContext(unitName = "boakeity") private EntityManager manager; @@ -123,4 +127,18 @@ } } + /** + * Populates <code>biobankCountryTypeList</code> with internationalised + * string from message bundles. + */ + @Factory("biobankCountryTypeList") + public void findCountryTypeList() { + biobankCountryTypeList = new ArrayList < SelectItem > (); + String list = ResourceBundle.instance().getString("BiobankCountryTypeList"); + for (String type : list.split("\\|")) { + String[] tmp = type.split(";"); + biobankCountryTypeList.add(new SelectItem(tmp[0], tmp[1])); + } + } + } Index: BiobankUi.java =================================================================== RCS file: /cvsroot/boakeity/boakeity/src/se/biobanksregistersyd/boakeity/action/BiobankUi.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- BiobankUi.java 16 Jan 2007 23:32:23 -0000 1.4 +++ BiobankUi.java 17 Jan 2007 22:56:49 -0000 1.5 @@ -52,4 +52,10 @@ * string from message bundles. */ void findBiobankTypeList(); + + /** + * Populates <code>biobankCountryTypeList</code> with internationalised + * string from message bundles. + */ + void findCountryTypeList(); } |