more code continued. . .

import org.apache.wicket.markup.html.WebPage;

public abstract class BasePage extends WebPage {

        private CustomFeedbackPanel feedback;

        public BasePage() {
             super();
             init();
        
       }        

       private void init() {

           add(new BookmarkablePageLink("PageLink", InfoPage.class));
           ContentBorder c = new ContentBorder("content");
           c.add( feedback = new CustomFeedbackPanel("feedback") );
           add( c );
       }
 
        protected ContentBorder getContentContainer(){
                return (ContentBorder)get("content");
        }

 
        @Override
        protected void onBeforeRender() {
                super.onBeforeRender();

                boolean showfeedback = 
getSession().getFeedbackMessages().size() != 0;          
                this.feedback.setVisible(showfeedback);
        }

        public abstract String getPageTitleKey();
        
        public abstract String getPageContextKey();

        protected HttpServletRequest getHttpRequest(){
                return ((WebRequest)getRequest()).getHttpServletRequest();
        }
        
        public abstract String getContentWidth();

        @Override
        public boolean isVersioned() {
                return false;
        }
                
        
        protected class ContentBorder extends Border{

                public ContentBorder(String id) {
                        super(id);
                        WebMarkupContainer wmc = new 
WebMarkupContainer("contentBorder");
                        wmc.add( new AttributeModifier("style", true, new 
Model("width:" +
getContentWidth() + ";") ) );
                        add( wmc );
                        wmc.add(getBodyContainer());
                }
                
        }

}






-- 
View this message in context: 
http://www.nabble.com/Button-onSubmit-not-called%2C-instead-page-reloads-tp22350921p22352441.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to