public abstract class AbstractJSFView extends Object implements DMXView
Base class for implementing views based on JSF technology. This class provides basic functionality to use view structure provided in .xhtml files, as with ordinary JSF applications. JSF views are used consistently as any other view implementation within DEMUX Framework.
Basic assumption of this class is that each DMXView
has an associated .xhtml file which contains actual view
UI definition. Further, each view can contain an HTML element which can be used as a container to insert child view at
that point.
Modifier and Type | Field and Description |
---|---|
protected String |
viewId
Current view ID.
|
protected String |
viewUrl
URL of view XHTML file.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractJSFView(String viewId,
String viewUrl)
Creates new instance of the view.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildView(DMXView child)
Adds child view to this view.
|
Set<String> |
getViewDataIds()
This implementation always returns an empty set.
|
String |
getViewId()
Returns this view ID.
|
Object |
getViewUI()
Return URL string for this view's XHTML file.
|
void |
updateFromModel(Map<String,Object> dataMap)
This implementation does nothing, since JSF runtime takes care of view rendering.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
constructUI, getParentViewId, render, setViewActive, viewPlacementConstraint
protected String viewId
protected String viewUrl
protected AbstractJSFView(String viewId, String viewUrl)
viewId
must be unique within applicationviewUrl
must be valid URL for a resource inside jar (ie., in form /foo/bar.xhtml
viewId
- view IDviewUrl
- view URLpublic final void addChildView(DMXView child)
DMXView.viewPlacementConstraint()
method.addChildView
in interface DMXView
child
- child view to addDMXView.addChildView(com.vektorsoft.demux.core.mva.DMXView)
public final Set<String> getViewDataIds()
getViewDataIds
in interface DMXView
DMXView.getViewDataIds()
public final void updateFromModel(Map<String,Object> dataMap)
updateFromModel
in interface DMXView
dataMap
- data mapDMXView.updateFromModel(java.util.Map)
public final Object getViewUI()
Copyright © 2012-2014 Vektor Software. All Rights Reserved.