Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.1.11
-
None
-
None
-
Normal
-
Blocks: Forms - 1.0.0-RC2
-
Blocks: Forms - 1.0.0-RC3-SNAPSHOT
Description
http://marc.info/?l=xml-cocoon-dev&m=120277341318228&w=4
Hello
I noticed a change in behavior of cforms lately. the submit widget now
has "false" as default value for the "validate" attribute (opposed to the
documenation which says, true is the default value). This really breaks
our application. After backporting vadim's fixes for the concurrency bugs
we discovered to cforms 2.1.10, we also "migrated" this new behavior to
our cforms version.
here is the code, which has an extra if statement in comparision to
2.1.10.
public final class SubmitDefinitionBuilder extends ActionDefinitionBuilder
{
public WidgetDefinition buildWidgetDefinition(Element widgetElement, WidgetDefinitionBuilderContext context)
throws Exception {
SubmitDefinition definition = new SubmitDefinition();
setupDefinition(widgetElement, definition, context);
// parse "@validate"
if (widgetElement.hasAttribute("validate")) {
definition.setValidateForm(DomHelper.getAttributeAsBoolean(widgetElement, "validate", true));
}
definition.makeImmutable();
return definition;
}
}
Is there any reason, why the behavior was changed and if it was a
accident, could someone revert the code inside the repos to the old
behavior?
thanx alot!
Gabriel
Hello
I noticed a change in behavior of cforms lately. the submit widget now
has "false" as default value for the "validate" attribute (opposed to the
documenation which says, true is the default value). This really breaks
our application. After backporting vadim's fixes for the concurrency bugs
we discovered to cforms 2.1.10, we also "migrated" this new behavior to
our cforms version.
here is the code, which has an extra if statement in comparision to
2.1.10.
public final class SubmitDefinitionBuilder extends ActionDefinitionBuilder
{
public WidgetDefinition buildWidgetDefinition(Element widgetElement, WidgetDefinitionBuilderContext context)
throws Exception {
SubmitDefinition definition = new SubmitDefinition();
setupDefinition(widgetElement, definition, context);
// parse "@validate"
if (widgetElement.hasAttribute("validate")) {
definition.setValidateForm(DomHelper.getAttributeAsBoolean(widgetElement, "validate", true));
}
definition.makeImmutable();
return definition;
}
}
Is there any reason, why the behavior was changed and if it was a
accident, could someone revert the code inside the repos to the old
behavior?
thanx alot!
Gabriel