webclient refresh form

My solution is run WebClient. I have a field in the form of which is variable dataprovider form. In the OnAction execute a method. The problem I have is that when you run the OnAction, clean the variable that is dataprovider and reappears when the field has the data that previously had not respected the variable = null, in short I do not clean the field in the form.
Can anyone help me?
Thanks

Do you mean you try to set at onAction of the field the dataprovider to null ? Why would you like that ? It seems like you want to do some validation to your data ?

Indeed, the field is valid in OnAction. in the case of being wrong, I clean it so that when display shows empty again, but this does not happen, you still receive the content that I had

I think you need another approach: have a look : http://www.servoy.com/docs/servoy_4/Ser … eGuide.pdf , page 127 about onDataChange event. I think you just need to return false if the new value is not correct.

the OnDataChange, is used when the input field content in form changes, for example in the type TYPE_AHEAD, in case of an input text_field, OnDataChange event does not run, if the OnAction.
But the problem I have it between the OnAction and when the form regains focus.
in the method, the variable dataprovider clean and when the method ends and returns control to the form input field that is associated with the dataProvider that I just cleaned (variable = null), display the content I had before.
A rare case is that when I run it with debugger and put a toggle breakpoint, and doing nothing let him continue, he returns to take over the form, the field in question is empty, if it works there.
I hope I have been honest with the problem.
thanks for the help you’re giving me

Not sure I understand the issue ; onDataChange is called all the time when data is changed, most of the time the users will not hit enter but just exit the field. You shouldn’t change the dataprovider of the field in its onAction method. I think would be better to describe the desired behavior, probably someone will give some suggestions about how to achieve it.

thanks for your help, but not approaching the problem, I need the form back empty field when the form regains focus. Remember I’m running on WebClient NOT SmartClient. instruction (variable = null), which is data provider in the field of form, does not return empty.
See also the rare case that I put above the debugger.
again, thanks for your help

The sample you have sent me works fine.

function Validar_campo()
{
// aqui valido el campo y necesito que vuelva vacio
vcampo = null
elements.scampo.requestFocus()
}

code looks good to me too.

Jan: I regret that we work here. We’ve tested under Windows and Linux. We Servoy version 4.1.3 as an aid for what it is. It happens because something happens?
Thanks

He added data, we are working on WebClient IE6 / 7 and mozila

acpugliese:
He added data, we are working on WebClient IE6 / 7 and mozila

Ok on my mac it works fine. A colleague is now testing on Windows.

i tested this code:

function Validar_campo()
{
// aqui valido el campo y necesito que vuelva vacio
vcampo = null
elements.scampo.requestFocus()
}

on windows in IE8 and FF35 and both work fine.
The value is always cleared and the focus is returned.
I agree with laurian that this is not something you should do.
If i as a user type in something (lets say 15 chars) but i made a small mistake, if the server that swipes it completely empty, i would be very annoyed.
Validation should be done in ondatachange and true or false should be returned depending on if the data is ok or not.
Then we will set the focus back for you and make the text red so that the user understands that something is wrong.

No reason was because we were not working. Our need is that the field is empty for the new bar code reader. no matter the validation, even appears in red, that I have it resolved. What I can not solve is that the field is empty.
Sorry to insist but not what we see here. One striking theme of the debugger, if I run it with debugger and put a toggle breakpoint, and when it let him go, there it works. There is a problem with the version that we have?. It’s a memory problem?. I can not find axplicacion.
I say again, sorry for my insistence.

please make a case that reproduces your problem in our support system.

That simple case above works fine for me.