In wicket 1.2.6, I have the following and  render fine.

        private static class RequiredLabel extends Label
        {
                private static final long serialVersionUID = 1L;
                
                private boolean required;
                
                public RequiredLabel(String id, FormComponent fc)
                {
                        super(id, fc);
                        this.required = fc.isRequired();
                }

                @Override 
                protected void onBeforeRender()
                {
                        super.onBeforeRender();
                        if (this.required) 
                                getResponse().write("*");
                }
        }

After migrated to wicket 1.3 beta, I overrided the method as following:

                @Override 
                protected void onBeforeRender()
                {
                        if (this.required) 
                                getResponse().write("*");
                        super.onBeforeRender();
                }

The red * still render, but at the very top of the page.  A similar problem
for onAfterRender() is that also render, but at the very bottom of the page.

Thanks for your help!

rtow
-- 
View this message in context: 
http://www.nabble.com/How-to-migrate-onAfterRender-onBeforeRender-from-wicket-1.2.6-to-1.3-tf4780695.html#a13677169
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to