|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.view.AbstractFacesBean org.apache.shale.view.AbstractViewController org.apache.shale.usecases.rolodex.Rolodex
public class Rolodex
The ViewController for the rolodex use case. This is a contacts list that is to demonstrate the reuse ability for the Clay component.
Constructor Summary | |
---|---|
Rolodex()
|
Method Summary | |
---|---|
String |
changeTab()
This action event is fired when clicking on a tab link. |
protected org.apache.shale.clay.config.beans.ElementBean |
createCommandLinkMetadata(javax.faces.model.SelectItem item,
javax.faces.context.FacesContext context)
Creates an object graph uses to build the rolodex folder tabs dynamically. |
void |
createTabs(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object displayElementRoot)
This is a method binding event fired from the Clay component before building the component tree. |
protected org.apache.shale.clay.config.beans.ElementBean |
createVerbatimMetadata(String html,
javax.faces.context.FacesContext context)
This mehtod builds a simple verbatim meta tag. |
protected org.apache.shale.clay.config.beans.ElementBean |
createVerbatimMetadata(String html,
String renderExp,
javax.faces.context.FacesContext context)
This method builds a verbatim meta tag. |
String |
deleteContact()
Removes a Contact from the mock data store. |
List |
getContactsForTab()
This is called by the data table component to return a list of Contact s that belong within the selected index. |
Contact |
getSelectedContact()
Returns the selected contact for edit. |
int |
getSelectedTab()
Returns the current tab index. |
String |
newContact()
Creates a new Contact instance to be entered and saved. |
String |
saveContact()
Saves a Contact to the mock data store. |
String |
selectContact()
This is an action event fired from clicking on a contact in the data grid. |
void |
setSelectedContact(Contact contact)
Sets the selected contact for edit. |
void |
setSelectedTab(int index)
Records a change in tab index. |
Methods inherited from class org.apache.shale.view.AbstractViewController |
---|
destroy, init, isPostBack, preprocess, prerender, setPostBack |
Methods inherited from class org.apache.shale.view.AbstractFacesBean |
---|
erase, error, error, fatal, fatal, getApplication, getApplicationMap, getBean, getExternalContext, getFacesContext, getLifecycle, getRequestHeaderMap, getRequestMap, getRequestParameter, getRequestParameterMap, getRequestParameterValues, getSessionMap, getValue, info, info, log, log, retrieveData, saveData, setBean, setValue, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Rolodex()
Method Detail |
---|
public int getSelectedTab()
Returns the current tab index.
public Contact getSelectedContact()
Returns the selected contact for edit.
public void setSelectedContact(Contact contact)
Sets the selected contact for edit.
public void setSelectedTab(int index)
Records a change in tab index.
protected org.apache.shale.clay.config.beans.ElementBean createCommandLinkMetadata(javax.faces.model.SelectItem item, javax.faces.context.FacesContext context)
Creates an object graph uses to build the rolodex folder tabs dynamically.
item
- -
SelectItem holding the information to create the tab linkcontext
- -
FacesContext
protected org.apache.shale.clay.config.beans.ElementBean createVerbatimMetadata(String html, String renderExp, javax.faces.context.FacesContext context)
This method builds a verbatim meta tag. It is passed a "rendered" expression that will be evaluated to determine if the component is visible.
html
- The HTML tag to write to the documentrenderExp
- A value binding EL for the "rendered" attribute.context
- faces context
protected org.apache.shale.clay.config.beans.ElementBean createVerbatimMetadata(String html, javax.faces.context.FacesContext context)
This mehtod builds a simple verbatim meta tag. The value will not be escaped.
html
- HTML tag to write to the documentcontext
- -
faces context
public String changeTab()
This action event is fired when clicking on a tab link. The
selectedTab
is set with the value of the
tabIndex
request parameter.
public void createTabs(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object displayElementRoot)
This is a method binding event fired from the Clay
component before building the component tree. The method signature is a
"Validator" event signature and the binding attribute is
shapeValidator
.
context
- facesContextcomponent
- displayElementRoot
- public List getContactsForTab()
This is called by the data table component to return a list of
Contact
s that belong within the selected index.
public String selectContact()
This is an action event fired from clicking on a contact in the data grid. The latest contact is located using the data access object and is set as the "select" contact.
public String saveContact()
Saves a Contact
to the mock data store.
public String deleteContact()
Removes a Contact
from the mock data store.
public String newContact()
Creates a new Contact
instance to be entered and saved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |