on 03-26-2013 8:16 AM
Hi, experts,
I have create a HWC application with Credential request and ECC backend through SSO.
I hope the Credential request can popup a alert after a user type error username/password in the Credential request screen.
I tried to write code in the customAfterMenuItemClick in the Custom.js, like the following:
function customAfterMenuItemClick(screen, menuItem) {
if(screen == "Credential_Request" && menuItem == "Save" ){
.....
}
}
But I failed. How can I do it?
Do you give me some hint?
Best regards,
tao
The above code worked for me in a simple test of a new hybrid app that contained a Credential Request screen.
The following samples may be relevant.
Debugging a Mobile Workflow https://cw.sdn.sap.com/cw/docs/DOC-150957
Credentials in a Mobile Workflow https://cw.sdn.sap.com/cw/docs/DOC-149768
I assume though that your question is how do I handle the case where the user name or password are incorrect.
The following is an excerpt from the section How to Handle Credential Failures in the Credentials in a Mobile Workflow sample.
Depending on the application, it may make sense to validate the users credentials when they initially log in. To do this, an online request can be invoked to validate the user provided credentials.
An operation will be added to the MBO whose purpose is validate the user name and password provided and not to affect the backend data.
... see the link above for the complete sample.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The above code worked for me in a simple test of a new hybrid app that contained a Credential Request screen.
The following samples may be relevant.
Debugging a Mobile Workflow https://cw.sdn.sap.com/cw/docs/DOC-150957
Credentials in a Mobile Workflow https://cw.sdn.sap.com/cw/docs/DOC-149768
I assume though that your question is how do I handle the case where the user name or password are incorrect.
The following is an excerpt from the section How to Handle Credential Failures in the Credentials in a Mobile Workflow sample.
Depending on the application, it may make sense to validate the users credentials when they initially log in. To do this, an online request can be invoked to validate the user provided credentials. An operation will be added to the MBO whose purpose is validate the user name and password provided and not to affect the backend data.
Here is the the success screen shown after a valid user id and password has been provided.
Hope that helps,
Dan van Leeuwen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The HWC is developed in such a way that once the authentication fails, the credential request screen pops up.
You have to note that the validation happens only when an online query is fired from the device.
Here the save button should make an online call to backed. It the authentication fails, the credential screen pops up
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.