Thanks, but this is not the problem. The problem is that there is no IValidator parameter in the writeLabelSuffix() method of ValidationDelegate. So with the default implementation, there is no way to find out if the field is required in Tapestry 3.0.3.

Ivano wrote:
Following an example validation from TIA:

public void *writeLabelSuffix*(IFormComponent <http://jakarta.apache.org/tapestry/3.0.3/doc/api/org/apache/tapestry/form/IFormComponent.html> component, IMarkupWriter <http://jakarta.apache.org/tapestry/3.0.3/doc/api/org/apache/tapestry/IMarkupWriter.html> writer, IRequestCycle <http://jakarta.apache.org/tapestry/3.0.3/doc/api/org/apache/tapestry/IRequestCycle.html> cycle) {

 if (isInError(component)) {
   //Use the writer here to write anything you like
 }
}


Inge Solvoll wrote:

Thanks, but this does not actually solve my problem, because the IFormComponent doesn't seem to have an isRequired() method in T3.0.3...

Inge

[EMAIL PROTECTED] wrote:

Quoting Inge Solvoll  <[EMAIL PROTECTED]>:

Tapestry 3.0.3, ValidationDelegate issue:

In our application, we want to write a red star next to the label if the field is required. This is now possible in the writeSuffix() method, using the validator.isRequired() method. But the IValidator parameter does not exist in writeLabelSuffix(), so we don't know in that method if the field is required. Does anyone have a solution for this?




I had the exact same question and Kent Tong answered it yesterday in this
message:

http://mail-archives.apache.org/mod_mbox/jakarta-tapestry-user/200509.mbox/[EMAIL PROTECTED]

Regards,

Onno



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






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




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






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

Reply via email to