java.lang.Object
de.hybris.platform.cmscockpit.components.liveedit.LiveEditView<T>

public class LiveEditView<T extends LiveEditPopupEditDialog> extends Object
Controller of (live edit) preview of a site.

Note:
We using this component for displaying a preview of particular web application within cmscockpit in following modes:

  • displaying preview of particular page in WCMS Page perspective
  • displaying live edit session in Live Edit perspective
  • Field Details

  • Constructor Details

  • Method Details

    • initialize

      public void initialize()
      Initialize live edit view (i.e. creates content frame, loads welcome panel - if any, send init event)

      Note:
      Should be called after instantiation.

    • initializeViewComponent

      protected org.zkoss.zul.Div initializeViewComponent()
      Initialize the main view component for the live edit
    • initializeContentFrame

      protected org.zkoss.zul.Iframe initializeContentFrame()
      Initialize live edit content iframe
    • addEventListeners

      protected void addEventListeners()
      Adds all required events handling i.e:
      • user special events
      • init events
      • invalidate event
      • getViewComponent

        public org.zkoss.zk.ui.HtmlBasedComponent getViewComponent()
        Returns the ZK component of the site preview.
        Returns:
        ZK component of the site preview
      • getContentFrame

        public org.zkoss.zul.Iframe getContentFrame()
        Returns content frame component - for access it from outside
        Returns:
        content frame component
      • getModel

        public DefaultLiveEditViewModel getModel()
      • setWelcomePanel

        public void setWelcomePanel(org.zkoss.zul.Div welcomePanel)
      • getIniEventListener

        protected org.zkoss.zk.ui.event.EventListener getIniEventListener()
        Returns event listener for handling init events

        Note:
        This is used for proper initialize live edit view - within preview mode we to update view in order to make content visible. When we are within preview mode then LiveEditViewModel.getCurrentPreviewData() return null

        Returns:
        instance of EventListener
        See Also:
      • getInvalidateListener

        protected org.zkoss.zk.ui.event.EventListener getInvalidateListener()
        Returns event listener for handling invalidate events

        Note:
        This is used for invalidate frame content

        Returns:
        instance of EventListener
        See Also:
      • getUserEventListener

        protected org.zkoss.zk.ui.event.EventListener getUserEventListener()
        Returns event listener for handling user events

        Note:
        This is used for handling user events such like:

        • displaying popup dialog with proper content editors
        • reacts when user change URL within content frame (this is used for keeping cmscockpit up-to-date with current URL from content frame)
        Returns:
        instance of EventListener
      • refreshWelcomePanel

        protected void refreshWelcomePanel()
        Refreshes welcome panel when it is available

        Note:
        This is disjoint with content frame i.e. when we displaying welcome page we also hide content frame at once and contrarywise

      • refreshContentFrame

        protected void refreshContentFrame()
      • update

        public void update()
        Performs general update.
      • updateItem

        public void updateItem(TypedObject item, Set<PropertyDescriptor> modifiedProperties, Object reason)
        Performs update according to given item modifications
        Parameters:
        item - modified item
        modifiedProperties - modified properties of the item
      • extractRequestPath

        protected String extractRequestPath(String longUrl)
        Extracts request path from long URL (request path with query search)
        Parameters:
        longUrl - request path with query search
        Returns:
        extracted request path
      • loadWelcomePanel

        protected org.zkoss.zk.ui.HtmlBasedComponent loadWelcomePanel(org.zkoss.zk.ui.HtmlBasedComponent parent)
        Loads welcome panel if any
        Parameters:
        parent - parent component
        Returns:
        current welcome panel component
      • getWelcomePanel

        protected org.zkoss.zul.Div getWelcomePanel()
        Returns:
        the welcomePanel
      • getPopupEditorDialog

        public LiveEditPopupEditDialog getPopupEditorDialog()
      • setPopupEditorDialog

        public void setPopupEditorDialog(T popupEditorDialog)