|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIOutput javax.faces.component.UIInput edu.nrao.sss.webapp.faces.component.NotesUIComponent
public class NotesUIComponent
Field Summary | |
---|---|
protected static String |
RENDERED_SCRIPT_KEY
|
Fields inherited from class javax.faces.component.UIInput |
---|
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID |
Constructor Summary | |
---|---|
NotesUIComponent()
|
Method Summary | |
---|---|
protected boolean |
compareValues(Object previous,
Object value)
Overridden to compare 2 lists. |
void |
decode(FacesContext context)
|
void |
encodeBegin(FacesContext context)
|
void |
encodeChildren(FacesContext context)
Overridden to be empty. |
protected void |
encodeCollapseButton(ResponseWriter writer,
String nid,
String sumid)
encodes a link that calls javascript functions to expand and collapse a note. |
protected void |
encodeCollapseNoteJSFunctions(ResponseWriter writer)
writes a javascript function that toggles the collapsed state of a note. |
void |
encodeEnd(FacesContext context)
Overridden to output the necessary javascript for this component. |
protected void |
encodeNewLink(ResponseWriter writer,
String id)
Writes a link that will create a new note widget (via JS). |
protected void |
encodeNewNoteJSFunction(ResponseWriter writer,
int numNotes)
writes a javascript function that inserts a new notes widget into the html at the end of the list of notes widgets. |
protected void |
encodeNote(FacesContext context,
String id,
String note,
int index)
Encodes note rendering the note, a collapse/expand button,
and a remove link (depending on the isEnabled flag). |
protected void |
encodeRemoveLink(ResponseWriter writer,
String pid,
String nid,
String hid)
|
protected void |
encodeRemoveNoteJSFunctions(ResponseWriter writer)
writes javascript functions that handle removing a note and poping up a dialog warning them with confirm and cancel options. |
protected Object |
getConvertedValue(FacesContext context,
Object newSubmittedValue)
Override the getConvertedValue method to return the List? Or just return * the thing it gets unchanged? |
protected String |
getNoteHeaderId(String nid)
|
protected String |
getNoteId(FacesContext context,
int noteIndex)
|
protected String |
getNoteStateId(String nid)
|
protected String |
getNoteSummaryId(String nid)
|
Boolean |
isCollapsed(String nid)
|
boolean |
isEnabled()
|
void |
restoreState(FacesContext context,
Object state)
|
Object |
saveState(FacesContext context)
|
void |
setCollapsed(Hashtable<String,Boolean> state)
|
void |
setEnabled(Boolean e)
|
Methods inherited from class javax.faces.component.UIInput |
---|
addValidator, addValueChangeListener, broadcast, getFamily, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validate, validateValue |
Methods inherited from class javax.faces.component.UIOutput |
---|
getConverter, getLocalValue, getValue, setConverter |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addFacesListener, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.ValueHolder |
---|
getConverter, getLocalValue, getValue, setConverter |
Field Detail |
---|
protected static final String RENDERED_SCRIPT_KEY
Constructor Detail |
---|
public NotesUIComponent()
Method Detail |
---|
public void encodeBegin(FacesContext context) throws IOException
encodeBegin
in class UIComponentBase
IOException
protected void encodeNote(FacesContext context, String id, String note, int index) throws IOException
note
rendering the note, a collapse/expand button,
and a remove link (depending on the isEnabled flag).
IOException
protected void encodeNewLink(ResponseWriter writer, String id) throws IOException
id
- The client id of this component
IOException
protected void encodeRemoveLink(ResponseWriter writer, String pid, String nid, String hid) throws IOException
IOException
protected void encodeCollapseButton(ResponseWriter writer, String nid, String sumid) throws IOException
IOException
public void encodeEnd(FacesContext context) throws IOException
encodeEnd
in class UIComponentBase
IOException
protected void encodeNewNoteJSFunction(ResponseWriter writer, int numNotes) throws IOException
IOException
protected void encodeRemoveNoteJSFunctions(ResponseWriter writer) throws IOException
IOException
protected void encodeCollapseNoteJSFunctions(ResponseWriter writer) throws IOException
IOException
public void decode(FacesContext context)
decode
in class UIInput
protected Object getConvertedValue(FacesContext context, Object newSubmittedValue) throws ConverterException
getConvertedValue
in class UIInput
ConverterException
protected boolean compareValues(Object previous, Object value)
compareValues
in class UIInput
public Object saveState(FacesContext context)
saveState
in interface StateHolder
saveState
in class UIInput
public void restoreState(FacesContext context, Object state)
restoreState
in interface StateHolder
restoreState
in class UIInput
public boolean isEnabled()
public void setEnabled(Boolean e)
public Boolean isCollapsed(String nid)
public void setCollapsed(Hashtable<String,Boolean> state)
protected String getNoteId(FacesContext context, int noteIndex)
protected String getNoteStateId(String nid)
protected String getNoteHeaderId(String nid)
protected String getNoteSummaryId(String nid)
public void encodeChildren(FacesContext context) throws IOException
encodeChildren
in class UIComponentBase
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |