No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Server-Side Rendering to the DOM
The DOM is the language-independent model for representing and interacting with objects in HTML and XML documents. Aura automatically renders your components so you don't have to know anything more about rendering unless you need to customize the default rendering behavior for a component.
Creating a Java Server-Side Renderer
If you've exhausted the alternatives, including a client-side renderer, create a server-side renderer in Java by implementing the org.auraframework.def.Renderer interface. The interface contains one method:
1swfobject.registerObject("clippy.codeblock-0", "9");public void render(BaseComponent<?,?> component, Appendable appendable)
2 throws IOException, QuickFixException;The component argument is the instance to render. The appendable argument is the output buffer.
The class that implements the interface must have a no-argument constructor. The class is instantiated as a singleton, so no state should be stored in it.
Wiring Up a Server-Side Renderer
To wire up a server-side renderer for a component, add a renderer system attribute in <aura:component>. For example:
1swfobject.registerObject("clippy.codeblock-1", "9");<aura:component renderer="java://org.auraframework.demo.notes.renderers.ReallyNeedAServerSideRenderer">
2 ...
3</aura:component>The framework behavior is undefined if you add a server-side renderer that also includes a client-side renderer. We recommend that you use one or the other.