You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by br...@apache.org on 2003/08/26 17:13:37 UTC

cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype StaticSelectionList.java

bruno       2003/08/26 08:13:37

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/datatype
                        StaticSelectionList.java
  Log:
  Make content of StaticSelectionList accessible.
  
  Revision  Changes    Path
  1.4       +9 -1      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/StaticSelectionList.java
  
  Index: StaticSelectionList.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/StaticSelectionList.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StaticSelectionList.java	15 Jul 2003 14:11:03 -0000	1.3
  +++ StaticSelectionList.java	26 Aug 2003 15:13:37 -0000	1.4
  @@ -99,6 +99,10 @@
           contentHandler.endElement(Constants.WI_NS, SELECTION_LIST_EL, Constants.WI_PREFIX_COLON + SELECTION_LIST_EL);
       }
   
  +    public List getItems() {
  +        return items;
  +    }
  +
       /**
        * Adds a new item to this selection list.
        * @param value a value of the correct type (i.e. the type with which this selectionlist is associated)
  @@ -108,13 +112,17 @@
           items.add(new SelectionListItem(value, label));
       }
   
  -    private final class SelectionListItem {
  +    public final class SelectionListItem {
           private final Object value;
           private final Object label;
   
           public SelectionListItem(Object value, Object label) {
               this.value = value;
               this.label = label;
  +        }
  +
  +        public Object getValue() {
  +            return value;
           }
   
           public void generateSaxFragment(ContentHandler contentHandler, Locale locale, Convertor.FormatCache formatCache)