Re: about validation error messages

2006-05-24 Thread marcopar
that could be a problem but right now Tapestry whines at the @Form line
that is before that.
btw, isn't the % used for localized messages? I want to hard code them for
now. One step at a time :)


In data Tue, 23 May 2006 11:03:28 -0700 (PDT), Carl Pelletier ha scritto:

 A quick look at your code and I see that you missing the % before your 
 message in the validators:
  
 bad:
 input jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name
 displayName=Name validators=validators:minLength=15[Sorbole]/
  
 good:
 input jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name
 displayName=Name validators=validators:minLength=15[%Sorbole]/
 
  
 Good luck !
  
 Carl Pelletier
 
 - Original Message 
 From: marcopar [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Tuesday, May 23, 2006 11:32:48 AM
 Subject: about validation error messages
 
 
 Hi, i'm following the EnjoyWebDevWithTapestry book and i'm trying to
 display error messages coming from the validators. The only difference is
 that i'm trying to do it without using .page files.
 
 - First of all i want to say that i still not had understood clearly the
 notation for passing parameters to the components, for example:
 form jwcid=[EMAIL PROTECTED] success=doSubmit IS GOOD
 and
 form jwcid=[EMAIL PROTECTED] success=listener:doSubmit IS GOOD TOO
 and
 label jwcid=@FieldLabel field=component:nameName/label IS GOOD
 but
 label jwcid=@FieldLabel field=nameName/label IS NOT GOOD
 
 i can't actually understand what is the correct syntax in all cases
 
 - Now with the error messages problem:
 the relevant HTML stuff is:
 form jwcid=[EMAIL PROTECTED] success=doSubmit delegate=beans.delegate
 input jwcid=[EMAIL PROTECTED] value=ognl:pid/
 span jwcid=@Delegator delegate=beans.delegate.firstError/span
 table border=1 cellspacing=1 cellpadding=2
 tbody
 tr
 tdlabel jwcid=@FieldLabel field=component:nameName/label/td
 tdinput jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name
 displayName=Name validators=validators:minLength=15[Sorbole]//td
 /tr
 
 the relevant JAVA stuff is:
 @Bean
 public abstract ValidationDelegate getDelegate();
 
 on the @Form line i get the error:
 Error converting value for template parameter delegate: No type converter
 for type org.apache.tapestry.valid.IValidationDelegate is available.
 
 
 
 ciao
 
 
 -
 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]



RE: about validation error messages

2006-05-24 Thread Schulte Marcus
  form jwcid=[EMAIL PROTECTED] success=doSubmit 
 delegate=beans.delegate

try: delegate=ognl:beans.delegate
or: delegate=bean:delegate

hth, marcus

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



Re: about validation error messages

2006-05-24 Thread marcopar
In data Wed, 24 May 2006 15:12:02 +0200, Schulte Marcus ha scritto:

 form jwcid=[EMAIL PROTECTED] success=doSubmit 
 delegate=beans.delegate
 
 try: delegate=ognl:beans.delegate

whoaaa... the ognl way worked. thank you.
i still remain dubious on when i should use ognl:, listener:, delegate: or 
nothing. What does it mean really that keyword: stuff?

form jwcid=[EMAIL PROTECTED] success=listener:doSubmit 
delegate=ognl:beans.delegate
input jwcid=[EMAIL PROTECTED] value=ognl:pid/
span jwcid=@Delegator delegate=ognl:beans.delegate.firstError/span
table border=1 cellspacing=1 cellpadding=2
tbody
tr
tdlabel jwcid=@FieldLabel field=component:nameName/label/td
tdinput jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name 
displayName=Name validators=validators:minLength=15[Sorbole]//td
/tr


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



RE: about validation error messages

