1 controller - many uses (change buttons "on flow")

4 views
Skip to first unread message

Artyom M

unread,
Nov 23, 2014, 11:23:07 PM11/23/14
to koala-fra...@googlegroups.com
Niko,

I have 1 controller and want to use it many times, but don't want to create many duplicates.
All I need is change add, edit and other buttons in controller depending on where the controller is called.

How to do that?
And can I change more than buttons (eg. editDialog)?

Niko Sams

unread,
Nov 24, 2014, 3:54:21 AM11/24/14
to Koala Framework Dev
On Mon, Nov 24, 2014 at 5:23 AM, Artyom M <psycho...@gmail.com> wrote:
Niko,

I have 1 controller and want to use it many times, but don't want to create many duplicates.
All I need is change add, edit and other buttons in controller depending on where the controller is called.
Easiest would be to create an abstract base class multiple others can inherit from.
That way you can even slightly change the behaviour if required.

the other way would be to use the same controllerUrl on multiple places
 

And can I change more than buttons (eg. editDialog)?

what buttons do you mean?

Niko

Artyom M

unread,
Nov 25, 2014, 5:34:19 AM11/25/14
to koala-fra...@googlegroups.com
>Easiest would be to create an abstract base class multiple others can inherit from.
Your code examples would really help me.

I created the same controller with a different name, for me its easiest method.

>what buttons do you mean?
Standard new, delete, xls buttons and edit per row button.
Reply all
Reply to author
Forward
0 new messages