Class CmsSubAppIFrameCommunicationBehavior

java.lang.Object
org.apache.wicket.behavior.Behavior
org.hippoecm.frontend.plugins.standards.perspective.CmsSubAppIFrameCommunicationBehavior
All Implemented Interfaces:
Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

public class CmsSubAppIFrameCommunicationBehavior extends org.apache.wicket.behavior.Behavior

Add this Behavior to a Perspective to add an iframe that communicates with the cms using the navigation application communication library.

This behavior:

  • adds an iframe element with iFrameElementId and iFrameElementSrc
  • adds javascript to header ( after the navapp-communication script has loaded ) that:
    • Connects to the iframe
    • Provides an implementation of the Parent API

    The application running inside the iframe is responsible for connecting to the cms iframe.

    See Also:
    • Constructor Summary

      Constructors
      Constructor
      Description
      CmsSubAppIFrameCommunicationBehavior(String iFrameElementId, String iFrameElementSrc)
       
    • Method Summary

      Modifier and Type
      Method
      Description
      void
      bind(org.apache.wicket.Component component)
       
      void
      renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
       

      Methods inherited from class org.apache.wicket.behavior.Behavior

      afterRender, beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind

      Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Details

      • CmsSubAppIFrameCommunicationBehavior

        public CmsSubAppIFrameCommunicationBehavior(String iFrameElementId, String iFrameElementSrc)
        Parameters:
        iFrameElementId - Non null id attribute of the iframe element ( should not contain spaces )
        iFrameElementSrc - Non null src attribute of the iframe element
    • Method Details

      • bind

        public void bind(org.apache.wicket.Component component)
        Overrides:
        bind in class org.apache.wicket.behavior.Behavior
      • renderHead

        public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
        Specified by:
        renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
        Overrides:
        renderHead in class org.apache.wicket.behavior.Behavior