cancel
Showing results for 
Search instead for 
Did you mean: 

sap.ui.table.Table - Moving focus from column to input field within template

SAPSeeker
Participant
0 Kudos
422

Hi Experts,

I have a requirement to set focus on an input field that is part of table column template. When the user tries to click keyboard tab button continuously from objects outside the table and when it eventually gets the focus into the table column headers followed by actual row objects, column template gets focus but not to the actual input field which is part of template. Since the user is right now working on classical CLI system now that doesn't require mouse, the requirement can't be bypassed.

Is there any way to overcome this ? If yes, can you please point how to achieve the requirement ?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

SAPSeeker
Participant
0 Kudos

Fixed it by placing code that calls attachBrowserEvent for "focus" at specific place and by manipulating rows.

this.getView().byId("idOfField").attachBrowserEvent("focus",function(oEvent){
if(oEvent.type == 'focus'){
var rowNumber = parseInt(this.getParent().sId.match(/[0-9]+/)[0], 10);
var row = this.getParent().sId.replace(/[0-9]/g, '');
var nextRow = row + ( rowNumber + 1 );
sap.ui.getCore().byId(nextRow).getCells()[cellNumber].focus();
}
});

Answers (0)