|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vinay.ui.vinui.fw.core.Page
Represents a logical page. An application can be divided into several
pages each of which hosts a set of controls. Navigation can be defined
between pages. A default page exists for each application which is rendered
initially. Each page has an associated layout manager which can be set before
adding the controls.
A page also has a context available. Certain control properties e.g. text
can be bound to the page context attributes. Modification of context attributes
result in control UI changes.
The page context attributes can be optionally
mapped to the application context attributes. In this case, the control properties
are indirectly bound to the application context(or its attributes). This can
be useful in cases where an action on a control in a page can affect a
UI element belonging to a different page.
Constructor Summary | |
Page(java.lang.String name)
Page Constructor |
Method Summary | |
protected void |
addControl(Control control)
Adds a UI Control to the page. |
protected void |
addControl(Control control,
int position)
Adds a UI Control to the page. |
protected void |
addControlToGroup(Control control,
UIGroup group)
Add a UI control to a valid UIGroup within this page |
protected Control |
getControl(long id)
Returns a Control with a given id |
protected java.util.Map |
getControls()
Returns the map of controls hosted in this page |
long |
getId()
|
protected Layout |
getLayout()
|
java.lang.String |
getName()
|
protected Context |
getPageContext()
Returns the context object of this page |
UIRendererFactory |
getRendererFactory()
|
java.lang.String |
getRenderType()
|
protected abstract void |
init()
Page Initialization. |
protected void |
mapAttribute(java.lang.String contextAttribute,
java.lang.String appContextAttribute)
Maps a page context attribute to application context attribute. |
protected void |
mapToApplicationContext()
Maps the entire page context to application context. |
protected abstract void |
modifyPage()
Invoked just before rendering the page. |
protected void |
navigateTo(java.lang.String pageName)
Creates a navigation rule typically defined in an action listener. |
protected boolean |
process(java.lang.String controlId,
java.lang.String eventType)
|
protected void |
removeControl(Control control)
Removes a given control from the page |
protected java.lang.String |
render()
|
protected void |
setLayout(Layout layout)
Set the Layout of the page. |
protected void |
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Page(java.lang.String name)
Method Detail |
protected abstract void init()
protected abstract void modifyPage()
protected Context getPageContext()
protected void navigateTo(java.lang.String pageName)
pageName
- a valid page name.Application.addPage(Page)
public long getId()
public java.lang.String getRenderType()
public UIRendererFactory getRendererFactory()
protected java.util.Map getControls()
protected Control getControl(long id)
id
- the Control id
protected void addControl(Control control)
control
- the UI Control to add
java.lang.NullPointerException
- if argument is nullprotected void addControl(Control control, int position)
control
- the Control to be addedposition
- the position defined by layout
java.lang.NullPointerException
- if control argument is nullprotected void addControlToGroup(Control control, UIGroup group)
control
- the Control to be addedgroup
- the UIGroup to which the control needs to be addedprotected void removeControl(Control control)
control
- the Control to be removedprotected boolean process(java.lang.String controlId, java.lang.String eventType)
protected java.lang.String render() throws VinUIException
VinUIException
public java.lang.String getName()
protected void setName(java.lang.String name)
name
- The name to set.protected void mapAttribute(java.lang.String contextAttribute, java.lang.String appContextAttribute)
contextAttribute
- the page context attributeappContextAttribute
- the application context attributeprotected void mapToApplicationContext()
protected Layout getLayout()
protected void setLayout(Layout layout)
layout
- the Layout to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |