cancel
Showing results for 
Search instead for 
Did you mean: 

TableView u0096 courser when editing fields

StefanRoesch
Active Participant
0 Kudos

When jumping the courser from input field to input field by hitting “tabulator” normally the complete fieldcontent of each field is marked. When you now enter text you overwrite the fieldcontent.

When having a TableView with selectionmode „Multilineedit“ under Design2003 there is a different behavior. When I enter an inputfield by pressing “tab” the courser is placed at the 1st place within the inputfield and the fieldcontent is not marked.

I think this is a rendering feature of design2003, but is there a way to change this behavior to the normal “overwrite” way?

Thanks for any ideas,

Stefan.

Accepted Solutions (1)

Accepted Solutions (1)

maximilian_schaufler
Active Contributor
0 Kudos

I don't know if this is a "wanted" change or not, but here is what I found out:

When doing upgrade on our WebAS 6.20 from SP 46 to 54, I noticed this change as well, previously the text in input fields was selected automatically, but not for all the input fields in the tableview in SP54.

After some thorough research I found the difference, and it breaks down to this:

I replaced the call of the javascript function "sapUrMapi_InputField_focus" with "sapUrMapi_focusElement".

I do not have a detailed explanation for this, but I found out that somehow the event parameter has to be passed on to the function sapUrMapi_focusElement which gets called from within the function sapUrMapi_Inputfield_focus. As this behaviour only shows up in the tableview I did not put any more effort into finding out about all the nitty gritty details, I was just glad I got it working again.

As I'm using an iterator with quite a few replacement bees, I did the string-replacement on the rendered input field string before passing it on to the bee_html attribute. If you want to use it for your whole tableview (which I have not tested before), I would suggest that you look at the HTML source code and look for all occurences of sapUrMapi_Inputfield_focus and check where it gets called, so you know where you have to look for wanted/unwanted changes.

Again, as I don't know if this behaviour is planned or just a "SP54-feature", chances are you will have to be careful when doing further upgrades!

Cheers,

Max

Answers (1)

Answers (1)

StefanRoesch
Active Participant
0 Kudos

Hello Maximilian,

hey, that seems to work very well!! Thanks a lot!!! I also checked and stripped down the HTML coding at first but didn't find that special parameter.

Would it be ok, to simply include the modified JS function within my custom JS include? The modified one would overwrite the included standard function and I do not have to change the original one.

function sapUrMapi_InputField_focus(sId,oEvt) {
	var o=ur_get(sId);
	sapUrMapi_focusElement(sId<b>,oEvt</b> );
        if(ur_system.is508) o.title=ur_getTooltip(sId);
	sapUrMapi_DataTip_show(sId,"focus");
	sapUrMapi_InputField_showLength(o,oEvt);
	sapUrMapi_InputField_showButton(o,oEvt);
}

I would try to implement it this way and keep an eye on possible side effects...

Thanks again,

Stefan

(6.20 SP49)<b></b>

maximilian_schaufler
Active Contributor
0 Kudos

Yes, that's also a possible way, of course with possible side effects.

I just changed the calling of the function in order to solve my problem and not touch too much of the rest, because who has time to check for all possible occurences of a javascript function ...

But including the new function is nice as well, let me know if you learn anything additional about different behaviour because of it.

Greets,

Max