cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Baptiste Quenot (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (COCOON-1629) No default value in forms binding
Date Fri, 10 Mar 2006 09:53:45 GMT
     [ http://issues.apache.org/jira/browse/COCOON-1629?page=all ]

Jean-Baptiste Quenot reassigned COCOON-1629:
--------------------------------------------

    Assign To:     (was: Jean-Baptiste Quenot)

> No default value in forms binding
> ---------------------------------
>
>          Key: COCOON-1629
>          URL: http://issues.apache.org/jira/browse/COCOON-1629
>      Project: Cocoon
>         Type: Improvement
>   Components: Blocks: Forms
>     Versions: 2.1.8
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Jean-Baptiste Quenot
>     Priority: Minor

>
> When wishing to have a default value for the binding of a form widget, it is
> required to make use of a hack like this:
> 			for (var iter = form.form.getChildren() ; iter.hasNext() ;) {
> 				var child = iter.next();
> 				if
> (child.getClass().getName().equals("org.apache.cocoon.forms.formmodel.Field") &&
> child.getDatatype().getTypeClass().getName().equals("java.lang.Long") &&
> child.getValue() == null) {
> 					child.setValue(new java.lang.Long(-1));
> 				}
> 			}	
> It would be great to add an attribute on <fd:datatype>, for example:
> <fd:datatype base="long" default="-1"> to have a default value that could be
> used in the binding.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message