cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel MultiValueFieldDefinition.java MultiValueFieldDefinitionBuilder.java BooleanFieldDefinition.java
Date Thu, 22 Apr 2004 14:44:32 GMT
mpo         2004/04/22 07:44:32

  Modified:    src/blocks/forms/java/org/apache/cocoon/forms/formmodel
                        MultiValueFieldDefinition.java
                        MultiValueFieldDefinitionBuilder.java
                        BooleanFieldDefinition.java
  Log:
  During code refactoring I noticed that booleanfield and multivalue field don't use the @required
(since it's meaningless)
  This update makes that somewhat more explicit.
  
  Revision  Changes    Path
  1.2       +5 -1      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueFieldDefinition.java
  
  Index: MultiValueFieldDefinition.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueFieldDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultiValueFieldDefinition.java	9 Mar 2004 10:33:50 -0000	1.1
  +++ MultiValueFieldDefinition.java	22 Apr 2004 14:44:31 -0000	1.2
  @@ -24,4 +24,8 @@
       public Widget createInstance() {
           return new MultiValueField(this);
       }
  +    
  +	public void setRequired(boolean required) {
  +		throw new UnsupportedOperationException("The property 'required' is not available on
widgets of type multivalue.");
  +	}
   }
  
  
  
  1.4       +1 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueFieldDefinitionBuilder.java
  
  Index: MultiValueFieldDefinitionBuilder.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueFieldDefinitionBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MultiValueFieldDefinitionBuilder.java	17 Mar 2004 15:37:58 -0000	1.3
  +++ MultiValueFieldDefinitionBuilder.java	22 Apr 2004 14:44:31 -0000	1.4
  @@ -50,9 +50,6 @@
           if (!hasSelectionList)
               throw new Exception("Error: multivaluefields always require a selectionlist
at " + DomHelper.getLocation(widgetElement));
   
  -        boolean required = DomHelper.getAttributeAsBoolean(widgetElement, "required", false);
  -        definition.setRequired(required);
  -
           Iterator iter = buildEventListeners(widgetElement, "on-value-changed", ValueChangedListener.class).iterator();
           while (iter.hasNext()) {
               definition.addValueChangedListener((ValueChangedListener)iter.next());
  
  
  
  1.2       +5 -1      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/BooleanFieldDefinition.java
  
  Index: BooleanFieldDefinition.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/BooleanFieldDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BooleanFieldDefinition.java	9 Mar 2004 10:33:50 -0000	1.1
  +++ BooleanFieldDefinition.java	22 Apr 2004 14:44:31 -0000	1.2
  @@ -44,4 +44,8 @@
       public boolean hasValueChangedListeners() {
           return listener != null;
       }
  +        
  +    public void setRequired(boolean required) {
  +        throw new UnsupportedOperationException("The property 'required' is not available
on widgets of type booleanfield.");
  +    }    
   }
  
  
  

Mime
View raw message