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

how to manage dynamic navigation between views

Hi,

Let imagine we have 3 views, V1, V2, V3.

you have 2 navigation ways :

V1->V3

V2->V3

On the V3 you have a BACK button, is it possible to dynamically call a fire_plug method based on the name of the plug used (this one will be stored in a internal table). eg. wd_this->fire_plug( my_plug_name ).

(This is a simplification of my problem cause in fact I have more than 2 entry points, but this is a good beginning)

Thanks for your help

Hamza

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 10:31 AM

    its a very simple concept

    make a common flag at controller context of char type

    whenver the action corresponding to the plug is called clear the flag and add values coresponding to that plugging

    eg flag = my_plug_name

    now whenever back vent occurs you just have to read the value of flag and send it to fire)plug

    reward if useful

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi hamza........

      instead of having an attribute, have a node with two attributes.

      one for view name and the other for the navigation id.

      when the navigation is from v1 to v2.

      update the table as v2, v1.

      this means that when the back button in v2 is pressed, it should navigate

      to v1.

      when the navigation is from v2 to v3, set as v3, v2.

      when the back button is pressed in v3, you can check the table for view v3

      and take the return back view.

      so it will give the view id as v2. hence you can fire that plug.

      now when v2 is pressed, yo can again check the entry for view v2 and

      you will get teh value v1.

      hence you can navigate to v1.

      ---regards,

      alex b justin

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 10:32 AM

    hi hamza....

    here is a solution for you.

    for v3 have to outbound plugs, o1,o2.

    have an attribute in your component controller of type string.

    when the navigation is from v1 to v3, set that atrribute value to v1, else have it as v2.( the seeting of the attribute has to be done when the outbound plug is called in v1 or v2). now when the the back button is pressed, check the value of the attribute and fire the corresponding plug. dynamic navigation can also be done. but it will be better.

    ---regards,

    alex b justin

    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.