Play! wireframe redirect form not working

I have a redirect problem from the game! the form. I think the problem is how I handle the routes. The idea is that the user should be able to go to dashboard.html either by first starting through index.hmtl, using login from using the secruity key, or by entering directly into a valid path containing access_token (using qr code redirection)

I am trying to do the following:

1) using the form on index.html (route: Application.index)

Here is my form (found in index.html):

<form action="@{Dashboard.authenticate()}" method="POST" name="login">
    <input name="key" type="password" maxlength="128" value="${flash.key}">
    <input class="button" id="btnLogin" type="submit" value="Login">
</form>

2) authenticate and redirect to dashboard.html (route: Dashboard.dashboard)

public static void dashboard(String access_token) {
   /*
      ...some code
   */

    render(username);
}


public static void authenticate(String key) {
   /*
      ...some code
   */
     dashboard(access_token);
}

Here is my route file:

# Home page 
GET     /                   Application.index
POST    /dashboard      Dashboard.authenticate
GET     /dashboard      Dashboard.dashboard

, (String access_token) URL-, : http://localhost:9000/dashboard?access_token=0000 , , (String key), URL http://localhost:9000/dashboard?access_token&key=1234, - var auth(). , , , 100% , . Play 1.2.4 .

+3
3

!

... oops , jQuery Mobile, Play! jQuery.

, script:

$(document).bind("mobileinit", function(){
    $.mobile.ajaxEnabled = false;
    $.mobile.linkBindingEnabled = false;
    $.mobile.hashListeningEnabled = false;
    $.mobile.pushStateEnabled = false;
    $.mobile.changePage.defaults.changeHash = false;

})

- jQuery: http://jquerymobile.com/test/docs/api/globalconfig.html , script .hmtml :

<script src="jquery.js"></script>
<script src="custom-scripting.js"></script>
<script src="jquery-mobile.js"></script>
0

. ,

redirect("/dashboard?access_token="+access_token);

dashboard(access_token);
+1

Java . , :

# Home page 
GET     /                   Application.index
GET     /dashboard      Dashboard.dashboard
POST    /dashboard      Dashboard.authenticate

GET POST ( , , ).

- POST, , , "".

# Home page 
GET     /                    Application.index
GET     /dashboard           Dashboard.dashboard
POST    /dashboard/auth      Dashboard.authenticate
+1

All Articles