|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase org.apache.myfaces.custom.stylesheet.AbstractStylesheet org.apache.myfaces.custom.stylesheet.Stylesheet
public class Stylesheet
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
static java.lang.String |
DEFAULT_RENDERER_TYPE
|
Fields inherited from interface org.apache.myfaces.component.UserRoleAware |
---|
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR |
Constructor Summary | |
---|---|
Stylesheet()
|
Method Summary | |
---|---|
java.lang.String |
getEnabledOnUserRole()
If user is in given role, this component will be rendered normally. |
java.lang.String |
getFamily()
|
java.lang.String |
getMedia()
Define the target media of the styles: screen Intended for non-paged computer screens. tty Intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. tv Intended for television-type devices (low resolution, color, limited scrollability). projection Intended for projectors. handheld Intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth). print Intended for paged, opaque material and for documents viewed on screen in print preview mode. braille Intended for braille tactile feedback devices. aural Intended for speech synthesizers. all Suitable for all devices. Could be a comma separated list. |
java.lang.String |
getPath()
URL for CSS-file. |
java.lang.String |
getVisibleOnUserRole()
If user is in given role, this component will be rendered normally. |
boolean |
isFiltered()
Cause EL expressions in the stylesheet to be evaluated. |
boolean |
isInline()
Inline the stylesheet file content as in contrast to referencing it as a link. |
void |
restoreState(javax.faces.context.FacesContext facesContext,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext facesContext)
|
void |
setEnabledOnUserRole(java.lang.String enabledOnUserRole)
|
void |
setFiltered(boolean filtered)
|
void |
setInline(boolean inline)
|
void |
setMedia(java.lang.String media)
|
void |
setPath(java.lang.String path)
|
void |
setVisibleOnUserRole(java.lang.String visibleOnUserRole)
|
Methods inherited from class org.apache.myfaces.custom.stylesheet.AbstractStylesheet |
---|
isRendered |
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, 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 |
Field Detail |
---|
public static final java.lang.String COMPONENT_FAMILY
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String DEFAULT_RENDERER_TYPE
Constructor Detail |
---|
public Stylesheet()
Method Detail |
---|
public java.lang.String getFamily()
getFamily
in class javax.faces.component.UIComponent
public java.lang.String getPath()
AbstractStylesheet
If this path starts with a slash, then the webapp context path will be prepended to it. This makes it simple to reference stylesheets at an absolute path within the webapp. A value like "/styles/style.css" becomes "/webappname/styles/style.css".
If this path does not start with a slash, then it is output unaltered. This supports absolute urls ("http://host/path/style.css"). It also supports having css files relative to the current page ("style.css" or "styles/style.css") but this needs to be used with care as the standard JSF postback/internal-forward navigation style can cause browsers to use an inappropriate base url when resolving relative references.
getPath
in class AbstractStylesheet
public void setPath(java.lang.String path)
public boolean isInline()
AbstractStylesheet
The file referenced by the path attribute is loaded, and its content is written to the page wrapped in an <script> tag.
When this option is enabled, the path property must contain an absolute path within the current webapp. External urls ("http://*") and paths relative to the current page are not supported.
isInline
in class AbstractStylesheet
public void setInline(boolean inline)
public boolean isFiltered()
AbstractStylesheet
When true, any EL expression in the stylesheet will be evaluated and replaced by its string representation on the first access. The stylesheet will be processed only once. Every subsequent request will get a cached view.
isFiltered
in class AbstractStylesheet
public void setFiltered(boolean filtered)
public java.lang.String getMedia()
AbstractStylesheet
getMedia
in class AbstractStylesheet
public void setMedia(java.lang.String media)
public java.lang.String getEnabledOnUserRole()
UserRoleAware
public void setEnabledOnUserRole(java.lang.String enabledOnUserRole)
public java.lang.String getVisibleOnUserRole()
UserRoleAware
public void setVisibleOnUserRole(java.lang.String visibleOnUserRole)
public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
public void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |