Re: Display of own message in FeedbackPanel

2008-03-21 Thread Fabien D.

Thank you all for your help,

There is no problem for the password, but now I'm trying to create my own
validator. I have a problem during compilation (with ant).

I have done this :

email.add(new IValidator() {
validate(IValidatable v) {
if ( !CDataVerification.validEmail( 
(String)v.getvalue() ) )
v.add(new 
ValidationError().addMessageKey(error)); 
} 
});

where CDataVerification.validEmail is a method to check if it's a correct
email ( with @, . , ...), in input a string and in output a boolean.

During compilation, I have this message : invalid method declaration; return
type required  validate(IValidatable v)

In the java doc, the method validate don't have any return type, that's why
I don't understand what is my mistake.

Thank you for your help.
-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16196105.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Display of own message in FeedbackPanel

2008-03-21 Thread Sebastiaan van Erk
This is elementary Java... you should probably use an IDE like eclipse, 
works much better than finding errors later on with a build tool like 
ant. You're declaring a method and you don't declare it's return type... 
add the workd void before validate... the compiler gives you the exact 
location of the problem...


Regards,
Sebastiaan

Fabien D. wrote:

Thank you all for your help,

There is no problem for the password, but now I'm trying to create my own
validator. I have a problem during compilation (with ant).

I have done this :

email.add(new IValidator() {
validate(IValidatable v) {
if ( !CDataVerification.validEmail( 
(String)v.getvalue() ) )
	v.add(new ValidationError().addMessageKey(error)); 
			} 
		});


where CDataVerification.validEmail is a method to check if it's a correct
email ( with @, . , ...), in input a string and in output a boolean.

During compilation, I have this message : invalid method declaration; return
type required  validate(IValidatable v)

In the java doc, the method validate don't have any return type, that's why
I don't understand what is my mistake.

Thank you for your help.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Display of own message in FeedbackPanel

2008-03-21 Thread Fabien D.

O_o sorry for this mistake  I try this : 

email.add(new IValidator() {
public void validate(IValidatable v) {
if ( !CDataVerification.validEmail( 
(String)v.getvalue() ) )
v.add(new 
ValidationError().addMessageKey(error)); 
} 
});

I'm not an expert in java too  It's not compiling : it don't find the
method getvalue()...
-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16196588.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Display of own message in FeedbackPanel

2008-03-21 Thread Gerolf Seitz
because it's getValue() - capital V

  Gerolf

On Fri, Mar 21, 2008 at 11:49 AM, Fabien D. [EMAIL PROTECTED]
wrote:


 O_o sorry for this mistake  I try this :

email.add(new IValidator() {
public void validate(IValidatable v) {
 if ( !CDataVerification.validEmail(
 (String)v.getvalue() ) )
v.add(new
 ValidationError().addMessageKey(error));
}
});

 I'm not an expert in java too  It's not compiling : it don't find the
 method getvalue()...
 --
 View this message in context:
 http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16196588.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Display of own message in FeedbackPanel

2008-03-21 Thread Fabien D.

For the last time, Thank you :)
-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16197598.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Display of own message in FeedbackPanel

2008-03-20 Thread Fabien D.

Hi everybody,

I'm a new french user of wicket, and i 'm apologizing in advance for english
and comprehension mistakes.

So, I want to display in a FeedbackPanel my own messages for especially
events. For example, in my suscribing panel, the user has to write twice his
password. So I want to check if these passwords are the same, and if not, to
display in the FeedbackPanel a message.

What objets i have to manipulate to instanciate the event and the message in
the FeedbackPanel ?? Is there any documentation?

Thank you in advance for your help :)


-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16182720.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: Display of own message in FeedbackPanel

2008-03-20 Thread Greg Dunn
Wicket has a gadget for that since 1.2.  In your form:

add(new EqualPasswordInputValidator(password, repeatPassword));

-Original Message-
From: Fabien D. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 11:25 AM
To: users@wicket.apache.org
Subject: Display of own message in FeedbackPanel


Hi everybody,

I'm a new french user of wicket, and i 'm apologizing in advance for
english
and comprehension mistakes.

So, I want to display in a FeedbackPanel my own messages for especially
events. For example, in my suscribing panel, the user has to write twice
his
password. So I want to check if these passwords are the same, and if
not, to
display in the FeedbackPanel a message.

