session handling for request object in wicket framework

后端 未结 2 337
梦毁少年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: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;
        }
    }
    

提交回复
热议问题