Can someone tell me why an action widget disables validation in Woody? I'm
trying out a simple form that doesn't involve validation, but it can never
get onto the success page because of the following code:

org.apache.cocoon.woody.formmodel.Form:
public boolean process(FormContext formContext) {
        ...
        readFromRequest(formContext);
        ...
        if (formContext.doValidation())
                return validate(formContext);
        return false;
}

formContext.validation will be set to false when it calls the action
widget's readFromRequest method and so will return false which in turn
returns a null sitemap map to the sitemap and never shows the success page
contained within the action tags.

Mark

my widgets:

<?xml version="1.0" encoding="ISO-8859-1"?>
<wd:form xmlns:wd="http://apache.org/cocoon/woody/definition/1.0";>
        <wd:field id="username" required="true">
                <wd:label>Username</wd:label>
                <wd:datatype base="string"/>
        </wd:field>
        <wd:field id="password" required="true">
                <wd:label>Password</wd:label>
                <wd:datatype base="string" />
        </wd:field>
        <wd:action id="login" action-command="login">
                <wd:label>Login</wd:label>
        </wd:action>
</wd:form>

my form view:

<?xml version="1.0"?>
<page xmlns:wt="http://apache.org/cocoon/woody/template/1.0";
xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"; title="A Form">
        <wt:form-template action="form" method="POST">
                <wt:widget id="username"/>
                <wt:widget id="password"/>
                <wt:widget id="login"/>
        </wt:form-template>
</page>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to