On Mon, 13 Sep 2010 10:26:51 -0300, Stephan Windmüller
<stephan.windmuel...@tu-dortmund.de> wrote:
tracker.recordError(...);
If one of this components creates form fields, a good approach is to
make> the component an AbstractField sublclass.
That requires an implementation of processSubmission and this in turn
requires some background knowledge about Tapestry which I do not have. ;)
It doesn't require much background knowledge. Just take a look at this
method implementation in the Select component:
@Override
protected void processSubmission(String elementName)
{
String submittedValue = request.getParameter(elementName);
tracker.recordInput(this, submittedValue);
Object selectedValue = InternalUtils.isBlank(submittedValue)
? null :
encoder.toValue(submittedValue);
try
{
fieldValidationSupport.validate(selectedValue, resources,
validate);
value = selectedValue;
}
catch (ValidationException ex)
{
tracker.recordError(this, ex.getMessage());
}
}
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org