Class Iframe
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.Iframe
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
public class Iframe extends org.zkoss.zk.ui.HtmlBasedComponentIncludes an inline frame.Unlike HTML iframe, this component doesn't have the frameborder property. Rather, use the CSS style to customize the border (like any other components).
To handle the onload event, you have to use the client-attribute namespace. Please refer to ZK Component Reference: iframe fore more information.
- Author:
- tomyeh
- See Also:
Include, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classIframe.ExtraCtrlA utility class to implementHtmlBasedComponent.getExtraCtrl().
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.zkoss.util.media.MediagetContent()Returns the content set bysetContent(org.zkoss.util.media.Media).protected java.lang.StringgetEncodedSrc()Returns the encoded src (getSrc()).java.lang.ObjectgetExtraCtrl()java.lang.StringgetName()Returns the frame name.java.lang.StringgetScrolling()Return the scroll bars.java.lang.StringgetSrc()Returns the src.booleanisAutohide()Returns whether to automatically hide this component if a popup or dropdown is overlapped with it.protected booleanisChildable()Default: not childable.protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)voidservice(org.zkoss.zk.au.AuRequest request, boolean everError)Processes an AU request.voidsetAutohide(boolean autohide)Sets whether to automatically hide this component if a popup or dropdown is overlapped with it.voidsetContent(org.zkoss.util.media.Media media)Sets the content directly.voidsetName(java.lang.String name)Sets the frame name.voidsetScrolling(java.lang.String scrolling)Define scroll barsvoidsetSrc(java.lang.String src)Sets the src.-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, clone, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getPropertyAccess, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Method Detail
-
setScrolling
public void setScrolling(java.lang.String scrolling)
Define scroll bars- Parameters:
scrolling- "true", "false", "yes" or "no" or "auto", "auto" by default If null, "auto" is assumed.- Since:
- 3.0.4
-
getScrolling
public java.lang.String getScrolling()
Return the scroll bars.Default: "auto"
- Since:
- 3.0.4
-
getName
public java.lang.String getName()
Returns the frame name.Default: null (use browser default).
-
setName
public void setName(java.lang.String name)
Sets the frame name.
-
isAutohide
public boolean isAutohide()
Returns whether to automatically hide this component if a popup or dropdown is overlapped with it.Default: false.
If an iframe contains PDF or other non-HTML resource, it is possible that it obscures the popup that shall be shown above it. To resolve this, you have to specify autohide="true" to this component, and specify the following in the page:
<?script content="zk.useStack='auto';"?>Please refer to Stackup and Shadow for more information.
-
setAutohide
public void setAutohide(boolean autohide)
Sets whether to automatically hide this component if a popup or dropdown is overlapped with it. Refer toisAutohide()for more information
-
getSrc
public java.lang.String getSrc()
Returns the src.Default: null.
-
setSrc
public void setSrc(java.lang.String src)
Sets the src.Calling this method implies setContent(null). In other words, the last invocation of
setSrc(java.lang.String)overrides the previoussetContent(org.zkoss.util.media.Media), if any.- Parameters:
src- the source URL. If null or empty, nothing is included.- See Also:
setContent(org.zkoss.util.media.Media)
-
getEncodedSrc
protected java.lang.String getEncodedSrc()
Returns the encoded src (getSrc()).
-
setContent
public void setContent(org.zkoss.util.media.Media media)
Sets the content directly. Default: null.Calling this method implies setSrc(null). In other words, the last invocation of
setContent(org.zkoss.util.media.Media)overrides the previoussetSrc(java.lang.String), if any.- Parameters:
media- the media for this inline frame.- See Also:
setSrc(java.lang.String)
-
getContent
public org.zkoss.util.media.Media getContent()
Returns the content set bysetContent(org.zkoss.util.media.Media).Note: it won't fetch what is set thru by
setSrc(java.lang.String). It simply returns what is passed tosetContent(org.zkoss.util.media.Media).
-
renderProperties
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException- Overrides:
renderPropertiesin classorg.zkoss.zk.ui.HtmlBasedComponent- Throws:
java.io.IOException
-
service
public void service(org.zkoss.zk.au.AuRequest request, boolean everError)Processes an AU request.Default: in addition to what are handled by
HtmlBasedComponent.service(AuRequest, boolean), it also handles onURIChange.- Specified by:
servicein interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
servicein classorg.zkoss.zk.ui.HtmlBasedComponent- Since:
- 5.0.0
-
isChildable
protected boolean isChildable()
Default: not childable.- Overrides:
isChildablein classorg.zkoss.zk.ui.AbstractComponent
-
getExtraCtrl
public java.lang.Object getExtraCtrl()
- Specified by:
getExtraCtrlin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
getExtraCtrlin classorg.zkoss.zk.ui.HtmlBasedComponent
-
-