cancel
Showing results for 
Search instead for 
Did you mean: 

Help with requestFocus() for TextEdit UI element on action.

Former Member
0 Kudos

Hi All,

I am trying to put the cursor on textedit UI element when user clicks a button. I tried few options but none of them work. I tried writing the code in modifyView and later in the action itself. But no result.

wdThis.wdGetAPI().requestFocus(wdContext.currentActivity_DetailElement(), wdContext.nodeActivity_Detail().getNodeInfo().getAttribute(IPrivateLCMHD_Edit_ActView.IActivity_DetailElement.ACTIVITY__NOTES));

I also tried this in modifyView:

IWDTextEdit input = (IWDTextEdit)view.getElement("txe_activity_notes");

input.requestFocus();

But still it won't bring the cursor when I click the button (add notes)

Any help is appreciated.

Kind Regards

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srinivas,

Try doing this in wdDoModifyview.

if(firstTime)
	{
		IWDTransparentContainer tr_cont = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
		IWDTextEdit l_TE = (IWDTextEdit)view.createElement(IWDTextEdit.class,"TextEdit2");
		l_TE.bindValue(wdContext.nodeVN_Text_Edit().getNodeInfo().getAttribute("VA_Text_Edit"));
		l_TE.requestFocus();
		
		tr_cont.addChild(l_TE);
		
	}

This brings the cursor also in the TextEdit element.

Regards,

Alka.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hai,

For TextEdit UI element , requestFocus() function highlight UI element but the cursor will not be appeared, cursor will appera for Inputfield.

regards,

Naga

Former Member
0 Kudos

Is it impossible.