10 Replies Latest reply: Oct 24, 2013 5:04 AM by Ajay Sharma RSS

    ADF Mobile: How to create Login View ?

    Ajay Sharma
      Hi,

      I want to create Login View using ADF Mobile.

      My scenario is User will enter User Name and Password and click on "Login" button.

      After clicking on "Login" button a webservice will be called and return the response.

      If user is validated Control is delegated to next view else a pop message will be prompted on same view.

      How to perform this ?

      Regards,
      Ajay Sharma
        • 1. Re: ADF Mobile: How to create Login View ?
          user404
          Ajay Sharma wrote:
          Hi,

          I want to create Login View using ADF Mobile.

          My scenario is User will enter User Name and Password and click on "Login" button.

          After clicking on "Login" button a webservice will be called and return the response.

          If user is validated Control is delegated to next view else a pop message will be prompted on same view.

          How to perform this ?

          Regards,
          Ajay Sharma
          If I get this right, you want to authenticate the user against a web service call?
          If so, I don't think it's possible to delegate the security to the application it self once you are authenticated.
          The security login procedure of ADF Mobile authenticates against a server. But it would be possible if you do your web service
          and the response is OK, then you call the login procedure itself by using a hardcoded user. That way, your security can be delegated.
          • 2. Re: ADF Mobile: How to create Login View ?
            Ajay Sharma
            Hi,

            Yes, I want to authenticate the user against a web service call.

            Can you give any tutorial or steps I am new to ADF Mobile.



            Regards,
            Ajay
            • 3. Re: ADF Mobile: How to create Login View ?
              user404
              First try this :
              http://andrejusb.blogspot.be/2012/10/adf-mobile-login-functionality.html
              It shows/learns you how to secure your application be making your own authentication server.
              If you get how it works, make your own login page be defining an unsecured feature with a .amx page who does the web service call.
              Then read this:
              http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/security.htm#CDDECGIG (at least from '+17.4.11 What You May Need to Know About Login Pages'+)
              It describes how you can do the login procedure manually.
              • 4. Re: ADF Mobile: How to create Login View ?
                Ajay Sharma
                Hi,

                I was testing the app downloaded from http://andrejusb.blogspot.be/2012/10/adf-mobile-login-functionality.html link .
                While deploying it on server I got following exception
                [02:21:52 PM] [Deployer:149193]Operation "deploy" on application "BasicAuth" has failed on "AdminServer".
                [02:21:52 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application BasicAuth on AdminServer.: Error: Unresolved Webapp Library references for "WebAppModule(BasicAuth:BasicAuth.war)", defined in weblogic.xml [Extension-Name: adf.oracle.domain.webapp, exact-match: false], [Extension-Name: jstl, Specification-Version: 1.2, exact-match: false], [Extension-Name: jsf, Specification-Version: 2, exact-match: false].
                [02:21:52 PM] Weblogic Server Exception: weblogic.application.ModuleException: Error: Unresolved Webapp Library references for "WebAppModule(BasicAuth:BasicAuth.war)", defined in weblogic.xml [Extension-Name: adf.oracle.domain.webapp, exact-match: false], [Extension-Name: jstl, Specification-Version: 1.2, exact-match: false], [Extension-Name: jsf, Specification-Version: 2, exact-match: false]
                [02:21:52 PM]   See server logs or server console for more details.
                [02:21:52 PM] weblogic.application.ModuleException: Error: Unresolved Webapp Library references for "WebAppModule(BasicAuth:BasicAuth.war)", defined in weblogic.xml [Extension-Name: adf.oracle.domain.webapp, exact-match: false], [Extension-Name: jstl, Specification-Version: 1.2, exact-match: false], [Extension-Name: jsf, Specification-Version: 2, exact-match: false]
                [02:21:52 PM] Deployment cancelled.
                [02:21:52 PM] ----  Deployment incomplete  ----.
                [02:21:52 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
                Regards,
                Ajay
                • 5. Re: ADF Mobile: How to create Login View ?
                  Ajay Sharma
                  Hi,

                  I successfully created the Login View against webservice call using example from http://amit-adf-work.blogspot.in/2012/11/mobile-adf-webservice-call-using-oracle.html

                  I would Like to know how to navigate to next view on condition.
                  For e.g. I webservice return true then only next view will be shown else we will get a alert message.


                  Any Tutorial for Conditional Navigation.

                  Regards,
                  Ajay SHarma
                  • 6. Re: ADF Mobile: How to create Login View ?
                    Joe Huang-Oracle
                    Hi,

                    Conditional navigation can be supported by adding a router compnent between the login screen and the application screen in the task flow. The router would navigate return from the login call (say true or false), and bring up the expected page. Does this help?

                    Thanks,

                    Joe Huang
                    • 7. Re: ADF Mobile: How to create Login View ?
                      Ajay Sharma
                      Hi,

                      I created three view
                      1. LoginHome,
                      2. LoginSuccess
                      3. LoginFailed
                      I used a router. this router is connected to LoginSuccess and LoginFailed view and LoginHome is connected to router.

                      In router I assigned following values
                      Activity ID : router1
                      Default Outcome : Failed
                      Cases:
                                            Expression                                                      Outcome
                       1. #{viewScope.ValidateLogin.getResponse}==101                    Failed         
                       2. #{viewScope.ValidateLogin.getResponse}!= 101                    Response   
                      In LoginHome view button "Login" has following property:
                      Action:  route  (Control Flow to router)
                      Action Listener: #{bindings.getAuthenticateUser.execute}  // mapped with webservice method
                      After clicking on Login button even if I am valid user it delegating control to LoginFailed view.

                      Where I am going wrong ? Please tell me


                      Regards,
                      Ajay

                      Edited by: Ajay Sharma on Jan 17, 2013 6:16 PM
                      • 8. Re: ADF Mobile: How to create Login View ?
                        Ajay Sharma
                        Hi,

                        Please tell me where I am going wrong in conditional navigation



                        Regards,
                        Ajay
                        • 9. Re: ADF Mobile: How to create Login View ?
                          itskris

                          Hi Ajay

                           

                          i am also facing the same problem. have you solved it . if yes , pls share the solution here

                          • 10. Re: ADF Mobile: How to create Login View ?
                            Ajay Sharma

                            Hi,

                             

                            No this issue is not solved. I started working again on ADF Mobile some days before only.

                             

                            You tried this ?