seee IComponentBorder

On Nov 10, 2007 1:55 AM, rtow <[EMAIL PROTECTED]> wrote:

>
> Big thanks!  The onComponentTag(tag) is the perfect replacement for
> onBeforeRender().  Do you have suggestion for onAfterRender()?  I
> explained
> that I also have a problem to render onAfterRender() in previous mail.
>
> rtow
>
>
>
> Johan Compagner wrote:
> >
> > hmm thats the first case that i see that used the onBeforeRender like
> > that.
> > But what you want is a border around the component see IComponentBorder
> > or override the onComponentTag(tag);
> > that is also called right before the tag is rendered.
> >
> > johan
> >
> >
> >
> > On Nov 10, 2007 12:35 AM, rtow <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> 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 <http://nabble.com/><http://nabble.com/>
> >> .
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-migrate-onAfterRender-onBeforeRender-from-wicket-1.2.6-to-1.3-tf4780695.html#a13678135
>  Sent from the Wicket - User mailing list archive at 
> Nabble.com<http://nabble.com/>
> .
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to