On Fri, Mar 25, 2011 at 9:03 AM, Juergen Donnerstag <
juergen.donners...@gmail.com> wrote:

> Please bear in mind both approaches serve different purposes:
>
> IMarkupResourceStreamProvider: provide a resource stream no matter
> where it come from. The stream gets cached and everything, like a
> normal markup file => is invoked only once
>
Yes, I also realized this difference after I sent my mail yesterday.

>
> Component.get/setMarkup: allows you to provide your own Component
> markup irrespective of the parent markup. Usually the markup is
> determined by the parent container (getParent.getMarkup(this)), but
> you can provide whatever you want. The render process will skip the
> component markup in the parent markup. Thus getMarkup is called
> whenever the Page/Ajax is rendered and no markup has been set
> (setMarkup).
>
> getAssociatedMarkup() is used instead of getMarkup for Panels etc..
> Subclassung getMarkup for Panels will not work. Subclass
> getAssociatedMarkup() instead.  (getMarkup can be used for Pages
> though).
>
> -Juergen
>

Thanks!

>
> On Thu, Mar 24, 2011 at 11:09 PM, Juergen Donnerstag
> <juergen.donners...@gmail.com> wrote:
> > yes, makes sense. Feel free to commit the change.
> >
> > On Thu, Mar 24, 2011 at 10:38 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
> >> +       public static Markup get(final String markup)
> >>
> >> cool!
> >> this makes IMarkupResourceStreamProvider a bit redudant
> >> What about renaming the method to .of(String) so it looks like
> Model.of() ?
> >>
> >> On Thu, Mar 24, 2011 at 8:40 PM, <jdonners...@apache.org> wrote:
> >>
> >>> Author: jdonnerstag
> >>> Date: Thu Mar 24 19:40:52 2011
> >>> New Revision: 1085095
> >
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to