org.zkoss.zul
Class Iframe

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by 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.HtmlBasedComponent

Includes 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
protected  class Iframe.ExtraCtrl
          A utility class to implement HtmlBasedComponent.getExtraCtrl().
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
Iframe()
           
Iframe(java.lang.String src)
           
 
Method Summary
 java.lang.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  java.lang.String getEncodedSrc()
          Returns the encoded src (getSrc()).
 java.lang.Object getExtraCtrl()
           
 java.lang.String getName()
          Returns the frame name.
 java.lang.String getScrolling()
          Return the scroll bars.
 java.lang.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(java.lang.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(java.lang.String name)
          Sets the frame name.
 void setScrolling(java.lang.String scrolling)
          Define scroll bars
 void setSrc(java.lang.String src)
          Sets the src.
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
clone, focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, 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, setZIndexDirectly
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Iframe

public Iframe()

Iframe

public Iframe(java.lang.String src)
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.

Defalut: "auto"

Since:
3.0.4

getAlign

public java.lang.String getAlign()
Deprecated. as of release 6.0.0, use CSS instead.

Returns the alignment.

Default: null (use browser default).


setAlign

public void setAlign(java.lang.String align)
Deprecated. as of release 6.0.0, use CSS instead.

Sets the alignment: one of top, middle, bottom, left, right and center.


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 obscues 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 to isAutohide() 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 previous setContent(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 previous setSrc(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 by 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).


renderProperties

protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
                         throws java.io.IOException
Overrides:
renderProperties in class org.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(org.zkoss.zk.au.AuRequest, boolean), it also handles onURIChange.

Specified by:
service in interface org.zkoss.zk.ui.sys.ComponentCtrl
Overrides:
service in class org.zkoss.zk.ui.HtmlBasedComponent
Since:
5.0.0

isChildable

protected boolean isChildable()
Default: not childable.

Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent

getExtraCtrl

public java.lang.Object getExtraCtrl()
Specified by:
getExtraCtrl in interface org.zkoss.zk.ui.sys.ComponentCtrl
Overrides:
getExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent


Copyright © 2012. All Rights Reserved.