2006-05-24 Thread Schulte Marcus
It's a so-called binding-prefix. This has a long and venerable history ;).
In the beginning there were only literal (no prefix), message and ognl
binding.
Back then most interesting bindings were ognl: and people used to access a
lot 
of interesting things via special collections of pages/components
(ognl:beans, ognl:listeners, ognl:components, ...). In Tap 4 shortcuts these
important collections got their own binding prefix.
This made .html slightly more concise. And I believe it's speedier, because
ognl is notoriously not-so-fast. Through the advent of hivemind you can very
easily add your own binding prefixes ...

 -Original Message-
 From: marcopar [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 24, 2006 3:54 PM
 To: users@tapestry.apache.org
 Subject: Re: about validation error messages
 
 
 In data Wed, 24 May 2006 15:12:02 +0200, Schulte Marcus ha scritto:
 
  form jwcid=[EMAIL PROTECTED] success=doSubmit 
  delegate=beans.delegate
  
  try: delegate=ognl:beans.delegate
 
 whoaaa... the ognl way worked. thank you.
 i still remain dubious on when i should use ognl:, listener:, 
 delegate: or 
 nothing. What does it mean really that keyword: stuff?
 
 form jwcid=[EMAIL PROTECTED] success=listener:doSubmit 
 delegate=ognl:beans.delegate
 input jwcid=[EMAIL PROTECTED] value=ognl:pid/
 span jwcid=@Delegator 
 delegate=ognl:beans.delegate.firstError/span
 table border=1 cellspacing=1 cellpadding=2
 tbody
 tr
 tdlabel jwcid=@FieldLabel 
 field=component:nameName/label/td
 tdinput jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name 
 displayName=Name 
 validators=validators:minLength=15[Sorbole]//td
 /tr
 
 
 -
 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]



Re: about validation error messages

2006-05-24 Thread marcopar
In data Wed, 24 May 2006 16:54:27 +0200, Schulte Marcus ha scritto:

 It's a so-called binding-prefix. This has a long and venerable history ;).

many thanks!


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



Re: about validation error messages

2006-05-24 Thread marcopar
In data Wed, 24 May 2006 17:09:27 +0200, marcopar ha scritto:

 In data Wed, 24 May 2006 16:54:27 +0200, Schulte Marcus ha scritto:
 
 It's a so-called binding-prefix. This has a long and venerable history ;).
 
 many thanks!
 

i finally found the docs about that... i think i should read them:
http://jakarta.apache.org/tapestry/UsersGuide/bindings.html


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



Re: about validation error messages

2006-05-23 Thread Carl Pelletier
A quick look at your code and I see that you missing the % before your message 
in the validators:
 
bad:
input jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name
displayName=Name validators=validators:minLength=15[Sorbole]/
 
good:
input jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name
displayName=Name validators=validators:minLength=15[%Sorbole]/

 
Good luck !
 
Carl Pelletier

- Original Message 
From: marcopar [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Tuesday, May 23, 2006 11:32:48 AM
Subject: about validation error messages


Hi, i'm following the EnjoyWebDevWithTapestry book and i'm trying to
display error messages coming from the validators. The only difference is
that i'm trying to do it without using .page files.

- First of all i want to say that i still not had understood clearly the
notation for passing parameters to the components, for example:
form jwcid=[EMAIL PROTECTED] success=doSubmit IS GOOD
and
form jwcid=[EMAIL PROTECTED] success=listener:doSubmit IS GOOD TOO
and
label jwcid=@FieldLabel field=component:nameName/label IS GOOD
but
label jwcid=@FieldLabel field=nameName/label IS NOT GOOD

i can't actually understand what is the correct syntax in all cases

- Now with the error messages problem:
the relevant HTML stuff is:
form jwcid=[EMAIL PROTECTED] success=doSubmit delegate=beans.delegate
input jwcid=[EMAIL PROTECTED] value=ognl:pid/
span jwcid=@Delegator delegate=beans.delegate.firstError/span
table border=1 cellspacing=1 cellpadding=2
tbody
tr
tdlabel jwcid=@FieldLabel field=component:nameName/label/td
tdinput jwcid=[EMAIL PROTECTED] value=ognl:glueSyringe.name
displayName=Name validators=validators:minLength=15[Sorbole]//td
/tr

the relevant JAVA stuff is:
@Bean
public abstract ValidationDelegate getDelegate();

on the @Form line i get the error:
Error converting value for template parameter delegate: No type converter
for type org.apache.tapestry.valid.IValidationDelegate is available.



ciao


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