session handling for request object in wicket framework

后端 未结 2 336
梦毁少年i
梦毁少年i 2021-01-26 08:06

1) i have added an element in request object given below, i need to get/read this in my webpage, how can i do it?

 wicket:id=\"submi         


        
相关标签:
2条回答
  • 2021-01-26 08:32

    I am not sure I have fully understood your questions.

    But to make it short, if you want to get the value stored in your request object, you'll need to make the model of your input map to this value (by using HiddenField wicket internal class).

    If you want to track your user, the best thing to do is looking around for a cookie set on the client side that'll allow you to manage its visits.

    Please refine your question if you want a more precise answer...

    0 讨论(0)
  • 2021-01-26 08:39

    1) use HiddenField

    2) use a custom WebSession object:

    public class MySession extends WebSession{
        public Mysession(Request request){super(request);}
        private boolean completedRegistration;
    
        public boolean hasCompletedRegistration() {
            return completedRegistration;
        }
    
        public void setCompletedRegistration(boolean completedRegistration) {
            this.completedRegistration = completedRegistration;
        }
    }
    
    0 讨论(0)
提交回复
热议问题