cancel
Showing results for 
Search instead for 
Did you mean: 

InputField after action event

Former Member
0 Kudos

Hi all,

How can I go to InputField automaticaly after a action event on my View?

thanks in advance,

david

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi again,

I've solved this. I can focus on the InputField using the wdDoModifyView method.

But I've another issue.

I use the firsTime variable to focus like:

if(firstTime){

IWDInputField input = (IWDInputField)view.getElement("InputField1");

input.requestFocus();

}else{

IWDInputField input = (IWDInputField)view.getElement("InputField2");

input.requestFocus();

}

but, how can I reset this variable from other method?

Former Member
0 Kudos

You cannot reset this variable but you can use a context attribute that determines which input field should get focussed. In wdDoModifyView() you could read/reset this attribute and set the focus accordingly.

Or: Set the focus directly from the event handler using method

requestFocus(IWDNodeElement, IWDAttributeInfo)

.

Armin

Answers (5)

Answers (5)

Former Member
0 Kudos

ok

now work's! thanks a lot for your patience.

david

Former Member
0 Kudos

Yes. It is the name of the InputField.

Regards, Anilkumar

Former Member
0 Kudos

The ifTemplateName name is the name of InputField ID ?

Former Member
0 Kudos
IWDInputField field = (IWDInputField) view.getElement("ID of input field");
Former Member
0 Kudos

Hi,

When I try to implement:

IWDInputField input = (IWDInputField)view.getElement("ifTemplateName");

an error appear:

view cannot be resolved.

thanks for your responses,

david

Former Member
0 Kudos

write the code in wdDoModifyView

have u written in the wdDoModify View

otherwise take a reference of the view

former_member182372
Active Contributor
0 Kudos

Hi,

place your code in wdDoModifyView method.

Regards, Maxim R.

former_member182372
Active Contributor
0 Kudos

Hi,

see "Input Focus in WebDynpro UI Elements". Same problems is discussed.

Regards, Maxim R.

Former Member
0 Kudos

in modify

IwdInputfield ele=view.getElement();

ele.requestfocus();

check for syntax.