cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36993] New: - No default value in forms binding
Date Mon, 10 Oct 2005 14:59:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36993>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36993

           Summary: No default value in forms binding
           Product: Cocoon 2
           Version: Current SVN 2.1
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: CocoonForms
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: jbq@anyware-tech.com


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message