on 05-29-2005 2:31 PM
Hello,
I have an input field which is bound to a text Context element called firstName.
I've created an event to clear the input field by writing at the onEnter event this action code:
wdContex.currentContexElement().setFirstName(null);
The problem is when the user enters the input field he still sees the "old" text. I beleive that the field needs to be "refreshed" with the new context it is bound to in some why but how?
This should work out of the box -- the only reason I guess is your error:
1. You are using wrong context element (or occasionally 2 different elements for InputField value binding and in onEnter action handler)
2. You have not assigned onEnter action handler to InputField
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. You can use a label UIElement for the inputfield.
2. You can display the textmessage as a tooltip for the inputfield.
3. User should press ENTER to remove the text.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IMHO, resetting the input field value to NULL if the user presses ENTER seems not to be a good idea.
To clear the input field, you can either set the value of the context attribute to NULL or "", both are ok.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All,
I think you all misunderstood me, let me clear my point:
The input fiels has a sefault value "Please enter your search here...". I would like that when the user enters the input filed in order to write his search criteria this default info messege will diappear instead of him need to delete it manually. I would like that to happen when the mouse focuses on the input field, before he pressed the Enter or hit the search key.
Hi Roy,
I worked with ur code and it worked fine for me i.e., after the user enters a value and hits the ENTER key the value in the input field will be set to null.
onEnter event is triggered when we hit the enter key.
Hope this helps you.
Regards,
Vijith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try
wdContext.currentContexElement().setFirstName("");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.