on 10-14-2021 11:23 AM
I am working on a SuccessFactors extension app in UI5, in my manifest file, I the the following patter to rout:
{
"pattern": "candidateDetailsForm/Id={candidateId}",
"name": "candidateDetailsForm",
"target": "candidateDetailsForm"
}
With "candidateDetailsForm":
{
"viewId": "candidateDetailsForm",
"viewName": "CandidateDetailsForm",
"viewLevel": 1
}
as the target. If I use the url: .../candidateDetailsForm/Id=1234 for example, it will
take me to the desired view, however, is there a way I could create a 'var' in the
attached controller that will contain the {candidateId} part of the url? The website will
accept any value for the candidateId when typing the url in, is that going to be a problem, and if so, how do I fix it?
The url will be generated in an automated email sent to a candidate from SuccessFactors,
with the candidate's Id sent through as part of the url.
Hi callumrae,
you should attach a Methode onRouteMatch in the init function to the router.
The patern coluld also be
"pattern": "candidateDetailsForm/{candidateId}",
url:.../candidateDetailsForm/1234
onInit : function(oEvent) {
this.getRouter().getRoute("candidateDetailsForm").attachPatternMatched(this.onRouteMatched);
}
onRouteMatched : function(oEvent) {
degugger
// get the attributes from oEvent like "oEvent.getParameters()"
}
sss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
8 | |
8 | |
7 | |
6 | |
6 | |
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.