|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.render.Renderer
org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer
org.apache.myfaces.custom.dialog.ModalDialogRenderer
public class ModalDialogRenderer
Renderer for the s:modalDialog component.
This component works in one of two different ways:
The Dojo library uses css tricks to make the DIV component act like a modal window.
Field Summary | |
---|---|
static java.lang.String |
DIV_ID_PREFIX
|
static java.lang.String |
RENDERER_TYPE
|
Constructor Summary | |
---|---|
ModalDialogRenderer()
|
Method Summary | |
---|---|
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Writes a DIV opening tag, plus javascript to make sure that the Dojo library is initialised. |
void |
encodeChildren(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
Override normal "encodeChildren" method to render the necessary dynamic parts of this component as well as the children. |
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Writes a DIV closing tag, plus javascript to declare the global "dialogVar" object that can be invoked to show the modal dialog. |
boolean |
getRendersChildren()
|
protected boolean |
isRenderCloseButton(ModalDialog dlg)
|
Methods inherited from class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer |
---|
getActionUrl, getChildCount, getChildren, getClientId, renderId, shouldRenderId, toUri |
Methods inherited from class javax.faces.render.Renderer |
---|
convertClientId, decode, getConvertedValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RENDERER_TYPE
public static final java.lang.String DIV_ID_PREFIX
Constructor Detail |
---|
public ModalDialogRenderer()
Method Detail |
---|
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeBegin
in class javax.faces.render.Renderer
java.io.IOException
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeEnd
in class javax.faces.render.Renderer
java.io.IOException
public boolean getRendersChildren()
getRendersChildren
in class javax.faces.render.Renderer
public void encodeChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent) throws java.io.IOException
If the user specified a titleBar facet, then that is rendered as the "window decoration" for the popup window. Otherwise if the user specified a dialogTitle, then a standard "window decoration" is rendered.
Then if the user did NOT specify a content page to be loaded into the popup, then the rest of the child components are rendered as normal.
But if the user DID specify a content page to be loaded, then an empty IFrame is rendered (javascript will be used to load it later), and the rendering of the child components is delayed until the encodeEnd method. TODO: why is child component rendering delayed?
encodeChildren
in class javax.faces.render.Renderer
java.io.IOException
Renderer.encodeChildren(javax.faces.context.FacesContext,
javax.faces.component.UIComponent)
protected boolean isRenderCloseButton(ModalDialog dlg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |