From: Anjo K. <an...@us...> - 2006-10-09 20:53:57
|
Update of /cvsroot/wonder/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6226/Sources/er/directtoweb Modified Files: ERD2WListPage.java Log Message: - ERXDisplayGroup with filteredObjects added - used in list page - selectedObjects now taken from displayGroup Index: ERD2WListPage.java =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/ERD2WListPage.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** ERD2WListPage.java 7 Oct 2006 16:53:39 -0000 1.55 --- ERD2WListPage.java 9 Oct 2006 20:53:51 -0000 1.56 *************** *** 49,52 **** --- 49,53 ---- import er.extensions.ERXComponentActionRedirector; import er.extensions.ERXConstant; + import er.extensions.ERXDisplayGroup; import er.extensions.ERXEOAccessUtilities; import er.extensions.ERXEOControlUtilities; *************** *** 107,111 **** _displayGroup = new ERXBatchingDisplayGroup(); } else { ! _displayGroup = new WODisplayGroup() { /** --- 108,112 ---- _displayGroup = new ERXBatchingDisplayGroup(); } else { ! _displayGroup = new ERXDisplayGroup() { /** *************** *** 195,199 **** /** The background color for the current row. Override this to have more than one color. */ public String backgroundColorForRow() { ! return !isSelecting() || object() != displayGroup().selectedObject() ? alternatingColorForRow() : "#FFFF00"; } --- 196,200 ---- /** The background color for the current row. Override this to have more than one color. */ public String backgroundColorForRow() { ! return !isSelecting() || selectedObjects().containsObject(object()) ? alternatingColorForRow() : "#FFFF00"; } *************** *** 215,218 **** --- 216,233 ---- } + + /** The currently selected objects.*/ + public NSArray selectedObjects() { + return (NSArray)displayGroup().selectedObjects(); + } + + /** Sets currently selected objects. Pushes the values to the display group, clearing the selection if needed. */ + public void setSelectedObjects(NSArray eos) { + if(eos != null) + displayGroup().setSelectedObjects(eos); + else + displayGroup().clearSelection(); + } + /** Action method to select an object. */ public WOComponent selectObjectAction() { |