Skip to content

Commit

Permalink
fixes #140
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Wald committed Apr 19, 2019
1 parent 4036eec commit 46b814b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions BBjGridExWidget.bbj
Expand Up @@ -1384,13 +1384,21 @@ class public BBjGridExWidget extends BBjWidget
rem * @return BBjVector with the selected rows
rem */
method public BBjVector getSelectedRows()

rows! = new BBjVector()

if (#RS! = null()) then goto getSelectedRowsErr

returnedRows! = #executeScript("gw_getSelectedRows('" + #GRIDID$ + "')")

if returnedRows!=null() then goto getSelectedRowsErr

parser! = new JsonParser()
array! = parser!.parse(returnedRows!).getAsJsonArray()
rows! = new BBjVector()

it! = array!.iterator()
while (it!.hasNext())
next! = it!.next().getAsJsonObject()
next! = it!.next().getAsJsonObject(err=getSelectedRowsErr)
row! = new BBjGridExWidgetRow(#RS!)
row!.setId(next!.get("id").getAsString())
row!.setChildIndex(next!.get("childIndex").getAsInt())
Expand All @@ -1399,7 +1407,9 @@ class public BBjGridExWidget extends BBjWidget
row!.setIsSelected(iff(next!.get("selected").getAsString() = "true" , 1 , 0))
rows!.add( row!)
wend


getSelectedRowsErr:

methodret rows!
methodend
rem /**
Expand Down

0 comments on commit 46b814b

Please sign in to comment.