Class NgApplet

java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
com.saperion.ngc.ngapplet.NgApplet
All Implemented Interfaces:
Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl
Direct Known Subclasses:
MailAppletImpl

public class NgApplet extends org.zkoss.zk.ui.HtmlBasedComponent
The NgApplet embeds an applet by using the OBJECT tag instead of the deprecated APPLET tag.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

    org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl

    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

    AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
     
    void
    invoke(String function)
    Invokes the function of the applet running at the client.
    void
    invoke(String function, String argument)
    Invokes the function of the applet running at the client with one argument.
    void
    invoke(String function, String[] arguments)
    Invokes the function of the applet running at the client with variable number argument.
    boolean
    Checks if invoke errors will be ignored.
    void
    notifyWhenReady(int timeout, int attempts)
    This method can be called after the applet was attached to a page.
    protected void
    renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
    void
    setArchive(String archive)
    Sets the archive parameter.
    void
    Sets the code parameter.
    void
    setCodebase(String codebase)
    Sets the codebase.
    void
    setIgnoreInvokeErrors(boolean ignoreInvokeErrors)
    If set to true, all errors that occur when a method of the applet is called by JavaScript will be ignored.
    void
    setJsonParameters(String jsonParameters)
    Sets the json parameters.
    setParam(String name, String value)
    Sets the parameter with the specified name.
    void
    Sets the parameters.
    void
    Sets the parameters.

    Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent

    addSclass, clone, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getPropertyAccess, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, 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, addAnnotation, addCallback, 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, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, 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, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, 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, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, 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, willSerialize

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl

    invalidatePartial
  • Constructor Details

    • NgApplet

      public NgApplet()
  • Method Details

    • getCodebase

      public String getCodebase()
      Returns:
      the applet's codebase parameter
    • setCodebase

      public void setCodebase(String codebase)
      Sets the codebase.
      Parameters:
      codebase - the new codebase
    • getCode

      public String getCode()
      Returns:
      the code parameter
    • setCode

      public void setCode(String code)
      Sets the code parameter.
      Parameters:
      code - the new code
    • getArchive

      public String getArchive()
      Returns:
      the applet's archive parameter
    • setArchive

      public void setArchive(String archive)
      Sets the archive parameter.
      Parameters:
      archive - the new archive
    • getParameters

      public Properties getParameters()
      Returns:
      the parameters
    • setParameters

      public void setParameters(Map<String,String> params)
      Sets the parameters.
      Parameters:
      params - the params
    • setParameters

      public void setParameters(Properties params)
      Sets the parameters.
      Parameters:
      params - the new parameters
    • setJsonParameters

      public void setJsonParameters(String jsonParameters)
      Sets the json parameters.
      Parameters:
      jsonParameters - a json string containing the parameters
    • setParam

      public String setParam(String name, String value)
      Sets the parameter with the specified name.
      Parameters:
      name - the name
      value - the value
      Returns:
      the previous value of the parameter or null if it did not yet exist
    • isIgnoreInvokeErrors

      public boolean isIgnoreInvokeErrors()
      Checks if invoke errors will be ignored.
      Returns:
      true, if invoke errors will be ignored
    • setIgnoreInvokeErrors

      public void setIgnoreInvokeErrors(boolean ignoreInvokeErrors)
      If set to true, all errors that occur when a method of the applet is called by JavaScript will be ignored.
      Parameters:
      ignoreInvokeErrors - whether to ignore invoke errors or not
    • renderProperties

      protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
      Overrides:
      renderProperties in class org.zkoss.zk.ui.HtmlBasedComponent
      Throws:
      IOException
      See Also:
      • HtmlBasedComponent.renderProperties(org.zkoss.zk.ui.sys.ContentRenderer)
    • invoke

      public void invoke(String function)
      Invokes the function of the applet running at the client.
      Parameters:
      function - name of the function
    • invoke

      public void invoke(String function, String argument)
      Invokes the function of the applet running at the client with one argument.
      Parameters:
      function - name of the function
      argument - the argument
    • invoke

      public void invoke(String function, String[] arguments)
      Invokes the function of the applet running at the client with variable number argument.
      Parameters:
      function - name of the function
      arguments - the arguments
    • notifyWhenReady

      public void notifyWhenReady(int timeout, int attempts)
      This method can be called after the applet was attached to a page. If called, a JavaScript method is invoked that will try for attempts times to check if the applet is ready. A delay of timeout milliseconds will be used between two attempts. If the applet is ready, an onAppletReady event will be fired.
      Parameters:
      timeout - timeout between attempts
      attempts - number of attempts