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

WCEM2: Navigating from one module to another module, then back again.. best practice??

Hi everyone,

I am struggling to understand the best way to navigate from one module to a another module, and then back to the original first module.

I am not talking about a page in the first module, consuming/including a view from another.

I am using wcem2..

So the scenario of navigation is as follows:

  • page X of module A to
  • page Y of module B to
  • page X of module A

I am guessing that this is a common thing to do in an application, so I am asking what technique is best practice please?

Ideas thrown up so far are:

Directly hitting the URL of the module/page? even if this works, i am not sure that it is making use of the framework as SAP intended.

Using module dependencies via module interfaces (the public-part / module-interface etc... (wont this cause a cyclic dependency for the ability to come back to module 1?)

Or do i have to use the cross module communication method mentioned in the notes, with event publisher and consumer etc...?

I am still new to wcem and a bit lost.. I certainly welcome any help with even just pointing out the right technique, then I can look it up in the guide..

How do you all do this navigation??

Thanks in advance,

Ed.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Feb 28, 2013 at 07:50 AM

    Hi Eddy,

    you can take a look at the extension examples delivered.There you can find a new module: invoices and the navigation to it from the main module.

    Basically, you have to define a navigational target in module A and expose the navigational target via the interface for the module B.

    You can also take a look in the application and check the navigation between the modules salestransactions and checkout.

    Regards,

    Elena

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Elena Tibrea

      Hi Elena,

      it worked perfectly. Thank you very much. The part that threw me off before writing the original post was when i read about cyclic dependencies in the Dev and extension guide where it stated this:

      /******* Quote ************/

      3.3 Module Dependencies

      3.3.1 Module Interfaces

      Module dependencies are defined by module interfaces.

      If you want a module to provide functionality for other modules, you define this in a module interface and its

      implementation. Other modules can use this functionality by declaring a dependency on this module interface.

      A module interface can also define dependencies on other module interfaces. Cyclic dependencies between

      module interfaces are not permitted.

      /**************************/

      To get this navigation working, as far as I could see, module A has a dependency on B, and module B also has a dependency on A, as specified in both metadata.xml files. Otherwise each module would not know about the others exposed interfaces. I thought that from the above quote in bold that this was not permitted, but now I realise that it was talking about cyclic dependencies created via the actual interface definition in the interface-definition file, and not the module dependency statement in the metadata.xml files. Does that sound right??

      Thanks again,

      Ed.

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.