Skip to Content
0

How can i generate routing pattern (ex: /requests/1/variant/2/variantCreation/45)?

Jan 17 at 08:07 AM

27

avatar image
Former Member

Hi,

I am using sap.m.router and wants to generate routing pattern as '/requests/1/variant/2/variantCreation/45' where 1,2,45 needs to be passed dynamically.

1) How to pass this values from controller?
2) pattern '/requests/1' already generated, now can i attach 'variant/2/variantCreation/45' to existing pattern (i.e. '/requests/1') on nevigation?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Arjun Biswas Jan 17 at 10:33 AM
0

Hi Parth Patel,

While declaring the routes in your manifest file, use the foll. code (modify as per your requirement).

{
					"pattern": "admin-{id}/manage_user/view-User-{id1}",
					"name": "manage_user",
					"target": "manage_user"


				}, 

In your controller, use the foll. code for navigation :

Your_Router_Variable.navTo("manage_users",{id:dynamicValue1,id1:dynamicValue2});

Hope this helps,

Regards,

Arjun Biswas.

Share
10 |10000 characters needed characters left characters exceeded