You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Fabien D." <du...@hotmail.com> on 2008/03/20 17:24:39 UTC

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-tp16182720p16182720.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by Martijn Dashorst <ma...@gmail.com>.
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 <sc...@gmail.com> 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. <du...@hotmail.com> 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: users-unsubscribe@wicket.apache.org
>  >  For additional commands, e-mail: users-help@wicket.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by Scott Swank <sc...@gmail.com>.
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. <du...@hotmail.com> 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: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Display of own message in FeedbackPanel

Posted by Greg Dunn <Gr...@nisc.coop>.
Wicket has a gadget for that since 1.2.  In your form:

add(new EqualPasswordInputValidator(password, repeatPassword));

-----Original Message-----
From: Fabien D. [mailto:dubois_fabien@hotmail.com] 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by "Fabien D." <du...@hotmail.com>.
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by Gerolf Seitz <ge...@gmail.com>.
because it's getValue() - capital V

  Gerolf

On Fri, Mar 21, 2008 at 11:49 AM, Fabien D. <du...@hotmail.com>
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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Display of own message in FeedbackPanel

Posted by "Fabien D." <du...@hotmail.com>.
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by Sebastiaan van Erk <se...@sebster.com>.
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.

Re: Display of own message in FeedbackPanel

Posted by "Fabien D." <du...@hotmail.com>.
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by Igor Vaynberg <ig...@gmail.com>.
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. <du...@hotmail.com> 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: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by Martijn Dashorst <ma...@gmail.com>.
Create your own validator, or do the check in onSubmit(), and create
the error message using error().

Martijn

On 3/20/08, Fabien D. <du...@hotmail.com> 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: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Display of own message in FeedbackPanel

Posted by "Fabien D." <du...@hotmail.com>.
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org