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:
selectedRowsAbsolute
String
rwThis property represents the selected rows of the table. GuiTableControl:
selectedRowsAbsolute
String
rwThis property represents the selected rows of the table. In GuiTableControl (unlike in a GuiGridView control) this property only represents the selected rows that are currently visible. There may be other selected rows which are outside of the current scroll area and therefore excluded from this property. If information of the selection state of currently not visible rows is needed, then is is necessary to "scroll" to the invisible rows by setting the firstVisibleRow property before reading the selectedRowsAbsolute property. For GuiTableControl control, the selection is possible only within the visible range of rows.
Best regards
Kranthi
SAP Screen Personas Team
Add a comment