Hi,

thank you for idea again :) But I have another question now. This textfield
belongs to wicket panel. And I don't really understand where should I place
<script></script> tags. Is it enough to place it in the panel.html or
should I define it in some other location?

Dmitriy

2012/11/27 Sven Meier <s...@meiers.net>

> "oncklick"
>>
>
> ... or "onclick" ?
>
> I'd recommend a javascript only solution without round-trip to the server.
>
> http://stackoverflow.com/**questions/2851794/clear-text-**
> onclick-textfield<http://stackoverflow.com/questions/2851794/clear-text-onclick-textfield>
>
> Sven
>
>
> On 11/27/2012 05:09 PM, Dmitriy Neretin wrote:
>
>> Hi wicket-users,
>>
>> I have a question about a combination of the TextField and
>> AjaxFormComponentUpdatingBehav**ior.
>>
>> I have a text field with content. Just to indicate what user should enter.
>> For example a day text filed, which already contains following "DD".
>> I do it by following:
>>    dayField.setModel(Model.of("**DD"));
>>
>> My idea now is to delete this text automatically. For example with
>> "oncklick" event. What I did is:
>>
>> dayField.add(new AjaxFormComponentUpdatingBehav**ior("oncklick"){
>>
>>      onUpdate(){
>>         doSomeStuff
>> }
>> });
>>
>> So, the problem now is it doesn't work at first time! For example I click
>> in the field, delete the text, insert another text, leave the field. Click
>> in the filed again and only then onUpdate method performs. But it doesn't
>> perform at first time and I don't understand why...
>>
>> Can somebody help me?
>>
>> Regards,
>> Dmitriy
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to