Class LiveEditView<T extends LiveEditPopupEditDialog>
java.lang.Object
de.hybris.platform.cmscockpit.components.liveedit.LiveEditView<T>
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:
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
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLiveEditView(DefaultLiveEditViewModel model, org.zkoss.zul.Div welcomePanel) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds all required events handling i.e: user special events init events invalidate eventprotected StringextractRequestPath(String longUrl) Extracts request path from long URL (request path with query search)org.zkoss.zul.IframeReturns content frame component - for access it from outsideprotected org.zkoss.zk.ui.event.EventListenerReturns event listener for handling init eventsprotected org.zkoss.zk.ui.event.EventListenerReturns event listener for handling invalidate eventsgetModel()protected org.zkoss.zk.ui.event.EventListenerReturns event listener for handling user eventsorg.zkoss.zk.ui.HtmlBasedComponentReturns the ZK component of the site preview.protected org.zkoss.zul.DivvoidInitialize live edit view (i.e.protected org.zkoss.zul.IframeInitialize live edit content iframeprotected org.zkoss.zul.DivInitialize the main view component for the live editprotected org.zkoss.zk.ui.HtmlBasedComponentloadWelcomePanel(org.zkoss.zk.ui.HtmlBasedComponent parent) Loads welcome panel if anyprotected voidprotected voidRefreshes welcome panel when it is availablevoidsetPopupEditorDialog(T popupEditorDialog) voidsetWelcomePanel(org.zkoss.zul.Div welcomePanel) voidupdate()Performs general update.voidupdateItem(TypedObject item, Set<PropertyDescriptor> modifiedProperties, Object reason) Performs update according to given item modifications
-
Field Details
-
ON_INIT_EVENT
- See Also:
-
CALLBACK_EVENT
- See Also:
-
URL_CHANGE_EVENT
- See Also:
-
LIVE_EDIT_BROWSER_SCLASS
- See Also:
-
ON_INVALIDATE_LATER_EVENT
- See Also:
-
-
Constructor Details
-
LiveEditView
-
LiveEditView
-
-
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
-
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 thenLiveEditViewModel.getCurrentPreviewData()returnnull- 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
Performs update according to given item modifications- Parameters:
item- modified itemmodifiedProperties- modified properties of the item
-
extractRequestPath
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
-
setPopupEditorDialog
-