cancel
Showing results for 
Search instead for 
Did you mean: 

lost focus!

Former Member
0 Kudos

i have two inputfields (named input1 and input2)in one view.

i hope input2' value will be changed after i input a value into input1 and input1 lost focus .

<b>{e.g.:

i input a number '10' into input1 then input2 will got a vlues 20(formula:10*2=?).

}</b>

but u know i cann't find any InputField' lost focus event.how to do it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I doubt whether it's possible to do it the way you are trying. If you want to the second value to change as soon as the first inputfield looses focus, then it's not possible in WD. Since "loosing focus" is a pure client side event and has no corresponding server side event in WD.

But if you trying to do it on click of some button or something, then it's achievable. You can also think about calculated attributes.

Regards,

Satyajit.

Former Member
0 Kudos

because the them be binded to a javabean model. so calculated cann't be set any more.

Former Member
0 Kudos

winogal,

Actually, calculated attributes may created even in this case (in child 1..1 non-singleton sub-node).

However, they are of no use here. You need some action to force client-server roundtrip. Low-level client side events are not propagated to server.

So either use onEnter action handler for first input (users must press ENTER key to fire it), or create explicit button/link2action "Recalculate" or both.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

wingoal,

There is a third possibility.

If your second inputfield is the first Element after the first inputfield.

You can set the calculate option to the onEnter from the second inputfield.

When the user pressed the tab-key, the onEnter from the second inputfield is executed.

Answers (1)

Answers (1)

Former Member
0 Kudos

If there is a server event which takes place,(my guess is yes, since input field 2 value changes), you can achieve this using:

1) Go to wdModifyView method

2) Request for input field element using

element = (myelementcast) view.getElement("elementname");

3) element.requestFocus();

Hope this helps.

Regards,

Subramanian V.