Re: Feedback messages, input and label

2009-10-08 Thread Swanthe Lindgren
Well, if you combine putting inputPwd=Password in your property file and 
putting


label for=pwdwicket:message key=inputPwdthis text here will be 
replaced by your propertyfile value/wicket:message/label


in you markup, I thing you'll get what you'r looking for.

//Swanthe

Tomás Rossi wrote:
Ok, that's a little nicer, but still... It'd be better if the label 
could be deduced from the markup itself. Yet, no big deal.


Thanks

Matej Knopp escribió:

try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
 

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! 
without
modifying wicket:id attribute nor adding specific required message 
for the

component.
Is this possible?

Kind regards,
Tom;

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





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


  



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






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



Feedback messages, input and label

2009-10-07 Thread Tomás Rossi

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! 
without modifying wicket:id attribute nor adding specific required 
message for the component.

Is this possible?

Kind regards,
Tom;

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



Re: Feedback messages, input and label

2009-10-07 Thread Olivier Bourgeois
Have you tried something like this in your page.java :

pwd.setLabel(new ModelString(Password));

?


2009/10/7 Tomás Rossi tro...@mecon.gov.ar

 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for the
 component.
 Is this possible?

 Kind regards,
 Tom;

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




Re: Feedback messages, input and label

2009-10-07 Thread Tomás Rossi

Yeah, it worked, thanks.

Nonetheless, it'd be madness if I had to do that with every component of 
the system. Is this the only way? Couldn't this be done in a more 
automatic fashion, like for example, extracting it from the html label 
content which is associated to the input?


Olivier Bourgeois escribió:

Have you tried something like this in your page.java :

pwd.setLabel(new ModelString(Password));

?


2009/10/7 Tomás Rossi tro...@mecon.gov.ar

  

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! without
modifying wicket:id attribute nor adding specific required message for the
component.
Is this possible?

Kind regards,
Tom;

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





  



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



Re: Feedback messages, input and label

2009-10-07 Thread Igor Vaynberg
 Nonetheless, it'd be madness

no, this is spartaaa!

form components search property files for their labels without you
having to explicitly set a model.

-igor


if I had to do that with every component of the
 system. Is this the only way? Couldn't this be done in a more automatic
 fashion, like for example, extracting it from the html label content which
 is associated to the input?

 Olivier Bourgeois escribió:

 Have you tried something like this in your page.java :

 pwd.setLabel(new ModelString(Password));

 ?


 2009/10/7 Tomás Rossi tro...@mecon.gov.ar



 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for
 the
 component.
 Is this possible?

 Kind regards,
 Tom;

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







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



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



Re: Feedback messages, input and label

2009-10-07 Thread Matej Knopp
try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for the
 component.
 Is this possible?

 Kind regards,
 Tom;

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



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



Re: Feedback messages, input and label

2009-10-07 Thread Tomás Rossi

Yeah, we'd need 300 programmers for that task ;)

So you have to specify the label for each component in a property file? 
And then you'd have a property file for each markup that contains a 
form? Mmhh...


Igor Vaynberg escribió:

Nonetheless, it'd be madness



no, this is spartaaa!

form components search property files for their labels without you
having to explicitly set a model.

-igor


if I had to do that with every component of the
  

system. Is this the only way? Couldn't this be done in a more automatic
fashion, like for example, extracting it from the html label content which
is associated to the input?

Olivier Bourgeois escribió:


Have you tried something like this in your page.java :

pwd.setLabel(new ModelString(Password));

?


2009/10/7 Tomás Rossi tro...@mecon.gov.ar


  

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! without
modifying wicket:id attribute nor adding specific required message for
the
component.
Is this possible?

Kind regards,
Tom;

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




  

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





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


  



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



Re: Feedback messages, input and label

2009-10-07 Thread Pedro Santos
Wicket is Sparta?

http://www.mail-archive.com/wicket-u...@lists.sourceforge.net/msg17023.html

On Wed, Oct 7, 2009 at 3:05 PM, Tomás Rossi tro...@mecon.gov.ar wrote:

 Yeah, we'd need 300 programmers for that task ;)

 So you have to specify the label for each component in a property file? And
 then you'd have a property file for each markup that contains a form?
 Mmhh...

 Igor Vaynberg escribió:

  Nonetheless, it'd be madness



 no, this is spartaaa!

 form components search property files for their labels without you
 having to explicitly set a model.

 -igor


 if I had to do that with every component of the


 system. Is this the only way? Couldn't this be done in a more automatic
 fashion, like for example, extracting it from the html label content
 which
 is associated to the input?

 Olivier Bourgeois escribió:


 Have you tried something like this in your page.java :

 pwd.setLabel(new ModelString(Password));

 ?


 2009/10/7 Tomás Rossi tro...@mecon.gov.ar




 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required!
 without
 modifying wicket:id attribute nor adding specific required message for
 the
 component.
 Is this possible?

 Kind regards,
 Tom;

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







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





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






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




-- 
Pedro Henrique Oliveira dos Santos


Re: Feedback messages, input and label

2009-10-07 Thread Tomás Rossi
Ok, that's a little nicer, but still... It'd be better if the label 
could be deduced from the markup itself. Yet, no big deal.


Thanks

Matej Knopp escribió:

try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
  

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! without
modifying wicket:id attribute nor adding specific required message for the
component.
Is this possible?

Kind regards,
Tom;

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





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


  



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