public class Iframe
extends org.zkoss.zk.ui.HtmlBasedComponent
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.
Include,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
Iframe.ExtraCtrl
A utility class to implement
HtmlBasedComponent.getExtraCtrl(). |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlign()
Deprecated.
as of release 6.0.0, use CSS instead.
|
org.zkoss.util.media.Media |
getContent()
Returns the content set by
setContent(org.zkoss.util.media.Media). |
protected String |
getEncodedSrc()
Returns the encoded src (
getSrc()). |
Object |
getExtraCtrl() |
String |
getName()
Returns the frame name.
|
String |
getScrolling()
Return the scroll bars.
|
String |
getSrc()
Returns the src.
|
boolean |
isAutohide()
Returns whether to automatically hide this component if
a popup or dropdown is overlapped with it.
|
protected boolean |
isChildable()
Default: not childable.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Processes an AU request.
|
void |
setAlign(String align)
Deprecated.
as of release 6.0.0, use CSS instead.
|
void |
setAutohide(boolean autohide)
Sets whether to automatically hide this component if
a popup or dropdown is overlapped with it.
|
void |
setContent(org.zkoss.util.media.Media media)
Sets the content directly.
|
void |
setName(String name)
Sets the frame name.
|
void |
setScrolling(String scrolling)
Define scroll bars
|
void |
setSrc(String src)
Sets the src.
|
clone, focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getPropertyAccess, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowRoots, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, 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, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializepublic Iframe()
public Iframe(String src)
public void setScrolling(String scrolling)
scrolling - "true", "false", "yes" or "no" or "auto", "auto" by default
If null, "auto" is assumed.public String getScrolling()
Default: "auto"
public String getAlign()
Default: null (use browser default).
public void setAlign(String align)
public String getName()
Default: null (use browser default).
public void setName(String name)
public boolean isAutohide()
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.
public void setAutohide(boolean autohide)
isAutohide() for more informationpublic String getSrc()
Default: null.
public void setSrc(String src)
Calling this method implies setContent(null).
In other words, the last invocation of setSrc(java.lang.String) overrides
the previous setContent(org.zkoss.util.media.Media), if any.
src - the source URL. If null or empty, nothing is included.setContent(org.zkoss.util.media.Media)public void setContent(org.zkoss.util.media.Media media)
Calling this method implies setSrc(null).
In other words, the last invocation of setContent(org.zkoss.util.media.Media) overrides
the previous setSrc(java.lang.String), if any.
media - the media for this inline frame.setSrc(java.lang.String)public org.zkoss.util.media.Media getContent()
setContent(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 to setContent(org.zkoss.util.media.Media).
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zk.ui.HtmlBasedComponentIOExceptionpublic void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Default: in addition to what are handled by HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean),
it also handles onURIChange.
service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentprotected boolean isChildable()
isChildable in class org.zkoss.zk.ui.AbstractComponentpublic Object getExtraCtrl()
getExtraCtrl in interface org.zkoss.zk.ui.sys.ComponentCtrlgetExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponentCopyright © 2015. All rights reserved.