|
From: Johan T. <jt...@us...> - 2007-01-16 23:32:28
|
Update of /cvsroot/boakeity/boakeity/src/se/biobanksregistersyd/boakeity/action In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9054/src/se/biobanksregistersyd/boakeity/action Modified Files: BiobankUi.java BiobankUiAction.java Log Message: Add facility for choosing biobank type. Index: BiobankUiAction.java =================================================================== RCS file: /cvsroot/boakeity/boakeity/src/se/biobanksregistersyd/boakeity/action/BiobankUiAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- BiobankUiAction.java 14 Nov 2006 11:12:33 -0000 1.3 +++ BiobankUiAction.java 16 Jan 2007 23:32:23 -0000 1.4 @@ -60,7 +60,11 @@ /** A list of possible choices for principalType, for use in JSF. */ @Out private List < SelectItem > principalTypeList; - + + /** A list of possible choices for biobankType, for use in JSF. */ + @Out(required = false) + private List < SelectItem > biobankTypeList; + /** Entity manager for entities in the primary database. */ @PersistenceContext(unitName = "boakeity") private EntityManager manager; @@ -104,5 +108,19 @@ principalTypeList.add(new SelectItem(tmp[0], tmp[1])); } } - + + /** + * Populates <code>biobankTypeList</code> with internationalised + * string from message bundles. + */ + @Factory("biobankTypeList") + public void findBiobankTypeList() { + biobankTypeList = new ArrayList < SelectItem > (); + String list = ResourceBundle.instance().getString("BiobankTypeList"); + for (String type : list.split("\\|")) { + String[] tmp = type.split(";"); + biobankTypeList.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.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- BiobankUi.java 14 Nov 2006 11:12:33 -0000 1.3 +++ BiobankUi.java 16 Jan 2007 23:32:23 -0000 1.4 @@ -46,4 +46,10 @@ * string from message bundles. */ void findPrincipalTypeList(); + + /** + * Populates <code>biobankTypeList</code> with internationalised + * string from message bundles. + */ + void findBiobankTypeList(); } |