|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.appserver.WOElement com.webobjects.appserver.WOComponent com.webobjects.directtoweb.D2WComponent com.webobjects.directtoweb.D2WPage com.webobjects.directtoweb.D2WListPage
public class D2WListPage
The D2WListPage class provides the behavior for the list page and select page Direct to Web templates, specifically BASListPage, NEUListPage, and WOLListPage. The classes for these components inherit directly from D2WListPage and define no additional methods or variables.
D2WPlainListPage also inherits from this class.
Most of the methods in this class are accessed, via the EOKeyValueCoding interface defined in the EOControl framework, from the bindings (.wod) file of the Direct to Web template. If you create a Direct to Web template from a list page or select page, you can invoke the methods in this class in the same way.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
---|
WOComponent.Event |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
---|
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException |
Field Summary |
---|
Fields inherited from class com.webobjects.directtoweb.D2WComponent |
---|
currentObjectKey |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
KeyPathSeparator |
Constructor Summary | |
---|---|
D2WListPage(WOContext aContext)
Creates an instance of D2WListPage with the specified context. |
Method Summary | |
---|---|
String |
alternatingColorForRow()
Gets the alternating row background color. |
void |
appendToResponse(WOResponse r,
WOContext c)
Fetches on the display group if the editing context did save changes recently. |
WOComponent |
backAction()
Is invoked when the user clicks 'Return' in the list page. |
String |
backgroundColorForRow()
Gets the row background color. |
String |
backgroundColorForRowMethod()
Contributes to the template method that corresponds to the method backgroundColorForRow . |
String |
defaultSortKey()
Gets the default sort key. |
WOComponent |
deleteObjectAction()
Is invoked when the user clicks the delete button next to an object on the list page. |
WODisplayGroup |
displayGroup()
Gets the display group that contains the objects listed on the page. |
void |
editingContextDidSaveChanges(NSNotification notif)
Handles notifications when the editing context did save changes. |
WOComponent |
editObjectAction()
Is invoked when the user clicks the edit button next to an object on the list page. |
void |
finalize()
|
WOComponent |
inspectObjectAction()
Is invoked when the user clicks the inspect button next to an object on the list page. |
boolean |
isEntityReadOnly()
Indicates whether the entity displayed on this page can be modified. |
boolean |
isListEmpty()
Indicates whether the list displayed contains no objects. |
boolean |
isSelecting()
Indicates whether the page is a select page. |
int |
listSize()
Gets the total number of objects in the display group. |
int |
numberOfObjectsPerBatch()
Gets the batch size of the display group. |
WOAssociation |
replacementAssociationForAssociation(WOAssociation oldAssociation,
String oldBinding,
DTWTemplate aTemplate,
WOContext aContext)
Replaces the following bindings: isListEmpty ,
d2wContext.propertyKey ,
d2wContext.justification ,
d2wContext.displayNameForProperty , object ,
displayedObjects . |
EOEnterpriseObject |
selectedObject()
Gets the selected object of the display group. |
WOComponent |
selectObjectAction()
Is invoked when the user clicks 'Select' next to one of the objects on the select page. |
void |
setBackgroundColorForRow(String newValue)
Sets the row background color to the specified value. |
void |
setDataSource(EODataSource dataSource)
Sets the data source to the specified data source. |
void |
setLocalContext(D2WContext newValue)
Sets the local context to the specified D2WContext. |
void |
setSelectedObject(EOEnterpriseObject selectedObject)
Selects the object in the display group if the specified object is not null; clears the selection of the display group otherwise. |
Methods inherited from class com.webobjects.directtoweb.D2WPage |
---|
alternateRowColor, dataSource, descriptionForResponse, extraBindings, nextPage, nextPageDelegate, pageWrapperName, setExtraBindings, setNextPage, setNextPageDelegate, showCancel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.webobjects.directtoweb.ListPageInterface |
---|
setNextPage, setNextPageDelegate |
Methods inherited from interface com.webobjects.directtoweb.SelectPageInterface |
---|
nextPageDelegate, setNextPageDelegate |
Constructor Detail |
---|
public D2WListPage(WOContext aContext)
aContext
- instance of WOContextD2WListPage.editingContextDidSaveChanges(NSNotification)
,
D2WPage.D2WPage(WOContext)
,
NSNotificationCenter
Method Detail |
---|
public WODisplayGroup displayGroup()
public int numberOfObjectsPerBatch()
The current implementation parses the value for the key "batchSize" in the D2WContext and returns the int if parsing succeeds; 10 otherwise.
The implementation is subject to change in future releases.
D2WListPage.displayGroup()
,
D2WComponent.d2wContext()
public boolean isEntityReadOnly()
The current implementation returns true if the value for the key "readOnly" in the D2WContext is D2WModel.One; false otherwise.
The implementation is subject to change in future releases.
isEntityReadOnly
in class D2WComponent
D2WComponent.d2wContext()
,
D2WModel.One
public void setLocalContext(D2WContext newValue)
The current implementation also supports sorting the first column of the List Page and affects the display of sort icons.
The implementation is subject to change in future releases.
setLocalContext
in class D2WComponent
newValue
- instance of D2WContextD2WListPage.displayGroup()
,
D2WListPage.numberOfObjectsPerBatch()
,
D2WListPage.defaultSortKey()
public String defaultSortKey()
The current implementation takes the first attribute in the display property keys.
The implementation is subject to change in future releases.
D2WComponent.displayPropertyKeys()
public void setDataSource(EODataSource dataSource)
setDataSource
in interface ListPageInterface
setDataSource
in interface SelectPageInterface
setDataSource
in class D2WPage
dataSource
- instance of EODataSourceD2WPage.setDataSource(com.webobjects.eocontrol.EODataSource)
,
D2WListPage.displayGroup()
public boolean isSelecting()
The current implementation returns true if the task in the D2WContext equals "select"; false otherwise.
The implementation is subject to change in future releases.
public boolean isListEmpty()
D2WListPage.listSize()
public int listSize()
public String alternatingColorForRow()
The current implementation returns "#FFFF00" if the task is
"select" and the object is selected in the display group; the value
of the method alternatingColorForRow
otherwise.
The implementation is subject to change in future releases.
D2WPage.alternateRowColor()
,
D2WComponent.backgroundColorForTable()
,
D2WComponent.backgroundColorForTableDark()
public String backgroundColorForRow()
The current implementation return "#FFFF00" if the task is
"select" and the object is selected in the display group; the value
of the method alternatingColorForRow
otherwise.
The implementation is subject to change in future releases.
D2WListPage.displayGroup()
,
D2WListPage.alternatingColorForRow()
,
D2WComponent.task()
,
D2WComponent.object()
public void setBackgroundColorForRow(String newValue)
The current implementation does nothing.
The implementation is subject to change in future releases.
newValue
- instance of String - ignoredD2WListPage.backgroundColorForRow()
public EOEnterpriseObject selectedObject()
selectedObject
in interface SelectPageInterface
D2WListPage.displayGroup()
,
D2WListPage.setSelectedObject(EOEnterpriseObject)
public void setSelectedObject(EOEnterpriseObject selectedObject)
setSelectedObject
in interface SelectPageInterface
selectedObject
- instance of EOEnterpriseObjectD2WListPage.selectedObject()
public WOComponent selectObjectAction()
nextPageDelegate
.
D2WPage.nextPageDelegate()
public WOComponent inspectObjectAction()
public WOComponent editObjectAction()
public WOComponent deleteObjectAction()
public WOComponent backAction()
nextPage
. You can also specify custom behavior for this
action by overriding the method nextPageDelegate
;
in this case, the method nextPage
is ignored.
D2WPage.nextPage()
,
D2WPage.nextPageDelegate()
public String backgroundColorForRowMethod()
backgroundColorForRow
.
The implementation is subject to change in future releases.
backgroundColorForRow
D2WListPage.backgroundColorForRow()
,
D2WListPage.replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext)
public void editingContextDidSaveChanges(NSNotification notif)
notif
- instance of NSNotificationD2WListPage.D2WListPage(WOContext)
,
D2WListPage.appendToResponse(WOResponse, WOContext)
public void finalize() throws Throwable
finalize
in class D2WPage
Throwable
public void appendToResponse(WOResponse r, WOContext c)
appendToResponse
in class WOComponent
r
- instance of WOResponsec
- instance of WOContextD2WListPage.editingContextDidSaveChanges(com.webobjects.foundation.NSNotification)
,
WOComponent.WOComponent(WOContext)
public WOAssociation replacementAssociationForAssociation(WOAssociation oldAssociation, String oldBinding, DTWTemplate aTemplate, WOContext aContext)
isListEmpty
,
d2wContext.propertyKey
,
d2wContext.justification
,
d2wContext.displayNameForProperty
, object
,
displayedObjects
.
May also replace the bindings showCancel
and
selectObjectAction
.
The implementation is subject to change in future releases.
replacementAssociationForAssociation
in interface DTWGeneration
replacementAssociationForAssociation
in class D2WPage
oldAssociation
- instance of WOAssociationoldBinding
- instance of StringaTemplate
- instance of DTWTemplateaContext
- instance of WOContext
D2WListPage.isListEmpty()
,
D2WListPage.setDataSource(EODataSource)
,
D2WListPage.selectObjectAction()
,
D2WPage.showCancel()
,
D2WPage.replacementAssociationForAssociation(WOAssociation, String, DTWTemplate, WOContext)
,
D2WComponent.object()
,
D2WContext.propertyKey()
,
D2WContext.displayNameForProperty()
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |