package Ġnet . dont dr ink and root . wicket . bootstrap . component . form . form group Ċ Ċ import Ġorg . apache . wicket . markup . repe ater . Repe ating View Ċ import Ġorg . apache . wicket . model . I Model Ċ import Ġorg . apache . wicket . model . Model Ċ Ċ /** Ċ Ġ* Ġ@ param Ġ< T > ĠType Ġof Ġthe Ġmodel Ġobject . Ċ Ġ*/ Ċ open Ġclass ĠFormGroup Actions < T >( ĊĠĠĠ Ġid : ĠString , ĊĠĠĠ Ġmodel : ĠI Model < T > Ġ= ĠI Model < T > Ġ{ Ġnull Ġ}, ĊĠĠĠ Ġlabel Model : ĠI Model < String > Ġ= ĠModel ( null ) Ċ ) Ġ: ĠFormGroup < T >( id , Ġmodel , Ġlabel Model ) Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġaction View : ĠRe pe ating View ĊĊĠĠĠ Ġoverride Ġfun Ġcreate Components () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . create Components () ĊĠĠĠĠĠĠĠ Ġaction View Ġ= ĠRe pe ating View (" action ") ĊĠĠĠĠĠĠĠ Ġpopulate Actions ( action View ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġadd Components () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . add Components () ĊĠĠĠĠĠĠĠ Ġcontainer . add ( action View ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprotected Ġopen Ġfun Ġpopulate Actions ( action View : ĠRe pe ating View ) Ġ{ ĊĠĠĠĠĠĠĠ Ġ/* ĠHook Ġ*/ ĊĠĠĠ Ġ} Ċ } Ċ Ċ inline Ġfun ĠRe pe ating View . add Actions ( cross inline Ġactions : ĠRe pe ating View .( component : ĠFormGroup Actions < Void >) Ġ-> ĠAny ?): ĠFormGroup Actions < Void > Ġ{ ĊĠĠĠ Ġval Ġform Group Actions Ġ= Ġobject Ġ: ĠFormGroup Actions < Void >( new Child Id ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġpopulate Actions ( action View : ĠRe pe ating View ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġactions ( action View , Ġthis ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġadd ( form Group Actions ) ĊĠĠĠ Ġreturn Ġform Group Actions Ċ }