Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

see Border javadoc as well

Component rendering

We used to have different entry points to render a Page, a Component for a web request and a Component for an AJAX request. That is history. Whenever you want to render a component, simply call component.render().

You'll notice that Component.render(MarkupStream) already existed and thus in most cases (e.g. IComponentResolvers implementations) you simply need to remove the markupStream parameter.

The markup fragment which is still needed to render a Component will be retrieved via Component.getMarkup(). Most components will ask their parent container to find it via MarkupContainer.getMarkup(Component child). IMarkupFragment is a new concept introduced. A markup fragment is what is says: a fragment of markup taken from a larger resource (file). Please see the javadoc on when it is better to subclass getMarkup() and when getMarkup(Component).

You may know that until now you very carefully had to forward the markup stream to the next suitable position. That has been simplified as well. Every component will use its own markup stream and the parent container is responsible to position it while rendering its child components.

On the same topic: onRender(MarkupStream) has been changed to onRender(); no more MarkupStream. You can get for every component once you called render() via getMarkupStream().