on 12-04-2007 10:21 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I Already thought to those solutions of storing, but the same problem occurs at a higher level... We can't store the whole navigation path of a user ...
if the user visits V0->V1->V3
or V0->V2->V3
once we click back on V3 we arrive on V2 or V1 depends on where we come from.
But then, in these two views i'll store that i'm coming from V3 and then V1 oreV2 button will bring me back to V3 in stead of V0
No ?
Or does your solutions comply to this issue to?
How can it fix the problem .. I don't understand
<i>if the user visits V0->V1->V3
or V0->V2->V3
once we click back on V3 we arrive on V2 or V1 depends on where we come from.
But then, in these two views i'll store that i'm coming from V3 and then V1 oreV2 button will bring me back to V3 in stead of V0</i>
If I use a field for storing the incoming. I will overwrite it by coming from V3 to V2 , and then when in V2 I will Click on back I Will find 'V3' in the incoming view field. So By clicking back... I won't get the excpected result.
I I use a table to store the navigation path, I can't from any point, bring the user back to throught his navigation path. But i'll need a mean to call dynamically the right plug.
Tx,
Hamza
Hi Hamza.
When you come into a view via inbound you can set the attribute in the view itself.
As attribute you can use a string which contains the name of the outbound to use for back navigation.
Then onBack > fireplug( lv_outbound ).
So you have one attribute in V2, one in V3 and one in V1
This way you will always come to V0 from V1.
Hi,
thats a typical problem of dynamic navigation.
I would suggest to create a contextattribute on componentcontroller where you always add the actual view, seperated by a delimiter.
SO the path would be vor V1->V3 for example V1----V3.
Then you can alway get the whole way back by handling the String in the init-Method of the view and the action-method for back ( remove the last view).
So you can navigate as you want ?
I think thats the easiest way to realize it.
best regards, Matthias
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
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.