Hi list,

I've constructed a small test case using Tapestry 4.1.1. I'm trying to validate a text input field using the 'required' validator. The FieldLabel for this TextField is indicating an error, but the Delegator doesn't display it.

This is my template:

<font color="red"><b><span jwcid="@Delegator" delegate="ognl:beans.delegate.firstError"></span></b></font><br/><br/>
<form jwcid="@Form" delegator="ognl:beans.delegate" success="listener:doTest">
  <label jwcid="@FieldLabel" field="component:testField">Test</label>&nbsp;
<input jwcid="[EMAIL PROTECTED]" value="ognl:test" displayName="Test" validators="validators:required" />
  <br/><br/>
  <input jwcid="@Submit" />
</form>

The page-specification for this page contains nothing except for the 
corresponding class reference.
The page class looks like this:

public abstract class Test extends BasePage {
    @Override public String getClientId() { return null; }
    @Override public void setClientId(String arg0) { }

    @Bean public abstract ValidationDelegate getDelegate();
    @InjectPage("Home") public abstract IPage getHomePage();
    public abstract String getTest();

    public IPage doTest() {
        if(getDelegate().getHasErrors())
            return null;
        System.out.println(getTest());
        return getHomePage();
    }
}

After fighting with this for 4 hours I've got the strong feeling that I'm missing something here. So all you experts out there please help me :)

Cheers

Uli

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

Reply via email to