on 08-11-2016 4:40 PM
Hi Personas 3.0 experts,
This looks like a simple issue - but the general solution is not simple, why I am looking for a better answer.
Problem:
On UI there is a table with many rows, say 12 rows, but the screen can only display 3 max rows. To view all rows user has to scroll the table.
Action:
User needs to select multiple rows at any places (user can scroll the table if needed). A button is used to show all the selected row index (which should be the absolute index of the table).
Say, user can select rows of absolution index 2,11
Issue:
One a given screen, the absolute index=(value of tbl.selectedRows) + tbl.firstVisibleRow;
But tbl.selectedrRows returnx a STRING of relative index, say, "1;3" which must be parsed into a number array [1,3]. These are numbers of relative index depending on the offset, tbl.firstVisibleRow which has a changing value while user scrolling.
The problem is that this changing offset is not saved anywhere during scroolling. It is impossible to calculate the absolute index afterwards. I am just feeling that it should not be so complicated for such simple usecase.
Maybe there is a better way of doing this, anyone knows? Thanks!
Dong Zhu
Hi Dong,
We have introduced a new property called selectedRowsAbsolute with SAP Screen Personas 3.0 SP03. The existing selectedRows property is deprecated with SP03. The selectedRowsAbsolute property is slightly different for GuiTableControl and the GuiGridView objects. You can find more information in the API documentation using the URL:
http(s)://<hostname>:<port>/sap/bc/personas3/core/resources/doc/PersonasScriptingAPIDoc.html?sap-client=<client>
I have included the information below for your reference:
GuiGridView:
GuiTableControl:
For GuiTableControl control, the selection is possible only within the visible range of rows.
Best regards
Kranthi
SAP Screen Personas Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kranthi,
Thanks for the info.
Actually I just re-thought about my case and in most time, ie, user needs to select a few lines on Ui and press a button to take action. The .selectedRows propert will be OK as it only refers to the lines being displayed on the screen. If selected line is scrolled outside the window, this property won't count it. And if scrolls that line back, it will be counted by this property again.
It worth noticing that the user's selection mark will stay on the line even outside the window. So in the case user needs to know how many lines including those outside the window have been selected, your new property will come to handy.
Thanks.
Dong Zhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.