That looks very reasonable. I think I will adopt this approach. Thanks
Geoff.
Benny
On Wed, Sep 2, 2009 at 1:02 AM, Geoff Callender <
geoff.callender.jumpst...@gmail.com> wrote:
> Yes, let's hope the doco is updated soon!
>
>https://issues.apache.org/jira/browse/TAP5-812
>
> As for your
Yes, let's hope the doco is updated soon!
https://issues.apache.org/jira/browse/TAP5-812
As for your conundrum, is there a reason you're not happy to do the
following? It's only a few lines and its intention seems very clear.
@Component(id = "searchForm")
private Form
Thanks for alerting me, Geoff. But even the input validation example in the
User Guide shows recording error in onSuccess()! I must say I'm a bit
alarmed by these "quirks". I hope I don't find too many more surprises when
I get deeper into Tapestry 5.1. I am working on a critical application under
Beware, there's a long-standing problem with recording errors in
onSuccess().
https://issues.apache.org/jira/browse/TAPESTRY-1972
Geoff
On 02/09/2009, at 7:59 AM, Benny Law wrote:
Thanks Sebastian. I agree that only business logic related
validation should
go into onSuccess, and I
Thanks Sebastian. I agree that only business logic related validation should
go into onSuccess, and I would leave basic field validations to validators
as much as possible. My problem with onValidateForm is still the amount of
code I need to write to check for existing errors before I can do cross
Hello,
the intended validation method for cross field validation is
onValidateForm
The onSuccess is probable the latest point to do validation. I would
only place business logic related validation in there
You may do field validation in the onValidateForm as well but it is
normally simpler, f
Hi,
To keep all your validation in onValidateForm, I something like this.
String onValidateForm()
{
if(userName == null )
{
form.recordError(usernameField, "Needs a Username")
}
if(password == null )
{
form.recordError(passwordField, "Please Enter a pas
Hi Onno,
I am all for clean and maintainable code, and that's why I think
ValidateForm can be cleaner if I didn't need to check for field errors
first.
On the main Tapestry 5.1 page, the Login example calls the authenticator in
onValidateForm, but the same example in the User Guide under Input
Va
> Thanks for your response. Could you explain what you mean by keeping my
> validation "in the correct callback"?
I think it's about writing clean and maintainable code.
For other developers reading back your code it makes more sense if you add
your validation errors in the ValidateForm event an
Thanks for your response. Could you explain what you mean by keeping my
validation "in the correct callback"?
Benny Law
On Sun, Aug 30, 2009 at 1:40 AM, newtonik wrote:
>
> I think you should use the onValidateForm for both field level and
> cross-field validation to keep your validation in the
I think you should use the onValidateForm for both field level and
cross-field validation to keep your validation in the correct callback. I
would just use nested loops to first check for field level validation then
if successful, perform cross field validation.
Benny Law wrote:
>
> Hello,
>
11 matches
Mail list logo