Skip to content

Commit

Permalink
feat: support inner renderers in `BBjGridExWidgetRendererGroupCellRen…
Browse files Browse the repository at this point in the history
…derer`
  • Loading branch information
hyyan committed Jul 8, 2019
1 parent 14be64b commit 536c905
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions BBjGridExWidgetRenderers.bbj
Expand Up @@ -186,28 +186,32 @@ class public BBjGridExWidgetRendererGroupCellRenderer implements BBjGridExWidget
rem */
field public BBjNumber Checkbox! = null()
rem /**
rem * Provide an inner renderer
rem */
field public BBjGridExWidgetRendererInterface InnerRenderer! = null()
rem /**
rem * Provide a footer value getter expression
rem */
field public BBjGridExWidgetExpressionInterface FooterValueGetterExpression! = null()
rem /**
rem * Construct new BBjGridExWidgetRendererGroupCellRenderer
rem *
rem *
rem * @param BBjGridExWidgetExpressionInterface footerValueGetterExpression! an expression
rem */
method public BBjGridExWidgetRendererGroupCellRenderer(BBjGridExWidgetExpressionInterface footerValueGetterExpression!)
#FooterValueGetterExpression! = footerValueGetterExpression!
methodend
rem /**
rem * Construct new BBjGridExWidgetRendererGroupCellRenderer
rem *
rem *
rem * @param BBjString footerValueGetterExpression! an expression
rem */
method public BBjGridExWidgetRendererGroupCellRenderer(BBjString footerValueGetterExpression!)
#setFooterValueGetterExpression(footerValueGetterExpression!)
methodend
methodend
rem /**
rem * Create a BBjGridExWidgetExpression from string and set it a footer value getter
rem *
rem *
rem * @param BBjString expression! Javascript expression
rem */
method public void setFooterValueGetterExpression(BBjString expression!)
Expand All @@ -230,6 +234,20 @@ class public BBjGridExWidgetRendererGroupCellRenderer implements BBjGridExWidget
json!.addProperty("suppressDoubleClickExpand" , #getSuppressDoubleClickExpand().booleanValue(),err=*next)
json!.addProperty("checkbox" , #getCheckbox().booleanValue(),err=*next)
json!.addProperty("footerValueGetter" , #getFooterValueGetterExpression().toString(),err=*next)

if(#getInnerRenderer() <> null()) then
json!.addProperty("innerRenderer" , #getInnerRenderer().RENDERER_NAME(),err=*next)

declare JsonObject innerJson!

innerJson! = #getInnerRenderer().getAsJsonObject()
it! = innerJson!.entrySet().iterator()
WHILE (it!.hasNext())
next! = it!.next()
json!.addProperty(str(next!.getKey()) , str(next!.getValue()),err=*next)
WEND
FI

methodret json!
methodend

Expand Down

0 comments on commit 536c905

Please sign in to comment.