|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dynamide.DynamideObject com.dynamide.resource.ContextNode com.dynamide.JDOMFile com.dynamide.Persistent com.dynamide.AbstractWidget com.dynamide.Widget com.dynamide.Page
public class Page
See how the WidgetType class is used for Page default properties, and look at the class javadoc for Widget. This class descends from AbstractWidget, as does com.dynamide.Widget. AbstractWidget abstracts the code for dealing with the WidgetType.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.dynamide.Persistent |
---|
Persistent.Source |
Field Summary | |
---|---|
static boolean |
DEFAULT_WANT_WIDGET_SPAN
|
Fields inherited from class com.dynamide.AbstractWidget |
---|
debugFrom, m_type, m_widgetType |
Fields inherited from class com.dynamide.Persistent |
---|
DEBUG_PAGE_SAVE, DEBUG_PROPS |
Fields inherited from class com.dynamide.DynamideObject |
---|
m_id |
Method Summary | |
---|---|
void |
addPageChangeListener(IPageChangeListener new_listener)
|
void |
addWidget(Widget wd)
|
java.lang.Object |
call(java.lang.String eventShortName)
|
java.lang.Object |
call(java.lang.String eventShortName,
java.lang.Object inputObject)
|
protected boolean |
checkOnOutput(HandlerResult handlerResult)
|
void |
cleanup()
|
void |
clearErrors()
calls Page.clearError() to clear the page error, and calls Field.clearError for all Widgets on this page. |
void |
clearFieldErrors()
|
void |
commitInMemoryChangesToDOM()
override of JDOMFile.commitInMemoryChangesToDOM(). |
Widget |
createWidget(java.lang.String widgetType)
|
Widget |
createWidget(java.lang.String widgetType,
java.lang.String id,
boolean callWidget_fire_OnLoad)
|
Widget |
createWidgetFromElement(org.jdom.Element element,
boolean generateID,
boolean addWidget)
Create a widget, and add to the widgets hashtable. |
Widget |
createWidgetSafe(java.lang.String widgetType)
|
java.lang.String |
eventShortNameToFullName(java.lang.String eventShortName)
There's also a version of this in Page, but not polymorphic. |
org.jdom.Element |
expandPageMacros(org.jdom.Element html,
StringList variables,
boolean hideEntities,
java.lang.String logname)
|
java.lang.String |
expandTemplate(java.lang.String text)
|
java.lang.String |
expandTemplate(java.lang.String text,
StringList variables)
|
java.lang.String |
expandTemplate(java.lang.String text,
StringList variables,
java.lang.String dotname)
|
static java.lang.String |
finalExpansions(boolean unhideEntities,
java.lang.String res)
|
void |
finalize()
|
java.lang.Object |
find(java.lang.String what)
Search using "/" as the separator, by simply calling find(path, "/"). |
java.util.Map |
findWidgetsInHTMLSource(java.lang.String browserStringID)
|
ScriptEvent |
fire_afterOutput()
|
ScriptEvent |
fire_beforeOutput()
This event is fired just before expanding page and widget properties and returning the page to the browser. |
ScriptEvent |
fire_onAction(java.lang.String action)
|
void |
fire_onImport()
|
ScriptEvent |
fire_onLeave()
This event is fired when a new page request has come in, and there was no action for this page, which can happen if you have a form with an action that also has hyperlinks or the user uses the 'back' button, skipping your form action. |
ScriptEvent |
fire_onLoad()
|
ScriptEvent |
fire_onOutput()
|
protected void |
fireAllWidgetsLoaded()
|
ScriptEvent |
fireEvent(java.lang.Object inputObject,
java.lang.String eventShortName)
|
ScriptEvent |
fireEvent(java.lang.String eventShortName)
this version is so that widget authors and bean authors can fire their own custom events. %% TODO: how to let them populate the Event object... |
ScriptEvent |
fireRegisteredAction(java.lang.String action)
|
java.lang.Object |
get(java.lang.String what)
Handles get("name") and get("field") specially, otherwise performs a lookup in the persisted and runtime properties, then from the WidgetType type definition as specified by the widget xml file. |
java.lang.String |
getEventPrefixName()
|
ScriptEventSource |
getEventSource(java.lang.String eventName,
boolean addSignature)
|
HandlerResult |
getHandlerResult()
|
java.lang.String |
getName()
|
java.util.Enumeration |
getPageProperties()
|
java.lang.String |
getPagePropertyEval(java.lang.String propertyName,
java.lang.String propertyValue,
javax.servlet.http.HttpServletRequest request)
|
RegisteredActions |
getRegisteredActions()
|
boolean |
getWantWidgetSpan()
|
Widget |
getWidget(java.lang.String id)
|
Widget |
getWidgetByID(java.lang.String id)
|
java.lang.String |
getWidgetDiv(java.lang.String widgetID,
javax.servlet.http.HttpServletRequest request)
|
StringList |
getWidgetList()
This one is by id, whereas getWidgetNamesList is by name |
StringList |
getWidgetNamesList()
|
java.util.Enumeration |
getWidgets()
for webmacro access. |
java.util.List |
getWidgetsByInterface(java.lang.String interfaceName)
|
ScriptEvent |
handleAction(java.lang.String action)
|
boolean |
hasFieldErrors()
|
java.lang.String |
link(java.lang.String moreParams,
java.lang.String linkText)
|
java.lang.String |
listWidgets()
|
protected void |
loadAllWidgets()
|
protected void |
loadAllWidgets(boolean call_fireAllWidgetsLoaded)
|
protected void |
notifyPageChangeListeners(java.lang.String fieldName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
protected void |
notifyPageNameChangeListeners(java.lang.Object oldValue,
java.lang.Object newValue)
|
java.lang.String |
outputContainer(StringList variables)
|
HandlerResult |
outputPage()
Outputs the page, but wrapped in a HandlerResult, which tells the caller the mime type, expiration time, redirect, and whether prettyPrint is appropriate. |
java.lang.String |
outputPage(boolean innerBodyOnly,
boolean wantWidgetSpan)
|
HandlerResult |
outputPage(HandlerResult handlerResult)
|
java.lang.String |
outputPage(StringList variables)
Output the page rendered with the widget tag. |
java.lang.String |
outputPage(StringList variables,
boolean innerBodyOnly,
boolean wantWidgetSpan)
|
java.lang.String |
outputPageResult()
Calls outputPage() and returns the HandlerResult.getResult(), pretty printed if the page determined that it could be pretty printed (errors and such are usually not pretty printed) so that the result of this method is a string representing the exact same page that the DynamideHandler would spit out for the DynamideServlet. |
java.lang.String |
outputWidget(java.lang.String widgetID)
If the widget is already in the DOM, either because it was in the xml file when the form file was loaded, or because it was inserted there when the client-side designed page was saved, then this function is pertinent. |
java.lang.String |
outputWidget(java.lang.String widgetID,
javax.servlet.http.HttpServletRequest request)
|
void |
printSerializedWidget(org.jdom.Element element,
java.io.Writer out,
int indentLevel)
|
void |
propertyChanged(ChangeEvent changeEvent)
|
void |
registerAction(java.lang.String action,
DynamideObject sender,
java.lang.String eventName,
java.lang.Object inputObject)
|
void |
removePageChangeListener(IPageChangeListener listener)
|
void |
removeUnusedWidgets()
|
void |
removeWidgetsNotInList(java.util.Map widgetsInHtmlsrc)
|
void |
renameWidget(Widget wd,
java.lang.String oldName,
java.lang.String newName)
|
void |
setHandlerResult(HandlerResult new_value)
|
void |
setName(java.lang.String new_value)
|
void |
setWantWidgetSpan(boolean new_value)
For most cases you could call this to eliminate the SPAN tag that surrounds all widget output; but for the IDE, this must be left using the default value; You can turn it to WantWidgetSpan == false if you will be rendering the page multiple times, for example if you are calling Page.outputPage() inside another page. |
java.lang.String |
toString()
|
void |
unregisterAction(java.lang.String action)
|
Methods inherited from class com.dynamide.Widget |
---|
fireEvent, getDesignMode, getPage, initFromElement, printSerialized, printSerialized, render, render, setDesignMode, setID, setPage, toElement |
Methods inherited from class com.dynamide.resource.ContextNode |
---|
bind, bind, bindAll, bindAllAttributes, bindAttribute, dump, dumpAttributes, dumpContext, find, find, firstContext, getAttribute, getAttributeCount, getAttributes, getContext, getContextCount, getContexts, getKey, getPermission, hasAttribute, hasContext, listAttributeNames, listAttributeNames, listContextNames, listContextNames, lockPermissions, rebind, rebind, rebindAttribute, remove, removeAttribute, removeFirstContext, setKey, unlockPermissions, update, writeCache |
Methods inherited from class com.dynamide.DynamideObject |
---|
clearProfiler, dump, expand, findParentExpander, findParentPage, findParentSession, findTopParentPage, getCategoryID, getID, getNextGetter, getObjectID, getOwner, getProfiler, isDebugEnabled, isInfoEnabled, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logWarn, logWarn, logWarn, logWarn, popLogContext, printf, printProfiler, profileEnter, profileLeave, pushLogContext, setDotName, setNextGetter, setObjectID, setOwner, sprintf, useProfiler, walkParents |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_WANT_WIDGET_SPAN
Method Detail |
---|
public void finalize() throws java.lang.Throwable
finalize
in class Widget
java.lang.Throwable
public void cleanup()
cleanup
in class Widget
public boolean getWantWidgetSpan()
public void setWantWidgetSpan(boolean new_value)
public java.lang.String toString()
toString
in class Widget
public java.lang.String getName()
getName
in class Widget
public void setName(java.lang.String new_value) throws DatatypeException
setName
in class Widget
DatatypeException
public HandlerResult getHandlerResult()
public void setHandlerResult(HandlerResult new_value)
public java.util.Enumeration getWidgets()
public java.util.List getWidgetsByInterface(java.lang.String interfaceName)
public java.lang.String listWidgets() throws java.lang.Exception
java.lang.Exception
public java.util.Enumeration getPageProperties()
public java.lang.Object get(java.lang.String what) throws java.lang.Exception
AbstractWidget
Handles get("name") and get("field") specially, otherwise performs a lookup in the persisted and runtime properties, then from the WidgetType type definition as specified by the widget xml file.
get("field") autocreates fields based on parent name and current object name when NOT in designMode. So, at runtime, if you didn't set field, it will be created for you so that widgets persist their values between screens even if you don't feel like adding a field to the fielddefs. This only happens at non designTime, so the autocreated fields do not get persisted to the pagefile or get seen in the property inspector. In the property inspector, you will just see "{autocreate}".
IMPORTANT: No checking is done to see if the field is missing. If you set the field to a value, then delete the field, the widet will not have a field.
get
in interface IGet
get
in class AbstractWidget
java.lang.Exception
public java.lang.Object find(java.lang.String what)
ContextNode
find
in interface IContext
find
in class ContextNode
public void commitInMemoryChangesToDOM() throws java.lang.Exception
commitInMemoryChangesToDOM
in class JDOMFile
java.lang.Exception
public java.lang.String outputContainer(StringList variables) throws DynamideUncaughtException
DynamideUncaughtException
public java.lang.String outputPageResult() throws DynamideException
DynamideException
public HandlerResult outputPage() throws DynamideUncaughtException
DynamideUncaughtException
outputPageResult()
public HandlerResult outputPage(HandlerResult handlerResult) throws DynamideUncaughtException
DynamideUncaughtException
protected boolean checkOnOutput(HandlerResult handlerResult)
public java.lang.String outputPage(StringList variables) throws DynamideUncaughtException
variables
- is a set of name-value pairs that will be put into the webmacro context.
DynamideUncaughtException
public java.lang.String outputPage(boolean innerBodyOnly, boolean wantWidgetSpan) throws DynamideUncaughtException
DynamideUncaughtException
public java.lang.String outputPage(StringList variables, boolean innerBodyOnly, boolean wantWidgetSpan) throws DynamideUncaughtException
DynamideUncaughtException
public static java.lang.String finalExpansions(boolean unhideEntities, java.lang.String res)
public java.lang.String expandTemplate(java.lang.String text) throws DynamideUncaughtException
DynamideUncaughtException
public java.lang.String expandTemplate(java.lang.String text, StringList variables) throws DynamideUncaughtException
DynamideUncaughtException
public java.lang.String expandTemplate(java.lang.String text, StringList variables, java.lang.String dotname) throws DynamideUncaughtException
DynamideUncaughtException
public org.jdom.Element expandPageMacros(org.jdom.Element html, StringList variables, boolean hideEntities, java.lang.String logname) throws java.lang.Exception
java.lang.Exception
public java.lang.String outputWidget(java.lang.String widgetID) throws java.lang.Throwable
java.lang.Throwable
public java.lang.String outputWidget(java.lang.String widgetID, javax.servlet.http.HttpServletRequest request) throws java.lang.Throwable
java.lang.Throwable
public java.util.Map findWidgetsInHTMLSource(java.lang.String browserStringID)
public void removeUnusedWidgets()
public void removeWidgetsNotInList(java.util.Map widgetsInHtmlsrc)
public void propertyChanged(ChangeEvent changeEvent)
propertyChanged
in interface IChangeListener
propertyChanged
in class AbstractWidget
public StringList getWidgetList()
public StringList getWidgetNamesList()
protected void loadAllWidgets() throws DynamideUncaughtException
DynamideUncaughtException
protected void loadAllWidgets(boolean call_fireAllWidgetsLoaded) throws DynamideUncaughtException
DynamideUncaughtException
protected void fireAllWidgetsLoaded()
public void addWidget(Widget wd)
public void renameWidget(Widget wd, java.lang.String oldName, java.lang.String newName)
public Widget createWidget(java.lang.String widgetType) throws java.lang.Exception
java.lang.Exception
public Widget createWidget(java.lang.String widgetType, java.lang.String id, boolean callWidget_fire_OnLoad) throws java.lang.Exception
java.lang.Exception
public Widget createWidgetSafe(java.lang.String widgetType)
public Widget createWidgetFromElement(org.jdom.Element element, boolean generateID, boolean addWidget)
public void printSerializedWidget(org.jdom.Element element, java.io.Writer out, int indentLevel) throws java.lang.Exception
java.lang.Exception
public Widget getWidget(java.lang.String id)
public Widget getWidgetByID(java.lang.String id)
public java.lang.String getWidgetDiv(java.lang.String widgetID, javax.servlet.http.HttpServletRequest request) throws java.lang.Throwable
java.lang.Throwable
public java.lang.String getPagePropertyEval(java.lang.String propertyName, java.lang.String propertyValue, javax.servlet.http.HttpServletRequest request) throws DynamideUncaughtException
DynamideUncaughtException
public java.lang.String link(java.lang.String moreParams, java.lang.String linkText)
public void addPageChangeListener(IPageChangeListener new_listener)
public void removePageChangeListener(IPageChangeListener listener)
protected void notifyPageChangeListeners(java.lang.String fieldName, java.lang.Object oldValue, java.lang.Object newValue)
protected void notifyPageNameChangeListeners(java.lang.Object oldValue, java.lang.Object newValue)
public RegisteredActions getRegisteredActions()
public ScriptEvent fireRegisteredAction(java.lang.String action)
public void registerAction(java.lang.String action, DynamideObject sender, java.lang.String eventName, java.lang.Object inputObject)
public void unregisterAction(java.lang.String action)
public ScriptEvent handleAction(java.lang.String action)
public java.lang.String getEventPrefixName()
getEventPrefixName
in class Widget
public java.lang.String eventShortNameToFullName(java.lang.String eventShortName)
Widget
eventShortNameToFullName
in class Widget
public java.lang.Object call(java.lang.String eventShortName)
call
in class Widget
public java.lang.Object call(java.lang.String eventShortName, java.lang.Object inputObject)
call
in class Widget
public ScriptEventSource getEventSource(java.lang.String eventName, boolean addSignature)
getEventSource
in class Persistent
public ScriptEvent fireEvent(java.lang.String eventShortName)
public ScriptEvent fireEvent(java.lang.Object inputObject, java.lang.String eventShortName)
fireEvent
in class Widget
public void fire_onImport()
public ScriptEvent fire_onAction(java.lang.String action)
public ScriptEvent fire_onLoad()
fire_onLoad
in class Widget
public ScriptEvent fire_beforeOutput()
fire_beforeOutput
in class Widget
public ScriptEvent fire_onOutput()
public ScriptEvent fire_afterOutput()
public ScriptEvent fire_onLeave()
public boolean hasFieldErrors()
public void clearErrors()
clearErrors
in class JDOMFile
public void clearFieldErrors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |