This discussion is archived
2 Replies Latest reply: Aug 20, 2013 12:17 AM by itskris RSS

Login AMX page issue with web service call

itskris Newbie
Currently Being Moderated

Hi All

 

i have created a login AMX page(username and password) and while the user click on the LOGIN button i have execute a webservice given below

    public boolean isValidUser(@WebParam(name = "arg0")

        String username, @WebParam(name = "arg1")

        String password){

        boolean checkflag=false;

      

        if(username.equals("admin")&&password.equals("admin")){

            checkflag=true;

            System.out.println("condition true.......Kris");

        }else{

            System.out.println("condition false.......Kris");

            checkflag=false;

        }

      

        return checkflag;

    }

if the condition is true it is returning true else false. and i am getting the results.

Next i have used a ROUTER in taskflow to select the condition here i am facing the issue always i am getting the failed page.

 

In expression of router i have given the condition #{data.mobile_LoginPagePageDef.isValidUser==true} and directing to new AMX page. if false directing to failed page. running this app when ever i press login button it is goin to failed page only . what will be the problem

 

How can i use bean class with this?

  • 1. Re: Login AMX page issue with web service call
    Frank Nimphius Employee ACE
    Currently Being Moderated

    Hi,

     

    actually when you approach the router, the information in the binding container for _LoginPagePageDef is no longer available.  Strings like #{data.mobile_LoginPagePageDef. ...} are recipes for disaster. Instead you should authenticate the user and hold the authentication state in a managed bean that you configure in pageFlowScope. The router then looks up the authentication state in the managed bean.

     

    Frank

  • 2. Re: Login AMX page issue with web service call
    itskris Newbie
    Currently Being Moderated

    Dear Frank

     

    Thanks for the reply . i am new to ADF Mobile, i am mobile app developer (Android). so i dont know much about the  ADF stuff's. How i can hold the authentication state in beans. ? i am bit confused on these things.

     

    If you have any simple stuff on above top please share it . it will be very help full.

     

    Thanks in advance

    Kris

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points