on 09-29-2006 7:25 AM
Hello All,
I have a business rule condition in which one View (View A) gets accessed from 2 other views (View B and View C). I have created two in-bound plugs one each for View B and View C.
The View A has one "back" button. On clicking it, the user should be returned to the view from where he came from (it could be View B or View C). My issue is that how do I identify correctly, from where (View B or View C) the user reached View A.
My approach was to add an attribute in the context which would hold values like "fromViewB" or "fromViewC". View A's outbound plug would check the context variable before deciding on which plug to fire.
But I feel that there would be more simpler and time tested features which would help me with this. Any better ideas?
Thanks in Advance,
Sachin.
Hi Sachin,
When you click BACK button, there would be a condition which will determine to which view it should return (ViewB or ViewC)... right?
In action handler for BACK button (say onActionBack()) .. you can write like this:
if(condition-1){
wdThis.wdFirePlugToViewB();
}else (
wdThis.wdFirePlugToViewC();
}
<i>My approach was to add an attribute in the context which would hold values like "fromViewB" or "fromViewC". View A's outbound plug would check the context variable before deciding on which plug to fire.</i>
>>>> >>>> This approach is also fine, but please create the valueAttribute in component controller and context-map it to your View.
Regards,
SK.
<i>PS: Plz reward points for helpful answers!</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.