Re: HTML5 and Bootstrap Input placeholder tag

2016-05-06 Thread Martin Grigorov
On May 6, 2016 9:05 PM, "David Beer"  wrote:
>
> Hi Guys
>
> I am trying to utilise the placeholder tag in input components. So say I
> have a TextField that mapps to the html  placeholder="Enter Name">. How can I get wicket to add the placeholder tag
> so that I can populate via properties.



>
> Thanks
>
> David


RE: HTML5 and Bootstrap Input placeholder tag

2016-05-06 Thread Ricardo Roman Rodriguez SaldaƱa
Hi David, the most straightforward way i can  think of is using a 
StringResourceModel in conjuntion with a AttributeModifier heres a basic 
example:
//inside your page or panel:TextField myField = new TextField("myField")IModel 
mPlaceHolder = new StringResourceModel("myField.placeholder",this, 
null);myField.add(new AttributeModifier("placeholder", mPlaceHolder))
This will add the placeholder attribute to your input tag and the value will be 
looked up on your page or panel .properties file under the key 
"myField.placeholder".
Sorry if my english sounds weird, its not my first language.

> From: david.m.b...@gmail.com
> Date: Fri, 6 May 2016 19:04:47 +0100
> Subject: HTML5 and Bootstrap Input placeholder tag
> To: users@wicket.apache.org
> 
> Hi Guys
> 
> I am trying to utilise the placeholder tag in input components. So say I
> have a TextField that mapps to the html  placeholder="Enter Name">. How can I get wicket to add the placeholder tag
> so that I can populate via properties.
> 
> Thanks
> 
> David
  

HTML5 and Bootstrap Input placeholder tag

2016-05-06 Thread David Beer
Hi Guys

I am trying to utilise the placeholder tag in input components. So say I
have a TextField that mapps to the html . How can I get wicket to add the placeholder tag
so that I can populate via properties.

Thanks

David