You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by easydoor <ch...@valdoise.fr> on 2010/10/06 09:04:31 UTC
Re: Message error link
Hi Bob,
Could you precise me how to do to overriding the Form errors ?
Thank for your reply
Re: Message error link
Posted by Beto <gi...@gmail.com>.
Here [1], you will find a lot of information.
Regards,
Giberto
[1]http://click.apache.org/docs/user-guide/html/ch03s04.html
On Wed, Oct 6, 2010 at 4:04 AM, easydoor <ch...@valdoise.fr> wrote:
> Hi Bob,
>
> Could you precise me how to do to overriding the Form errors ?
>
> Thank for your reply
>
>
>
>
>
Re: Message error link
Posted by Bob Schellink <sa...@gmail.com>.
On 6/10/2010 18:04, easydoor wrote:
> Hi Bob,
>
> Could you precise me how to do to overriding the Form errors ?
You can override the Form error reneering as follows:
public class CustomForm extends Form {
@Override
protected void renderErrors(HtmlStringBuffer buffer, boolean processed) {
// Custom code goes here
}
}
Have a look at the Form sourcecode on the original method is implemented. You can copy the original
method impl and customize the parts you want eg. in there the links ill be rendered if you want to
change it.
Alternatively you can use Velocity to create customized layouts[1][2].
Bob
[1]: http://click.apache.org/docs/click-api/org/apache/click/control/Form.html#manual-layout
[2]: http://click.apache.org/docs/click-api/org/apache/click/control/Form.html#velocity-macros