Label tag wicket:for question

2011-08-12 Thread Jered Myers
I am using a label tag with wicket:for (Wicket 1.4.18) and the text of 
the label is not replacing as I expect.


I am using a label tag in my HTML like so:

label wicket:for=firstName
span class=label-textName/span
/label
input type=text wicket:id=firstName /


In my Java code:

RequiredTextField? firstName = new RequiredTextFieldString(firstName)
firstName.setOutputMarkupId(true));
firstName.setLabel(new ModelString(Yo!); // TODO This should come 
from a properties file

add(firstName);

When the page renders, the text for the label tag is Name and I expect 
it to be Yo!.  The error message works and shows Field 'Yo!' is 
required.  Am I understanding the use of the label tag correctly?


Jered




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



Re: Label tag wicket:for question

2011-08-12 Thread Igor Vaynberg
this has been changed in later commits, use
wicket:labelName/wicket:label instead of span class=label-text

-igor


On Fri, Aug 12, 2011 at 1:05 PM, Jered Myers
jer...@maplewoodsoftware.com wrote:
 I am using a label tag with wicket:for (Wicket 1.4.18) and the text of the
 label is not replacing as I expect.

 I am using a label tag in my HTML like so:

 label wicket:for=firstName
 span class=label-textName/span
 /label
 input type=text wicket:id=firstName /


 In my Java code:

 RequiredTextField? firstName = new RequiredTextFieldString(firstName)
 firstName.setOutputMarkupId(true));
 firstName.setLabel(new ModelString(Yo!); // TODO This should come from a
 properties file
 add(firstName);

 When the page renders, the text for the label tag is Name and I expect it
 to be Yo!.  The error message works and shows Field 'Yo!' is required.
  Am I understanding the use of the label tag correctly?

 Jered




 -
 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: Label tag wicket:for question

2011-08-12 Thread Jered Myers

Thanks that worked perfectly!

On 08/12/2011 01:28 PM, Igor Vaynberg wrote:

this has been changed in later commits, use
wicket:labelName/wicket:label  instead ofspan class=label-text

-igor


On Fri, Aug 12, 2011 at 1:05 PM, Jered Myers
jer...@maplewoodsoftware.com  wrote:

I am using a label tag with wicket:for (Wicket 1.4.18) and the text of the
label is not replacing as I expect.

I am using a label tag in my HTML like so:

label wicket:for=firstName
span class=label-textName/span
/label
input type=text wicket:id=firstName /


In my Java code:

RequiredTextField?  firstName = new RequiredTextFieldString(firstName)
firstName.setOutputMarkupId(true));
firstName.setLabel(new ModelString(Yo!); // TODO This should come from a
properties file
add(firstName);

When the page renders, the text for the label tag is Name and I expect it
to be Yo!.  The error message works and shows Field 'Yo!' is required.
  Am I understanding the use of the label tag correctly?

Jered




-
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