Skip to Content
author's profile photo Former Member
Former Member

Invoke custom controller

Hi ,

How can we configure my custom controller which extends ConfigurableFlowController,so that when onclick event occurs in wizard(create-wizard) my custom controller will get invoked.Can you please explain how flow goes while click on next or back or cancel button?which methods are invoked first? How controllers are mapped?

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Dec 11, 2014 at 10:46 AM

    Hi,

    the documentation of Configurable Flow Widget and tutorial on How to extend a widget will give you all the answers.

    When you extend the widget and override just the controller be sure to change the *id*s in the widgets.xml to use your extended widget. The rest should just work. The only issue I know about is the definition.xml - when you extend the widget you may have to redeclare all sockets and settings (you may just copy-paste the - it's a known bug.

    Cheers, Wojtek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2014 at 02:53 PM

    Thank you for your information.

    I have created one widget which extends configurableflow (com.hybris.cockpitng.widgets.configurableflow) widget.I have declared same widget in my custom backoffice widget xml configuration as below.alt text

    Now when any onclick events occur from wizard my controller should get invoked,but still existing controller(ConfigurableFlowController) is getting invoked.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Yes Sandeep, I have created new widget. Now i want to replace/override existing widget (configurable flow widget) with newly created widget so that each time my controller should get invoked.Existing controller should not get invoked.

  • Posted on Dec 11, 2014 at 03:27 PM

    Hi,

    • is this the only instance of the configurable flow? I assume yes. If not - are the right connections used?

    • have you re-declared the controller in definition.xml of your new widget?

    It should work if the configuration is OK. If not you will have to ask at support@hybris.com since the shreads of information I see are insuficient to diagnose the problem.

    Cheers, Wojtek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2014 at 11:30 AM

    I have attached snippet of configuration file in myextenstion backoffice widget.xml.link text

    is configuration sufficient to invoke my controller not existing one? or i missed any thing in above configuration?


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.