0

( 1.) I have a Login page and a Index page in Tapestry. I check the user name and password and direct the page into index page using following method.

Object onSuccess(){
       return Index.class;
}

But if i use the simple URL directly to index page still it goes there. how to make it only accessible though Login page.

( 2.) how to pass a parameter between pages?. If i can pass user_id or generated key between pagers then i can give an error if some one loads the page without that key. Any suggestions ?

4

1 に答える 1

0

セッション管理を行う必要があります。

または、他の解決策として、パラメーター user_id を Login から Index に渡すことができます。

Login onPassivate() メソッドからこのパラメーターを渡し、Index でその名前のパラメーターを定義し、onActivate() でこの値を取得します。

于 2012-10-17T09:27:21.910 に答える