What objets i have to manipulate to instanciate the event and the
message in
the FeedbackPanel ?? Is there any documentation?

Thank you in advance for your help :)


-- 
View this message in context:
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720
p16182720.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
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: Display of own message in FeedbackPanel

2008-03-20 Thread Scott Swank
You can use the EqualInputValidator to compare the password values.
Then you can override resourceKey() to tell Wicket to look for your
own error message in .properties.

On Thu, Mar 20, 2008 at 9:24 AM, Fabien D. [EMAIL PROTECTED] wrote:

  Hi everybody,

  I'm a new french user of wicket, and i 'm apologizing in advance for english
  and comprehension mistakes.

  So, I want to display in a FeedbackPanel my own messages for especially
  events. For example, in my suscribing panel, the user has to write twice his
  password. So I want to check if these passwords are the same, and if not, to
  display in the FeedbackPanel a message.

  What objets i have to manipulate to instanciate the event and the message in
  the FeedbackPanel ?? Is there any documentation?

  Thank you in advance for your help :)


  --
  View this message in context: 
 http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16182720.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  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: Display of own message in FeedbackPanel

2008-03-20 Thread Martijn Dashorst
I wouldn't advise the EIV for password fields... the default message
will show the input values...

For password fields, we have: EqualPasswordInputValidator

Martijn

On 3/20/08, Scott Swank [EMAIL PROTECTED] wrote:
 You can use the EqualInputValidator to compare the password values.
  Then you can override resourceKey() to tell Wicket to look for your
  own error message in .properties.


  On Thu, Mar 20, 2008 at 9:24 AM, Fabien D. [EMAIL PROTECTED] wrote:
  
Hi everybody,
  
I'm a new french user of wicket, and i 'm apologizing in advance for 
 english
and comprehension mistakes.
  
So, I want to display in a FeedbackPanel my own messages for especially
events. For example, in my suscribing panel, the user has to write twice 
 his
password. So I want to check if these passwords are the same, and if not, 
 to
display in the FeedbackPanel a message.
  
What objets i have to manipulate to instanciate the event and the message 
 in
the FeedbackPanel ?? Is there any documentation?
  
Thank you in advance for your help :)
  
  
--
View this message in context: 
 http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16182720.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
-
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]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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



Re: Display of own message in FeedbackPanel

2008-03-20 Thread Fabien D.

Thank you all for you responding speed :) Amazing

Okay i will check tomorrow for this issue.But if my condition is not take
care by Feedback 

An other exemple, i want to check if the email of the user is already in my
database, and display a error message in my FeedbackPanel in this case.

How can i link my condition, the message and the panel?
-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16183431.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Display of own message in FeedbackPanel

2008-03-20 Thread Igor Vaynberg
there are two ways.

one: write a validator: email.add(new ivalidator() {
validate(ivalidatable v) { if (!validemail(v.getvalue()) v.add(new
validationerror().setresourcekey(my.error)); }

two: do it in onsubmit handler of the form

form.onsubmit() { if (!validemail(email)) { error(getString(my.error)); }}

-igor


On Thu, Mar 20, 2008 at 9:52 AM, Fabien D. [EMAIL PROTECTED] wrote:

  Thank you all for you responding speed :) Amazing

  Okay i will check tomorrow for this issue.But if my condition is not take
  care by Feedback

  An other exemple, i want to check if the email of the user is already in my
  database, and display a error message in my FeedbackPanel in this case.

  How can i link my condition, the message and the panel?
  --
  View this message in context: 
 http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16183431.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  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: Display of own message in FeedbackPanel

2008-03-20 Thread Martijn Dashorst
Create your own validator, or do the check in onSubmit(), and create
the error message using error().

Martijn

On 3/20/08, Fabien D. [EMAIL PROTECTED] wrote:

  Thank you all for you responding speed :) Amazing

  Okay i will check tomorrow for this issue.But if my condition is not take
  care by Feedback

  An other exemple, i want to check if the email of the user is already in my
  database, and display a error message in my FeedbackPanel in this case.

  How can i link my condition, the message and the panel?

 --
  View this message in context: 
 http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16183431.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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