Class Iframe
- All Implemented Interfaces:
Serializable,Cloneable,Component,Scope,ComponentCtrl
- Direct Known Subclasses:
Jasperreport
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA utility class to implementHtmlBasedComponent.getExtraCtrl().Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo -
Field Summary
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the content set bysetContent(org.zkoss.util.media.Media).protected StringReturns the encoded src (getSrc()).Returns the client control for this component.getName()Returns the frame name.Return the scroll bars.getSrc()Returns the src.booleanReturns whether to automatically hide this component if a popup or dropdown is overlapped with it.protected booleanDefault: not childable.protected voidrenderProperties(ContentRenderer renderer) Renders the content of this component, excluding the enclosing tags and children.voidProcesses an AU request.voidsetAutohide(boolean autohide) Sets whether to automatically hide this component if a popup or dropdown is overlapped with it.voidsetContent(Media media) Sets the content directly.voidSets the frame name.voidsetScrolling(String scrolling) Define scroll barsvoidSets 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, getSkeleton, 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, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods 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, getStubonlyDescendants, 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, setStubonlyDescendants, 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
-
Constructor Details
-
Iframe
public Iframe() -
Iframe
-
-
Method Details
-
setScrolling
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
Return the scroll bars.Default: "auto"
- Since:
- 3.0.4
-
getName
Returns the frame name.Default: null (use browser default).
-
setName
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
Returns the src.Default: null.
-
setSrc
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:
-
getEncodedSrc
Returns the encoded src (getSrc()). -
setContent
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:
-
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
Description copied from class:HtmlBasedComponentRenders the content of this component, excluding the enclosing tags and children.- Overrides:
renderPropertiesin classHtmlBasedComponent- Throws:
IOException
-
service
Processes an AU request.Default: in addition to what are handled by
HtmlBasedComponent.service(AuRequest, boolean), it also handles onURIChange.- Specified by:
servicein interfaceComponentCtrl- Overrides:
servicein classHtmlBasedComponenteverError- whether any error ever occurred before processing this request.- Since:
- 5.0.0
- See Also:
-
isChildable
protected boolean isChildable()Default: not childable.- Overrides:
isChildablein classAbstractComponent
-
getExtraCtrl
Description copied from class:HtmlBasedComponentReturns the client control for this component. It is used only by component developers.Default: creates an instance of
HtmlBasedComponent.ExtraCtrl.- Specified by:
getExtraCtrlin interfaceComponentCtrl- Overrides:
getExtraCtrlin classHtmlBasedComponent- Returns:
- null if no special handling required. If the component
requires some special controls, it could return an object that
implements one or several interfaces in the org.zkoss.zk.ui.ext.render
package.
For example,
Cropper. - See Also:
-