com.sun.rave.web.ui.component
Class MarkupBase

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.sun.rave.web.ui.component.MarkupBase
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
Markup

public abstract class MarkupBase
extends javax.faces.component.UIComponentBase

Use the ui:markup tag to insert any type of XML markup in the rendered HTML page. The ui:markup tag allows you to insert HTML elements into the JSP page where HTML is not permitted inside a JSF tag. 

Configuring the markup tag

Use the tag attribute to specify the type of HTML element to insert.  For instance, to insert a <p> tag, set the attribute to tag="p" in the ui:markup tag.  Note that you do not include the angle brackets.

If the HTML element you are inserting is a singleton element, you must specify the singleton attribute.  The singleton attribute causes the trailing /> to be generated in the rendered HTML. For example, the  <br> element is a singleton element, which must be rendered as <br /> to be XHTML compliant.

If you want to specify additional HTML attributes for the element you are inserting, use the extraAttributes attribute.

HTML Elements and Layout

The rendered HTML page includes the HTML element that was specified in the ui:markup tag's tag attribute, along with any HTML attributes that were included in the extraAttributes attribute.

Theme Identifiers

None.

Client Side Javascript Functions 

None.

Examples

Example 1:  Insert a singleton element

 <ui:markup tag="br" singleton="true" />

This generates <br />.

Example 2: Insert a <div> element with a style attribute

    <ui:markup tag="div" style="color:blue" />

This generates <div style="color:blue" >

Example 3: Insert a <h3> with HTML attributes

    <ui:markup tag="h3" extraAttributes="onclick='alert(&quot;foobar&quot;);'" >
        <ui:staticText text="Example" />
    </ui:markup>
This generates a level 3 head titled Example that will display the alert with "foobar" in it when clicked.

Auto-generated component class. Do NOT modify; all changes will be lost!


Constructor Summary
MarkupBase()
          Construct a new MarkupBase.
 
Method Summary
 java.lang.String getExtraAttributes()
          Add the rest of the attribute name="value" type pairs inside this attribute.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getStyle()
          CSS style(s) to be applied when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied when this component is rendered.
 java.lang.String getTag()
          Name of the HTML element to render.
 boolean isSingleton()
          Flag indicating that tag is a singleton tag and that it should end with a trailing /
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setExtraAttributes(java.lang.String extraAttributes)
          Add the rest of the attribute name="value" type pairs inside this attribute.
 void setSingleton(boolean singleton)
          Flag indicating that tag is a singleton tag and that it should end with a trailing /
 void setStyle(java.lang.String style)
          CSS style(s) to be applied when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied when this component is rendered.
 void setTag(java.lang.String tag)
          Name of the HTML element to render.
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkupBase

public MarkupBase()

Construct a new MarkupBase.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.


getExtraAttributes

public java.lang.String getExtraAttributes()

Add the rest of the attribute name="value" type pairs inside this attribute. The inserted attributes will need to be escaped.


setExtraAttributes

public void setExtraAttributes(java.lang.String extraAttributes)

Add the rest of the attribute name="value" type pairs inside this attribute. The inserted attributes will need to be escaped.

See Also:
getExtraAttributes()

isSingleton

public boolean isSingleton()

Flag indicating that tag is a singleton tag and that it should end with a trailing /


setSingleton

public void setSingleton(boolean singleton)

Flag indicating that tag is a singleton tag and that it should end with a trailing /

See Also:
isSingleton()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied when this component is rendered.

See Also:
getStyleClass()

getTag

public java.lang.String getTag()

Name of the HTML element to render.


setTag

public void setTag(java.lang.String tag)

Name of the HTML element to render.

See Also:
getTag()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.


saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.