From 80443ab7e3c780bb287eb655f66e4b8c638e42b5 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Wed, 15 Jul 2015 12:31:10 +0200 Subject: [PATCH 1/9] ERMDNestingListPageRepetition is a special list page repetition for hierarchical object structures that extends ERMDListPageRepetition. Allows recursive access to a relationship specified via the "nestedRelationship" key. To use it, set it via "toManyRepetitionComponentName". As an example, you could use this for a hierarchy of locations (think "continent > country > city > quarter"), with "containedLocations" as the nestedRelationship key. This will allow a "drill-down" access to locations. --- .../default_screen_stylesheet.css | 6 + .../ERMDNestingListPageRepetition.html | 57 +++++ .../ERMDNestingListPageRepetition.wod | 147 ++++++++++++ .../ERMDNestingListPageRepetition.woo | 4 + .../components/ERMDBatchSizeControl.java | 22 +- .../ERMDNestingListPageRepetition.java | 214 ++++++++++++++++++ .../ERMODEditRelationshipPage.wod | 10 +- .../look/pages/ERMODEditRelationshipPage.java | 13 ++ 8 files changed, 457 insertions(+), 16 deletions(-) create mode 100644 Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html create mode 100644 Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod create mode 100644 Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.woo create mode 100644 Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java diff --git a/Frameworks/D2W/ERModernDefaultSkin/WebServerResources/default_screen_stylesheet.css b/Frameworks/D2W/ERModernDefaultSkin/WebServerResources/default_screen_stylesheet.css index bdd67b195fc..7e3129009dd 100644 --- a/Frameworks/D2W/ERModernDefaultSkin/WebServerResources/default_screen_stylesheet.css +++ b/Frameworks/D2W/ERModernDefaultSkin/WebServerResources/default_screen_stylesheet.css @@ -818,6 +818,12 @@ span.ErrorLabel { background-color: #e6e9ef; } +/* hide empty children row */ +.ObjRow.NestedObjRow .hidden { + line-height: 0px; + padding: 0px; +} + .ComboTHLink .Label{ text-decoration: none; color: #c2c6cf; diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html new file mode 100644 index 00000000000..f491124fbb9 --- /dev/null +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html @@ -0,0 +1,57 @@ + + +   + + + + + + + + + +   + + + + + +
    + +
  • Show Nested
  • +
    + +
  • +
    +
+ +
+ + + + + + + +
    + +
  • +
    +
+ +
+
+ + + + + + + +   + + + +
+
+

->//

\ No newline at end of file diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod new file mode 100644 index 00000000000..8a675939dee --- /dev/null +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod @@ -0,0 +1,147 @@ +AttributeDisplay: WOSwitchComponent { + WOComponentName = d2wContext.componentName; + localContext = d2wContext; + object = d2wContext.object; +} + +AttributeRepetition: WORepetition { + _unroll = true; + item = propertyKey; + list = currentSectionKeys; +} + +IsNotOmitted : WOConditional { + condition = isKeyOmitted; + negate = true; +} + +ColumnLabelRepetition: WORepetition { + _unroll = true; + item = propertyKey; + list = currentSectionKeys; +} + +ObjectsRepetition: WORepetition { + item = d2wContext.object; + list = ^displayGroup.displayedObjects; + index = rowIndex; + checkHashCodes = true; + eoSupport = true; +} + +LeftAction: WOSwitchComponent { + WOComponentName = d2wContext.componentName; + localContext = d2wContext; + object = d2wContext.object; + displayGroup = displayGroup; + updateContainerID = d2wContext.updateContainerID; +} + +LeftActions: WORepetition { + item = propertyKey; + list = leftActions; +} + +ObjectTableHeaderRow: WOGenericContainer { + _unroll = true; + elementName = "tr"; + class = d2wContext.classForObjectTableHeader; +} + +ListTableRow: WOGenericContainer { + elementName = "tr"; + class = objectRowClass; +} + +HasNestedRelationship : WOConditional { + condition = hasNestedRelationship; +} + +NestedUC : AjaxUpdateContainer { + id = idForNestedUpdateContainer; + elementName = "tr"; + class = nestedRowClass; +} + +showNestedRelationshipEditor : WOConditional { + condition = showNestedRelationshipEditor; +} + +NestedRelationshipEditor : WOSwitchComponent { + WOComponentName = childContext.componentName; + localContext = childContext; + object = childContext.object; // VALID +} + +hideNestedRelationshipEditor : WOConditional { + condition = showNestedRelationshipEditor; + negate = true; +} + +TableHeaderSwitchComponent : WOSwitchComponent { + WOComponentName = d2wContext.tableHeaderComponentName; + displayGroup = displayGroup; + d2wContext = d2wContext; + updateContainerID = ^updateContainerID; +} + +RightAction: WOSwitchComponent { + WOComponentName = d2wContext.componentName; + localContext = d2wContext; + object = d2wContext.object; + displayGroup = displayGroup; +} + +RightActions: WORepetition { + item = propertyKey; + list = rightActions; +} + +SectionRepetition: ERXWORepetition { + list = sectionsContents; + item = currentSection; +} + +ObjectTable : WOGenericContainer { + elementName = "table"; + class = d2wContext.classForObjectTable; +} + +AttColumnHeader : WOGenericContainer { + elementName = "th"; + class = d2wContext.classForAttributeColumn; +} + +AttColumnCell : WOGenericContainer { + elementName = "td"; + class = d2wContext.classForAttributeColumn; + data-label = d2wContext.displayNameForProperty; +} + +HasLeftActionsConditional : WOConditional { + condition = hasLeftActions; +} + +ToggleNestedRelationshipEditor : AjaxUpdateLink { + action = toggleNestedRelationshipEditor; + updateContainerID = idForNestedUpdateContainer; +} + +HasRightActionsConditional : WOConditional { + condition = hasRightActions; +} +D2wContextEntityName : WOString { + value = d2wContext.entity.name; +} + +D2wContextParentPageConfiguration : WOString { + value = d2wContext.parentPageConfiguration; +} + +D2wContextPageConfiguration : WOString { + value = d2wContext.pageConfiguration; +} + +D2wContextParentProperytKey : WOString { + value = d2wContext.parentProperytKey; +} diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.woo b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.woo new file mode 100644 index 00000000000..a076a051a7e --- /dev/null +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.woo @@ -0,0 +1,4 @@ +{ + "WebObjects Release" = "WebObjects 5.0"; + encoding = "UTF-8"; +} \ No newline at end of file diff --git a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/ERMDBatchSizeControl.java b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/ERMDBatchSizeControl.java index 8c2420e64eb..a9f7ea80b17 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/ERMDBatchSizeControl.java +++ b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/ERMDBatchSizeControl.java @@ -118,23 +118,23 @@ public ERXLocalizer localizer() { * Defaults to the first parent update container id. */ public String updateContainerID() { - if (_updateContainerID == null) { - _updateContainerID = (String) valueForBinding(Keys.updateContainerID); - if (_updateContainerID == null) { - _updateContainerID = AjaxUpdateContainer.currentUpdateContainerID(); - } - } - return _updateContainerID; + if (_updateContainerID == null) { + _updateContainerID = (String) valueForBinding(Keys.updateContainerID); + if (_updateContainerID == null) { + _updateContainerID = AjaxUpdateContainer.currentUpdateContainerID(); + } + } + return _updateContainerID; } /** * Returns a unique id for this batch size control */ public String batchSizeFieldID() { - if (_batchSizeFieldID == null) { - _batchSizeFieldID = "BSIF" + ERXStringUtilities.safeIdentifierName(context().contextID());; - } - return _batchSizeFieldID; + if (_batchSizeFieldID == null) { + _batchSizeFieldID = updateContainerID() + "_BSIF"; + } + return _batchSizeFieldID; } public void setBatchSizeFieldID(String fieldID) { diff --git a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java new file mode 100644 index 00000000000..adf30839e0f --- /dev/null +++ b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java @@ -0,0 +1,214 @@ +package er.modern.directtoweb.components.repetitions; + +import com.webobjects.appserver.WOActionResults; +import com.webobjects.appserver.WOComponent; +import com.webobjects.appserver.WOContext; +import com.webobjects.directtoweb.D2WContext; +import com.webobjects.directtoweb.ERD2WContext; +import com.webobjects.eocontrol.EOEnterpriseObject; +import com.webobjects.foundation.NSArray; +import com.webobjects.foundation.NSDictionary; +import com.webobjects.foundation.NSMutableDictionary; + +/** + * Special list page repetition for hierarchical object structures that extends + * ERMDListPageRepetition. Allows recursive access to a relationship specified + * via the "nestedRelationship" key. + * + * As an example, you could use this for a hierarchy of locations (think + * "continent > country > city > quarter"), with "containedLocations" as the + * nestedRelationship key. This will allow a "drill-down" access to locations. + * + * @binding displayGroup + * @binding d2wContext + * + * @d2wKey componentName + * @d2wKey object + * @d2wKey displayNameForProperty + * @d2wKey sortKeyForList + * @d2wKey sortCaseInsensitive + * @d2wKey propertyIsSortable + * @d2wKey pageConfiguration + * @d2wKey parentPageConfiguration + * @d2wKey classForAttributeColumn + * @d2wKey classForObjectTable + * @d2wKey tableHeaderComponentName + * @d2wKey classForObjectTableHeader + * @d2wKey updateContainerID + * @d2wKey baseClassForObjectRow + * @d2wKey recursiveRelationship + * + * @author fpeters + */ +public class ERMDNestingListPageRepetition extends ERMDListPageRepetition { + + private static final long serialVersionUID = 1L; + + public interface Keys { + + public static String inlineTask = "inlineTask"; + + public static String inspectEmbeddedConfigurationName = "inspectEmbeddedConfigurationName"; + + public static String editEmbeddedConfigurationName = "editEmbeddedConfigurationName"; + + public static String createEmbeddedConfigurationName = "createEmbeddedConfigurationName"; + + public static String queryEmbeddedConfigurationName = "queryEmbeddedConfigurationName"; + + public static String displayPropertyKeys = "displayPropertyKeys"; + + public static String subTask = "subTask"; + + public static String isEntityCreatable = "isEntityCreatable"; + + public static String nestedRelationship = "nestedRelationship"; + + public static String showNestedRelationshipEditor = "showNestedRelationshipEditor"; + + } + + public ERMDNestingListPageRepetition(WOContext context) { + super(context); + } + + /** + * Returns the name of the current inline page configuration + */ + public String inspectConfiguration() { + String result = null; + if ("create".equals(inlineTask())) { + result = (String) d2wContext().valueForKey( + Keys.createEmbeddedConfigurationName); + } else if ("edit".equals(inlineTask())) { + result = (String) d2wContext() + .valueForKey(Keys.editEmbeddedConfigurationName); + } else { + result = (String) d2wContext().valueForKey( + Keys.inspectEmbeddedConfigurationName); + } + return result; + } + + public String inlineTask() { + return (String) d2wContext().valueForKey(Keys.inlineTask); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public NSDictionary childRelationshipBindings() { + NSArray masterObjectAndRelationshipKey = new NSArray(d2wContext() + .valueForKeyPath("object"), d2wContext().valueForKey( + Keys.nestedRelationship)); + return new NSMutableDictionary("masterObjectAndRelationshipKey", + masterObjectAndRelationshipKey); + } + + public D2WContext childContext() { + D2WContext c = ERD2WContext.newContext(d2wContext()); + c.setPropertyKey((String) d2wContext().valueForKey(Keys.nestedRelationship)); + c.takeValueForKey("ERDEditRelationship", "componentName"); + return c; + } + + public boolean hasLeftActions() { + boolean hasLeftActions = leftActions() != null && leftActions().count() > 0; + if (d2wContext().valueForKey(Keys.nestedRelationship) != null) { + hasLeftActions = true; + } + return hasLeftActions; + } + + public WOActionResults toggleNestedRelationshipEditor() { + // use globalID hash as unique key for this object + Boolean showNestedRelationshipEditor = (Boolean) d2wContext().valueForKeyPath( + Keys.showNestedRelationshipEditor + uniqueObjectID()); + if (showNestedRelationshipEditor == null) { + // default to hide + showNestedRelationshipEditor = Boolean.FALSE; + } + d2wContext().takeValueForKeyPath(!showNestedRelationshipEditor, + Keys.showNestedRelationshipEditor + uniqueObjectID()); + return null; + } + + public Boolean hasNestedRelationship() { + return d2wContext().valueForKey(Keys.nestedRelationship) != null; + } + + public Boolean showNestedRelationshipEditor() { + // use globalID hash as unique key for this object + Boolean showNestedRelationshipEditor = (Boolean) d2wContext().valueForKeyPath( + Keys.showNestedRelationshipEditor + uniqueObjectID()); + return showNestedRelationshipEditor; + } + + public int columnCount() { + int columnCount = displayPropertyKeyCount(); + // TODO move collapse action to separate column, in case no left actions + // are defined? + if (hasLeftActions()) { + columnCount++; + } + if (hasRightActions()) { + columnCount++; + } + return columnCount; + } + + /** + * Computes a unique ID, based on the nesting level. Depending on the object + * graph, a unique EOGlobalID may be insufficient as an EO might appear more + * than once. + * + * @return unique ID for the nested update container + */ + public String idForNestedUpdateContainer() { + String idForNestedUpdateContainer = (String) d2wContext().valueForKey( + "idForRepetitionContainer"); + WOComponent ancestor = parent(); + int recursionCounter = 0; + while (ancestor != null && ancestor.parent() != null) { + ancestor = ancestor.parent(); + if (name().equals(ancestor.name())) { + recursionCounter++; + } + } + idForNestedUpdateContainer = idForNestedUpdateContainer + "_l" + recursionCounter + + "_" + uniqueObjectID(); + return idForNestedUpdateContainer; + } + + /** + * @return a unique ID, based on the D2WContext's object value + */ + private String uniqueObjectID() { + EOEnterpriseObject object = (EOEnterpriseObject) d2wContext().valueForKey( + "object"); + String uniqueID = String.valueOf(object.hashCode()); + return uniqueID; + } + + /* + * Overridden to remove LastObjRow class, as the nestedRowClass will always + * be last. + */ + public String objectRowClass() { + String objectRowClass = super.objectRowClass(); + objectRowClass = objectRowClass.replace("LastObjRow", ""); + return objectRowClass; + } + + /** + * Gets class list from object row class, but removes any FirstObjRow + * occurrence, as the nested row can never be the first row. + * + * @return nested row class + */ + public String nestedRowClass() { + String nestedRowClass = super.objectRowClass(); + nestedRowClass = nestedRowClass.replace("FirstObjRow", ""); + nestedRowClass = nestedRowClass.concat(" NestedObjRow"); + return nestedRowClass; + } + +} \ No newline at end of file diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod index 787ab016b8a..9810400a917 100644 --- a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod @@ -115,21 +115,21 @@ InnerWrapper : WOGenericContainer { RepetitionUpdateContainer : AjaxUpdateContainer { elementName = "div"; - id = d2wContext.idForRepetitionContainer; + id = idForRepetitionContainer; } ToManyListRepetition: WOSwitchComponent { WOComponentName = d2wContext.toManyRepetitionComponentName; d2wContext = localContext; displayGroup = relationshipDisplayGroup; - updateContainerID = d2wContext.idForRepetitionContainer; + updateContainerID = idForRepetitionContainer; } ToOneListRepetition: WOSwitchComponent { WOComponentName = d2wContext.toOneRepetitionComponentName; d2wContext = localContext; displayGroup = relationshipDisplayGroup; - updateContainerID = d2wContext.idForRepetitionContainer; + updateContainerID = idForRepetitionContainer; } ShowBottomBatchNavBar : WOConditional { @@ -154,12 +154,12 @@ NavigationBar: WOSwitchComponent { WOComponentName = d2wContext.batchNavigationBarComponentName; displayGroup = relationshipDisplayGroup; d2wContext = d2wContext; - updateContainerID = d2wContext.idForRepetitionContainer; + updateContainerID = idForRepetitionContainer; } BatchSizeControl : ERMDBatchSizeControl { displayGroup = relationshipDisplayGroup; - updateContainerID = d2wContext.idForRepetitionContainer; + updateContainerID = idForRepetitionContainer; d2wContext = d2wContext; } diff --git a/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java b/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java index 919b05d678d..0f2bb21265c 100644 --- a/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java +++ b/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java @@ -569,4 +569,17 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE } } + /** + * @return a unique ID for the repetition container + */ + public String idForRepetitionContainer() { + String repetitionContainerID = (String) d2wContext().valueForKey( + "idForRepetitionContainer"); + // use master object to generate globally unique ID + // - allows for nesting of relationship components + repetitionContainerID = repetitionContainerID.concat("_" + + masterObject().hashCode()); + return repetitionContainerID; + } + } From 7b2a1f3cf47036888e30bca232ebf3daf6d511ed Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Thu, 23 Jul 2015 14:24:17 +0200 Subject: [PATCH 2/9] Given the current implementation, the "left actions" container will always be rendered. Remove TODO and add some documentation. --- .../repetitions/ERMDNestingListPageRepetition.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java index adf30839e0f..5e9fe78d0f4 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java +++ b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java @@ -142,13 +142,13 @@ public Boolean showNestedRelationshipEditor() { return showNestedRelationshipEditor; } + /** + * @return the column count for the nested td's colspan + */ public int columnCount() { int columnCount = displayPropertyKeyCount(); - // TODO move collapse action to separate column, in case no left actions - // are defined? - if (hasLeftActions()) { - columnCount++; - } + // left action column will always be shown + columnCount++; if (hasRightActions()) { columnCount++; } From 2b7ff235cdc5f6853eec6c51c8d1720a6557e5b9 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Mon, 17 Aug 2015 15:56:50 +0200 Subject: [PATCH 3/9] First cut of an inline editable list to ERMODEditRelationshipPage: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * new ERMODEditableListTemplate, which generates a unique ID for the bottom action block update container (needed for compatibility with ERMDNestingListPageRepetition) – style is still very much WIP * added "EditListEmbedded" page configuration to ERMDDefaultConfigurationNameAssignment * modified ERMDBatchSizeControl to generate the batchSizeFieldID based on the updateContainerID * added rules to ERModernLook d2wmodel, to handle * edit list embedded configuration name assignment * template name for edit list * enable bottom action block for embedded edit lists * use empty header for embedded edit lists Known bugs: * batching does not work while in "edit list" mode * save and cancel will cause a full page load, which may cause unsaved edits outside of the active editable list to get lost * validation handling is entirely untested --- ...RMDDefaultConfigurationNameAssignment.java | 12 + .../ERMODEditRelationshipPage.html | 8 +- .../ERMODEditRelationshipPage.wod | 27 +- .../ERMODEditableListTemplate.html | 39 +++ .../ERMODEditableListTemplate.wod | 247 ++++++++++++++++++ .../ERMODEditableListTemplate.woo | 1 + .../D2W/ERModernLook/Resources/d2w.d2wmodel | 4 + .../ERModernLook/Resources/d2w.d2wmodel.txt | 4 + .../components/ERMODEditableListTemplate.java | 76 ++++++ .../look/pages/ERMODEditRelationshipPage.java | 53 ++++ 10 files changed, 469 insertions(+), 2 deletions(-) create mode 100644 Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.html create mode 100644 Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod create mode 100644 Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.woo create mode 100644 Frameworks/D2W/ERModernLook/Sources/er/modern/look/components/ERMODEditableListTemplate.java diff --git a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/assignments/defaults/ERMDDefaultConfigurationNameAssignment.java b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/assignments/defaults/ERMDDefaultConfigurationNameAssignment.java index 678ae09b47c..f5923168ba9 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/assignments/defaults/ERMDDefaultConfigurationNameAssignment.java +++ b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/assignments/defaults/ERMDDefaultConfigurationNameAssignment.java @@ -22,6 +22,7 @@ public class ERMDDefaultConfigurationNameAssignment extends ERDDefaultConfigurat new NSArray(new String[] {"propertyKey", "object.entityName", "entity.name"}), "createEmbeddedConfigurationName", new NSArray(new String[] {"propertyKey", "object.entityName", "entity.name"}), "selectEmbeddedConfigurationName", new NSArray(new String[] {"propertyKey", "object.entityName", "entity.name"}), "pickEmbeddedConfigurationName", + new NSArray(new String[] {"propertyKey", "subTask", "object.entityName", "entity.name"}), "editListEmbeddedConfigurationName", new NSArray(new String[] {"propertyKey", "object.entityName", "entity.name"}), "editRelationshipEmbeddedConfigurationName", new NSArray(new String[] {"propertyKey", "object.entityName", "entity.name", "inlineTask"}), "inlineConfigurationName" }); @@ -100,6 +101,17 @@ public Object selectEmbeddedConfigurationName(D2WContext c) { return "SelectEmbedded" + entityNameForContext(c); } + /** + * Generates a default embedded edit list page configuration + * based on the current entity name. Default format + * is 'EditListEmbedded' + entity name. + * @param c current D2W context + * @return default edit list page configuration name + */ + public Object editListEmbeddedConfigurationName(D2WContext c) { + return "EditListEmbedded" + entityNameForContext(c); + } + /** * Generates a default embedded create page configuration * based on the current entity name. Default format diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.html b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.html index 3ebbb2e932e..f894d73513b 100644 --- a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.html +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.html @@ -12,7 +12,12 @@ - + + + + + + @@ -32,6 +37,7 @@
    +
  • diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod index 9810400a917..403c68fbbc8 100644 --- a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditRelationshipPage.wo/ERMODEditRelationshipPage.wod @@ -63,6 +63,16 @@ NewButton: CCSmartAjaxButton { dontSubmitForm = true; } +EditListButton: CCSmartAjaxButton { + alt = "Enables editing of the list of relationship objects"; + action = editListAction; + class = "Button PageButton EditListPageButton"; + value = "Edit list"; + useAjax = true; + updateContainerID = d2wContext.idForMainContainer; + dontSubmitForm = true; +} + PageWrapper: WOSwitchComponent { WOComponentName = pageWrapperName; _componentUnroll = true; @@ -105,7 +115,7 @@ RequiredWrapper : ERMODRequiredWrapper { } ShowBottomActionBlock : WOConditional { - condition = d2wContext.showBottomActionBlock; + condition = showBottomActionBlock; } InnerWrapper : WOGenericContainer { @@ -113,6 +123,15 @@ InnerWrapper : WOGenericContainer { class = d2wContext.classForInnerWrapper; } +IsNotEditList : WOConditional { + condition = displayEditList; + negate = true; +} + +IsEditList : WOConditional { + condition = displayEditList; +} + RepetitionUpdateContainer : AjaxUpdateContainer { elementName = "div"; id = idForRepetitionContainer; @@ -125,6 +144,12 @@ ToManyListRepetition: WOSwitchComponent { updateContainerID = idForRepetitionContainer; } +EditListComponent: ERXD2WList { + pageConfiguration = d2wContext.editListEmbeddedConfigurationName; + action = saveAction; + dataSource = editListDataSource; +} + ToOneListRepetition: WOSwitchComponent { WOComponentName = d2wContext.toOneRepetitionComponentName; d2wContext = localContext; diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.html b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.html new file mode 100644 index 00000000000..69b5aed8614 --- /dev/null +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.html @@ -0,0 +1,39 @@ + + + + + + +
      +
    • +
    +
    +
    + + +
    + + + + + + + + +
      +
    • +
    • +
    +
    + + +
    + + + + +
    + + +
    +
    diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod new file mode 100644 index 00000000000..ef8f8af7edd --- /dev/null +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod @@ -0,0 +1,247 @@ +PageWrapper: WOSwitchComponent { + WOComponentName = d2wContext.pageWrapperName; + _componentUnroll = true; + _unroll = true; +} + +RequiredWrapper : ERMODRequiredWrapper { + d2wContext = d2wContext; + watchedContainerID = d2wContext.idForRepetitionContainer; +} + + +ShowTopActionBlock : WOConditional { + condition = d2wContext.showTopActionBlock; +} + + +TopActionBlock : WOGenericContainer { + elementName = "div"; + class = d2wContext.classForTopActionBlock; +} + + +ShouldShowDefaultPageButtons : WOConditional { + condition = d2wContext.shouldShowDefaultPageButtons; +} + +ShowCancel: WOConditional { + condition = showCancel; +} + +ReturnButton: CCSmartAjaxButton { + alt = "Returns to the previous page"; + value = d2wContext.returnButtonLabel; + action = backAction; + class = "Button PageButton ReturnPageButton"; + useAjax = d2wContext.useAjaxControlsWhenEmbedded; + updateContainerID = d2wContext.idForParentMainContainer; +} + +SecondaryActionBlock: ERMODSecondaryActionButtons { + d2wContext = d2wContext; + dataSource = dataSource; + displayGroup = displayGroup; +} + +InnerWrapper : WOGenericContainer { + elementName = "div"; + class = d2wContext.classForInnerWrapper; +} + +ErrorBlock : ERMODErrorBlock { + d2wContext = d2wContext; + errorMessage = errorMessage; + errorMessages = errorMessages; +} + +RepetitionUpdateContainer : AjaxUpdateContainer { + elementName = "div"; + id = d2wContext.idForRepetitionContainer; + onSuccess = updateBottomActionBlock; +} + +ShowBottomActionBlock : WOConditional { + condition = d2wContext.showBottomActionBlock; +} + +BottomActionBlock : AjaxUpdateContainer { + class = d2wContext.classForBottomActionBlock; + id = idForBottomActionBlock; +} + +CancelButton: CCSmartAjaxButton { + alt = "Reverts your changes"; + value = d2wContext.cancelButtonLabel; + action = cancel; + dontSubmitForm = true; + class = "Button PageButton CancelPageButton"; + useAjax = false; + updateContainerID = d2wContext.idForParentMainContainer; +} + +SubmitChanges: CCSmartAjaxButton { + action = saveAction; + alt = "Saves your changes"; + value = d2wContext.saveButtonLabel; + class = "Button PageButton SubmitPageButton"; + useAjax = false; + updateContainerID = d2wContext.idForParentMainContainer; +} + +ShowBottomBatchNavBar : WOConditional { + condition = d2wContext.showBottomBatchNavBar; +} + +BottomNavBar : WOGenericContainer { + elementName = "div"; + class = d2wContext.classForBottomNavBar; +} + +NavigationBar: WOSwitchComponent { + WOComponentName = d2wContext.batchNavigationBarComponentName; + displayGroup = displayGroup; + d2wContext = d2wContext; + updateContainerID = d2wContext.idForRepetitionContainer; +} + + + + + + + + +CancelActiveImage: WOActiveImage { + action = cancel; + alt = "Cancels your changes"; + filename = "CancelMetalBtn.gif"; + framework = "JavaDirectToWeb"; +} + +ClearChangesButton: WOSubmitButton { + value = "Clear Changes"; + action = clearMassChangeEO; +} + +EditForm: WOForm { + enctype = d2wContext.formEncoding; + name = "EditForm"; + multipleSubmit = true; +} + +EmptyMessageComponent: WOSwitchComponent { + WOComponentName = d2wContext.emptyListComponentName; + d2wContext = d2wContext; +} + +Errors: ERXErrorDictionaryPanel { + errorMessages = errorMessages; + extraErrorMessage = errorMessage; + shouldShowNewLineAbove = true; + shouldShowNewLineBelow = true; +} + +ErrorsForEntity: ERXErrorDictionaryPanel { + errorMessages = currentErrorDictionary; +} + +Help: ERDDebuggingHelp { + d2wContext = d2wContext; +} + +HiddenField: WOHiddenField { + value = dummy; +} + +HideReturnOnSelect: WOConditional { + _unroll = true; + condition = isSelecting; + negate = true; +} + +ListEmpty: WOConditional { + condition = isListEmpty; +} + +ListNotEmpty: WOConditional { + condition = isListEmpty; + negate = true; +} + +MassChangeRepetition: WOSwitchComponent { + WOComponentName = d2wContext.repetitionComponentName; + d2wContext = d2wContextForMassChangeEO; + displayGroup = massChangeDisplayGroup; +} + +ListPageRepetition: WOSwitchComponent { + WOComponentName = d2wContext.repetitionComponentName; + d2wContext = localContext; + displayGroup = displayGroup; +} + +ListTable: WOGenericContainer { + _unroll = true; + bgcolor = d2wContext.backgroundColorForTable; + border = 0; + cellpadding = 0; + cellspacing = 0; + elementName = "Table"; +} + +NavBar: ERXBatchNavigationBarInForm { + bgcolor = backgroundColorForTable; + displayGroup = displayGroup; + objectName = d2wContext.displayNameForEntity; + textColor = d2wContext.textColor; + d2wContext = d2wContext; + +} + +PropagateButton: WOSubmitButton { + value = "Propagate Changes"; + action = propagateChangesToVisibleObjects; +} + +PropagateDebug: WOString { + value = propagateChangesDetails; + escapeHTML = false; +} + +ReturnActiveImage: WOActiveImage { + filename = "ReturnMetalBtn.gif"; + framework = "JavaDirectToWeb"; + action = backAction; + alt = "Returns to the previous task."; +} + +SaveActiveImage: WOActiveImage { + action = saveAction; + alt = "Saves your changes"; + filename = "SaveMetalBtn.gif"; + framework = "JavaDirectToWeb"; +} + +ShouldShowBanner: WOConditional { + condition = d2wContext.showBanner; +} + +ShouldShowMassChange: WOConditional { + condition = shouldShowMassChange; +} + +ShouldShowPropagateDebug: WOConditional { + condition = d2wDebuggingEnabled; +} + +ShowCancelOld: WOConditional { + condition = showCancel; +} + +UpdateActiveImage: WOActiveImage { + action = update; + alt = "Updates the current values."; + filename = "UpdateMetalBtn.gif"; + framework = "ERDirectToWeb"; +} diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.woo b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.woo new file mode 100644 index 00000000000..784406628d9 --- /dev/null +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.woo @@ -0,0 +1 @@ +{"WebObjects Release" = "WebObjects 5.0"; encoding = "UTF-8"; variables = {}; } \ No newline at end of file diff --git a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel index 8b0a1764f3c..ddc04830892 100644 --- a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel +++ b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel @@ -91,6 +91,7 @@ {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded Query configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "queryEmbeddedConfigurationName"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded Create configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "createEmbeddedConfigurationName"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded select configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "selectEmbeddedConfigurationName"; "value" = ""; }; }, + {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded edit list configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "editListEmbeddedConfigurationName"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded Edit Relationship configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "editRelationshipEmbeddedConfigurationName"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Default repetition component for List pages"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOOrQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "list"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "select"; }, {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "edit"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "subTask"; "selectorName" = "isEqualTo"; "value" = "list"; }); }); }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "repetitionComponentName"; "value" = "ERMDSimpleListPageRepetition"; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Default display property keys for Lists and EditRelationship pages"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOOrQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "list"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "select"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "editRelationship"; }); }); }; "rhs" = {"class" = "com.webobjects.directtoweb.DefaultAssignment"; "keyPath" = "displayPropertyKeys"; "value" = "defaultPropertyKeysFromEntityWithoutRelationships"; }; }, @@ -118,6 +119,7 @@ {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "wizardBannerComponentName"; "value" = "ERMDWizardDetailedBanner"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForCompactListPage"; "value" = "ERMODCompactListPage"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForListComparePage"; "value" = "ERMODListComparePage"; }; }, + {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForEditableList"; "value" = "ERMODEditableListTemplate"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForGroupingListPage"; "value" = "ERMODGroupingListPage"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "batchNavigationBarComponentName"; "value" = "ERMD2WBatchNavigationBar"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForCompactInspectPage"; "value" = "ERMODCompactInspectPage"; }; }, @@ -133,7 +135,9 @@ {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForPrinterFriendlyInspectPage"; "value" = "ERMODPrinterFriendlyInspectPage"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Default modern button component names"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "propertyKey"; "selectorName" = "isEqualTo"; "value" = "removeRelatedAction"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "componentName"; "value" = "ERMDRemoveRelatedButton"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Hide cancel button on embedded inspect pages"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "parentPageConfiguration"; "selectorName" = "isLike"; "value" = "Inspect*"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "shouldShowCancelButton"; "value" = "false"; }; }, + {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "EditListEmbedded*"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "showBottomActionBlock"; "value" = "true"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForGroupingPrinterFriendlyListPage"; "value" = "ERMODGroupingPrinterFriendlyListPage"; }; }, + {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "EditListEmbedded*"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "headerComponentName"; "value" = "ERXEmptyComponent"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "List repetition components for edit relationship page"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "editRelationship"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "toManyRepetitionComponentName"; "value" = "ERMDSimpleListPageRepetition"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "List repetition components for edit relationship page"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "editRelationship"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "toOneRepetitionComponentName"; "value" = "ERMDReducedListPageRepetition"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Not currently used"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "propertyType"; "selectorName" = "isEqualTo"; "value" = "r"; }); }; "rhs" = {"class" = "er.directtoweb.ERDDelayedLocalizedAssignment"; "keyPath" = "emptyListMessage"; "value" = "ERMDEmptyListMessage.emptyEmbeddedListMessage"; }; }, diff --git a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt index 338d724c45b..3486df79cc9 100644 --- a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt +++ b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt @@ -90,6 +90,7 @@ 10 : look = 'ERModernLook' => queryEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : look = 'ERModernLook' => createEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : look = 'ERModernLook' => selectEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], + 10 : look = 'ERModernLook' => editListEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : look = 'ERModernLook' => editRelationshipEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : (look = 'ERModernLook' and (task = 'list' or task = 'select' or (task = 'edit' and subTask = 'list'))) => repetitionComponentName = "ERMDSimpleListPageRepetition" [com.webobjects.directtoweb.Assignment], 10 : (look = 'ERModernLook' and (task = 'list' or task = 'select' or task = 'editRelationship')) => displayPropertyKeys = "defaultPropertyKeysFromEntityWithoutRelationships" [com.webobjects.directtoweb.DefaultAssignment], @@ -117,6 +118,7 @@ 20 : look = 'ERModernLook' => wizardBannerComponentName = "ERMDWizardDetailedBanner" [com.webobjects.directtoweb.Assignment], 20 : look = 'ERModernLook' => templateNameForCompactListPage = "ERMODCompactListPage" [com.webobjects.directtoweb.Assignment], 20 : look = 'ERModernLook' => templateNameForListComparePage = "ERMODListComparePage" [com.webobjects.directtoweb.Assignment], + 20 : look = 'ERModernLook' => templateNameForEditableList = "ERMODEditableListTemplate" [com.webobjects.directtoweb.Assignment], 20 : look = 'ERModernLook' => templateNameForGroupingListPage = "ERMODGroupingListPage" [com.webobjects.directtoweb.Assignment], 20 : look = 'ERModernLook' => batchNavigationBarComponentName = "ERMD2WBatchNavigationBar" [com.webobjects.directtoweb.Assignment], 20 : look = 'ERModernLook' => templateNameForCompactInspectPage = "ERMODCompactInspectPage" [com.webobjects.directtoweb.Assignment], @@ -132,7 +134,9 @@ 20 : look = 'ERModernLook' => templateNameForPrinterFriendlyInspectPage = "ERMODPrinterFriendlyInspectPage" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and propertyKey = 'removeRelatedAction') => componentName = "ERMDRemoveRelatedButton" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and parentPageConfiguration like 'Inspect*') => shouldShowCancelButton = "false" [com.webobjects.directtoweb.BooleanAssignment], + 20 : (look = 'ERModernLook' and pageConfiguration like 'EditListEmbedded*') => showBottomActionBlock = "true" [com.webobjects.directtoweb.BooleanAssignment], 20 : look = 'ERModernLook' => templateNameForGroupingPrinterFriendlyListPage = "ERMODGroupingPrinterFriendlyListPage" [com.webobjects.directtoweb.Assignment], + 20 : (look = 'ERModernLook' and pageConfiguration like 'EditListEmbedded*') => headerComponentName = "ERXEmptyComponent" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and task = 'editRelationship') => toManyRepetitionComponentName = "ERMDSimpleListPageRepetition" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and task = 'editRelationship') => toOneRepetitionComponentName = "ERMDReducedListPageRepetition" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and propertyType = 'r') => emptyListMessage = "ERMDEmptyListMessage.emptyEmbeddedListMessage" [er.directtoweb.ERDDelayedLocalizedAssignment], diff --git a/Frameworks/D2W/ERModernLook/Sources/er/modern/look/components/ERMODEditableListTemplate.java b/Frameworks/D2W/ERModernLook/Sources/er/modern/look/components/ERMODEditableListTemplate.java new file mode 100644 index 00000000000..d28e226aeab --- /dev/null +++ b/Frameworks/D2W/ERModernLook/Sources/er/modern/look/components/ERMODEditableListTemplate.java @@ -0,0 +1,76 @@ +package er.modern.look.components; + +import com.webobjects.appserver.WOComponent; +import com.webobjects.appserver.WOContext; + +import er.ajax.AjaxUpdateContainer; +import er.directtoweb.pages.ERD2WEditableListPage; +import er.extensions.foundation.ERXStringUtilities; + +/** + * List page for editing all items in the list.
    + * See {@link ERD2WEditableListPage} + * + * @binding backAction + * @binding dataSource + * @binding defaultSortKey + * @binding isEntityInspectable + * @binding isEntityReadOnly + * @binding isListEmpty + * @binding isSelecting + * @binding listSize + * @binding nextPage + * @binding object + * @binding showCancel + * @d2wKey formEncoding + * @d2wKey emptyListComponentName + * @d2wKey repetitionComponentName + * @d2wKey backgroundColorForTable + * @d2wKey displayNameForEntity + * @d2wKey textColor + * @d2wKey pageWrapperName + * @d2wKey showBanner + */ +public class ERMODEditableListTemplate extends ERD2WEditableListPage { + /** + * Do I need to update serialVersionUID? See section 5.6 Type Changes + * Affecting Serialization on page 51 of the Java Object + * Serialization Spec + */ + private static final long serialVersionUID = 1L; + + public ERMODEditableListTemplate(WOContext context) { + super(context); + } + + /* + * Overridden to make it do the right thing when embedded. + */ + public WOComponent cancel(){ + super.cancel(); + return nextPage(); + } + + public String idForBottomActionBlock() { + String idForBottomActionBlock = (String) d2wContext().valueForKey( + "idForRepetitionContainer"); + if (!ERXStringUtilities.stringIsNullOrEmpty(idForBottomActionBlock)) { + idForBottomActionBlock = "BAB" + + idForBottomActionBlock + .substring(3, idForBottomActionBlock.length()); + } + // use data source hash to generate globally unique ID + idForBottomActionBlock = idForBottomActionBlock.concat("_" + + String.valueOf(Math.abs(dataSource().hashCode()))); + return idForBottomActionBlock; + } + + public void updateBottomActionBlock() { + // force update of bottom action block to keep controller button + // functional + AjaxUpdateContainer + .safeUpdateContainerWithID(idForBottomActionBlock(), context()); + } + +} diff --git a/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java b/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java index 0f2bb21265c..958e65fa0fc 100644 --- a/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java +++ b/Frameworks/D2W/ERModernLook/Sources/er/modern/look/pages/ERMODEditRelationshipPage.java @@ -88,6 +88,7 @@ public interface Keys extends ERD2WEditRelationshipPage.Keys { private EOEnterpriseObject _objectToAddToRelationship; private String _relationshipKey; private EODataSource _dataSource; + private EODataSource _editListDataSource; private EODataSource _selectDataSource; private WODisplayGroup _relationshipDisplayGroup; public boolean isRelationshipToMany; @@ -138,6 +139,32 @@ public WOComponent newObjectAction() { setInlineTaskSafely("create"); return null; } + + /** + * Turn the list repetition into an editable list, to allow simultaneous editing of all objects. + */ + public WOComponent editListAction() { + setInlineTaskSafely("editList"); + return null; + } + + + /** + * The data source for the edit list uses a nested EC, so the relationship + * page's cancel button remains functional. + * + * @return a data source for the embedded edit list + */ + public EODataSource editListDataSource() { + if (_editListDataSource == null) { + EOEditingContext ec = masterObject().editingContext(); + EOEditingContext childEc = ERXEC.newEditingContext(ec); + _editListDataSource = ERXEOControlUtilities.dataSourceForObjectAndKey( + EOUtilities.localInstanceOfObject(childEc, masterObject()), + relationshipKey()); + } + return _editListDataSource; + } /** * Performs the queryAction. Sets the inline task to 'list' @@ -240,6 +267,13 @@ public boolean displayNew() { public boolean displayList() { return "list".equals(inlineTask()); } + + /** + * Controls whether the edit list page is displayed. + */ + public boolean displayEditList() { + return "editList".equals(inlineTask()); + } /** * Returns the name of the current inline page configuration @@ -444,6 +478,10 @@ public String inlineTask() { return (String)d2wContext().valueForKey(Keys.inlineTask); } + public String subTask() { + return (String)d2wContext().valueForKey(Keys.subTask); + } + public void setInlineTask(String task) { // noop } @@ -452,6 +490,10 @@ public void setInlineTaskSafely(String task) { d2wContext().takeValueForKey(task, Keys.inlineTask); } + public void setSubTaskSafely(String subTask) { + d2wContext().takeValueForKey(subTask, Keys.subTask); + } + public String relationshipKey() { return _relationshipKey; } @@ -582,4 +624,15 @@ public String idForRepetitionContainer() { return repetitionContainerID; } + public Boolean showBottomActionBlock() { + Boolean showBottomActionBlock = ERXValueUtilities.booleanValue(d2wContext() + .valueForKey("showBottomActionBlock")); + if (displayEditList()) { + // hide the bottom action block when + // showing the inline edit list + showBottomActionBlock = Boolean.FALSE; + } + return showBottomActionBlock; + } + } From 1696a0bb22bcc7d7993f207ede248a23a56ea444 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Mon, 14 Sep 2015 18:41:53 +0200 Subject: [PATCH 4/9] Fix documentation bug. --- .../components/repetitions/ERMDNestingListPageRepetition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java index 5e9fe78d0f4..fe42b91ae86 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java +++ b/Frameworks/D2W/ERModernDirectToWeb/Sources/er/modern/directtoweb/components/repetitions/ERMDNestingListPageRepetition.java @@ -36,7 +36,7 @@ * @d2wKey classForObjectTableHeader * @d2wKey updateContainerID * @d2wKey baseClassForObjectRow - * @d2wKey recursiveRelationship + * @d2wKey nestedRelationship * * @author fpeters */ From cfdeacd3ca82740ea5461d0f03df42ebcb3a6e07 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Mon, 14 Sep 2015 18:42:06 +0200 Subject: [PATCH 5/9] Don't use inline bindings. --- .../ERMDNestingListPageRepetition.html | 4 ++-- .../ERMDNestingListPageRepetition.wod | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html index f491124fbb9..c404b11e310 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html @@ -45,10 +45,10 @@ - + -   +   diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod index 8a675939dee..512b9b345ad 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod @@ -67,6 +67,17 @@ showNestedRelationshipEditor : WOConditional { condition = showNestedRelationshipEditor; } +NestedRelationshipField : WOGenericContainer { + elementName = "td"; + colspan = columnCount; +} + +HiddenNestedRelationshipField : WOGenericContainer { + elementName = "td"; + colspan = columnCount; + class = "hidden"; +} + NestedRelationshipEditor : WOSwitchComponent { WOComponentName = childContext.componentName; localContext = childContext; From 249a42a1df170aad1c52a01793bde2bc347ea1c8 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Mon, 21 Sep 2015 10:23:53 +0200 Subject: [PATCH 6/9] Hide header component when task is edit and subTask is list. --- Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel | 2 +- Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel b/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel index 31d64d95f04..8806314905a 100644 --- a/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel +++ b/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel @@ -15,7 +15,7 @@ {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Embedded*"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "printerButtonComponentName"; "value" = "ERXEmptyComponent"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "defaultMainPrintStylesheet"; "value" = {"filename" = "default_print_stylesheet.css"; "media" = "print"; }; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "defaultMainScreenStylesheet"; "value" = {"filename" = "default_screen_stylesheet.css"; "media" = "screen"; }; }; }, - {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Embedded*"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isNotEqualTo"; "value" = "editRelationship"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isNotEqualTo"; "value" = "list"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "showHeader"; "value" = "true"; }; }, + {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Embedded*"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isNotEqualTo"; "value" = "editRelationship"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isNotEqualTo"; "value" = "list"; }, {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isNotEqualTo"; "value" = "edit"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "subTask"; "selectorName" = "isNotEqualTo"; "value" = "list"; }); }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "showHeader"; "value" = "true"; }; }, {"author" = "30"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Embedded*"; }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "showBottomBatchCount"; "value" = "true"; }; }, {"author" = "30"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "*Embedded*"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "parentPageConfiguration"; "selectorName" = "isNotEqualTo"; "value" = {"class" = "com.webobjects.foundation.NSKeyValueCoding$Null"; }; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "showBottomActionBlock"; "value" = "true"; }; } ); diff --git a/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel.txt b/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel.txt index c57dd30a4ed..4d4addcbb6d 100644 --- a/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel.txt +++ b/Frameworks/D2W/ERModernDefaultSkin/Resources/d2w.d2wmodel.txt @@ -14,7 +14,7 @@ 20 : pageConfiguration like '*Embedded*' => printerButtonComponentName = "ERXEmptyComponent" [com.webobjects.directtoweb.Assignment], 20 : *true* => defaultMainPrintStylesheet = {"filename" = "default_print_stylesheet.css"; "media" = "print"; } [com.webobjects.directtoweb.Assignment], 20 : *true* => defaultMainScreenStylesheet = {"filename" = "default_screen_stylesheet.css"; "media" = "screen"; } [com.webobjects.directtoweb.Assignment], - 20 : (pageConfiguration like '*Embedded*' and task != 'editRelationship' and task != 'list') => showHeader = "true" [com.webobjects.directtoweb.BooleanAssignment], + 20 : (pageConfiguration like '*Embedded*' and task != 'editRelationship' and task != 'list' and (task != 'edit' and subTask != 'list')) => showHeader = "true" [com.webobjects.directtoweb.BooleanAssignment], 30 : pageConfiguration like '*Embedded*' => showBottomBatchCount = "true" [com.webobjects.directtoweb.BooleanAssignment], 30 : (pageConfiguration like '*Embedded*' and parentPageConfiguration != null) => showBottomActionBlock = "true" [com.webobjects.directtoweb.BooleanAssignment] ) \ No newline at end of file From 463b5bfd4cb605da04a547dab2ca5f75be2bd317 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Mon, 21 Sep 2015 10:24:25 +0200 Subject: [PATCH 7/9] Remove unused definitions from wod. --- .../ERMODEditableListTemplate.wod | 123 +----------------- 1 file changed, 1 insertion(+), 122 deletions(-) diff --git a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod index ef8f8af7edd..494c4f04d49 100644 --- a/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod +++ b/Frameworks/D2W/ERModernLook/Components/Nonlocalized.lproj/ERMODEditableListTemplate.wo/ERMODEditableListTemplate.wod @@ -105,61 +105,11 @@ NavigationBar: WOSwitchComponent { updateContainerID = d2wContext.idForRepetitionContainer; } - - - - - - - -CancelActiveImage: WOActiveImage { - action = cancel; - alt = "Cancels your changes"; - filename = "CancelMetalBtn.gif"; - framework = "JavaDirectToWeb"; -} - -ClearChangesButton: WOSubmitButton { - value = "Clear Changes"; - action = clearMassChangeEO; -} - -EditForm: WOForm { - enctype = d2wContext.formEncoding; - name = "EditForm"; - multipleSubmit = true; -} - EmptyMessageComponent: WOSwitchComponent { WOComponentName = d2wContext.emptyListComponentName; d2wContext = d2wContext; } -Errors: ERXErrorDictionaryPanel { - errorMessages = errorMessages; - extraErrorMessage = errorMessage; - shouldShowNewLineAbove = true; - shouldShowNewLineBelow = true; -} - -ErrorsForEntity: ERXErrorDictionaryPanel { - errorMessages = currentErrorDictionary; -} - -Help: ERDDebuggingHelp { - d2wContext = d2wContext; -} - -HiddenField: WOHiddenField { - value = dummy; -} - -HideReturnOnSelect: WOConditional { - _unroll = true; - condition = isSelecting; - negate = true; -} - ListEmpty: WOConditional { condition = isListEmpty; } @@ -169,79 +119,8 @@ ListNotEmpty: WOConditional { negate = true; } -MassChangeRepetition: WOSwitchComponent { - WOComponentName = d2wContext.repetitionComponentName; - d2wContext = d2wContextForMassChangeEO; - displayGroup = massChangeDisplayGroup; -} - ListPageRepetition: WOSwitchComponent { WOComponentName = d2wContext.repetitionComponentName; - d2wContext = localContext; - displayGroup = displayGroup; -} - -ListTable: WOGenericContainer { - _unroll = true; - bgcolor = d2wContext.backgroundColorForTable; - border = 0; - cellpadding = 0; - cellspacing = 0; - elementName = "Table"; -} - -NavBar: ERXBatchNavigationBarInForm { - bgcolor = backgroundColorForTable; + d2wContext = d2wContext; displayGroup = displayGroup; - objectName = d2wContext.displayNameForEntity; - textColor = d2wContext.textColor; - d2wContext = d2wContext; - -} - -PropagateButton: WOSubmitButton { - value = "Propagate Changes"; - action = propagateChangesToVisibleObjects; -} - -PropagateDebug: WOString { - value = propagateChangesDetails; - escapeHTML = false; -} - -ReturnActiveImage: WOActiveImage { - filename = "ReturnMetalBtn.gif"; - framework = "JavaDirectToWeb"; - action = backAction; - alt = "Returns to the previous task."; -} - -SaveActiveImage: WOActiveImage { - action = saveAction; - alt = "Saves your changes"; - filename = "SaveMetalBtn.gif"; - framework = "JavaDirectToWeb"; -} - -ShouldShowBanner: WOConditional { - condition = d2wContext.showBanner; -} - -ShouldShowMassChange: WOConditional { - condition = shouldShowMassChange; -} - -ShouldShowPropagateDebug: WOConditional { - condition = d2wDebuggingEnabled; -} - -ShowCancelOld: WOConditional { - condition = showCancel; -} - -UpdateActiveImage: WOActiveImage { - action = update; - alt = "Updates the current values."; - filename = "UpdateMetalBtn.gif"; - framework = "ERDirectToWeb"; } From 270153e49c522ecfb96cccb1bbc7a1bb3e2941b7 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Mon, 21 Sep 2015 10:58:21 +0200 Subject: [PATCH 8/9] Prevent ERMDInspectPage from getting set as repetitionComponentName, when using an EditList* configuration. Remove rule that hid the header for EditList* configurations, as this is now handled via ERModernDefaultSkin. --- Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel | 7 +++---- Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel index ddc04830892..1190e8abb2e 100644 --- a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel +++ b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel @@ -83,12 +83,12 @@ {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultCSSAssignment"; "keyPath" = "classForEmbeddedInspectBlock"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultCSSAssignment"; "keyPath" = "idForParentPageConfiguration"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultCSSAssignment"; "keyPath" = "classForAttributeRepetitionWrapper"; "value" = ""; }; }, - {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Not sure if this key is used in this way"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "smartRelationship.isToMany"; "selectorName" = "isEqualTo"; "value" = {"class" = "java.lang.Number"; "value" = "1"; }; }); }; "rhs" = {"class" = "er.directtoweb.ERDKeyValueAssignment"; "keyPath" = "embeddedPageConfiguration"; "value" = "listEmbeddedConfigurationName"; }; }, - {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Default Inspect/Edit attribute repetition"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOOrQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "inspect"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "edit"; }); }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "repetitionComponentName"; "value" = "ERMDInspectPageRepetition"; }; }, - {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Not sure if this key is used in this way"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "smartRelationship.isToMany"; "selectorName" = "isEqualTo"; "value" = {"class" = "java.lang.Number"; "value" = "0"; }; }); }; "rhs" = {"class" = "er.directtoweb.ERDKeyValueAssignment"; "keyPath" = "embeddedPageConfiguration"; "value" = "inspectEmbeddedConfigurationName"; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Default actions for List pages"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "list"; }); }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultActionAssignment"; "keyPath" = "defaultActions"; "value" = ""; }; }, + {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Not sure if this key is used in this way"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "smartRelationship.isToMany"; "selectorName" = "isEqualTo"; "value" = {"class" = "java.lang.Number"; "value" = "1"; }; }); }; "rhs" = {"class" = "er.directtoweb.ERDKeyValueAssignment"; "keyPath" = "embeddedPageConfiguration"; "value" = "listEmbeddedConfigurationName"; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded Pick configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "pickEmbeddedConfigurationName"; "value" = ""; }; }, + {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Not sure if this key is used in this way"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "smartRelationship.isToMany"; "selectorName" = "isEqualTo"; "value" = {"class" = "java.lang.Number"; "value" = "0"; }; }); }; "rhs" = {"class" = "er.directtoweb.ERDKeyValueAssignment"; "keyPath" = "embeddedPageConfiguration"; "value" = "inspectEmbeddedConfigurationName"; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded Query configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "queryEmbeddedConfigurationName"; "value" = ""; }; }, + {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Default Inspect/Edit attribute repetition"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOOrQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "inspect"; }, {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "edit"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "subTask"; "selectorName" = "isNotEqualTo"; "value" = "list"; }); }); }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "repetitionComponentName"; "value" = "ERMDInspectPageRepetition"; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded Create configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "createEmbeddedConfigurationName"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded select configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "selectEmbeddedConfigurationName"; "value" = ""; }; }, {"author" = "10"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Embedded edit list configuration name"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment"; "keyPath" = "editListEmbeddedConfigurationName"; "value" = ""; }; }, @@ -137,7 +137,6 @@ {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Hide cancel button on embedded inspect pages"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "parentPageConfiguration"; "selectorName" = "isLike"; "value" = "Inspect*"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "shouldShowCancelButton"; "value" = "false"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "EditListEmbedded*"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.BooleanAssignment"; "keyPath" = "showBottomActionBlock"; "value" = "true"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "templateNameForGroupingPrinterFriendlyListPage"; "value" = "ERMODGroupingPrinterFriendlyListPage"; }; }, - {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "pageConfiguration"; "selectorName" = "isLike"; "value" = "EditListEmbedded*"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "headerComponentName"; "value" = "ERXEmptyComponent"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "List repetition components for edit relationship page"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "editRelationship"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "toManyRepetitionComponentName"; "value" = "ERMDSimpleListPageRepetition"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "List repetition components for edit relationship page"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "task"; "selectorName" = "isEqualTo"; "value" = "editRelationship"; }); }; "rhs" = {"class" = "com.webobjects.directtoweb.Assignment"; "keyPath" = "toOneRepetitionComponentName"; "value" = "ERMDReducedListPageRepetition"; }; }, {"author" = "20"; "class" = "com.webobjects.directtoweb.Rule"; "documentation" = "Not currently used"; "lhs" = {"class" = "com.webobjects.eocontrol.EOAndQualifier"; "qualifiers" = ({"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "look"; "selectorName" = "isEqualTo"; "value" = "ERModernLook"; }, {"class" = "com.webobjects.eocontrol.EOKeyValueQualifier"; "key" = "propertyType"; "selectorName" = "isEqualTo"; "value" = "r"; }); }; "rhs" = {"class" = "er.directtoweb.ERDDelayedLocalizedAssignment"; "keyPath" = "emptyListMessage"; "value" = "ERMDEmptyListMessage.emptyEmbeddedListMessage"; }; }, diff --git a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt index 3486df79cc9..2c617e5d28e 100644 --- a/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt +++ b/Frameworks/D2W/ERModernLook/Resources/d2w.d2wmodel.txt @@ -83,11 +83,11 @@ 10 : look = 'ERModernLook' => idForParentPageConfiguration = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultCSSAssignment], 10 : look = 'ERModernLook' => classForAttributeRepetitionWrapper = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultCSSAssignment], 10 : (look = 'ERModernLook' and smartRelationship.isToMany = 1) => embeddedPageConfiguration = "listEmbeddedConfigurationName" [er.directtoweb.ERDKeyValueAssignment], - 10 : (look = 'ERModernLook' and (task = 'inspect' or task = 'edit')) => repetitionComponentName = "ERMDInspectPageRepetition" [com.webobjects.directtoweb.Assignment], 10 : (look = 'ERModernLook' and smartRelationship.isToMany = 0) => embeddedPageConfiguration = "inspectEmbeddedConfigurationName" [er.directtoweb.ERDKeyValueAssignment], 10 : (look = 'ERModernLook' and task = 'list') => defaultActions = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultActionAssignment], 10 : look = 'ERModernLook' => pickEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : look = 'ERModernLook' => queryEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], + 10 : (look = 'ERModernLook' and (task = 'inspect' or (task = 'edit' and subTask != 'list'))) => repetitionComponentName = "ERMDInspectPageRepetition" [com.webobjects.directtoweb.Assignment], 10 : look = 'ERModernLook' => createEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : look = 'ERModernLook' => selectEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], 10 : look = 'ERModernLook' => editListEmbeddedConfigurationName = "" [er.modern.directtoweb.assignments.defaults.ERMDDefaultConfigurationNameAssignment], @@ -136,7 +136,6 @@ 20 : (look = 'ERModernLook' and parentPageConfiguration like 'Inspect*') => shouldShowCancelButton = "false" [com.webobjects.directtoweb.BooleanAssignment], 20 : (look = 'ERModernLook' and pageConfiguration like 'EditListEmbedded*') => showBottomActionBlock = "true" [com.webobjects.directtoweb.BooleanAssignment], 20 : look = 'ERModernLook' => templateNameForGroupingPrinterFriendlyListPage = "ERMODGroupingPrinterFriendlyListPage" [com.webobjects.directtoweb.Assignment], - 20 : (look = 'ERModernLook' and pageConfiguration like 'EditListEmbedded*') => headerComponentName = "ERXEmptyComponent" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and task = 'editRelationship') => toManyRepetitionComponentName = "ERMDSimpleListPageRepetition" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and task = 'editRelationship') => toOneRepetitionComponentName = "ERMDReducedListPageRepetition" [com.webobjects.directtoweb.Assignment], 20 : (look = 'ERModernLook' and propertyType = 'r') => emptyListMessage = "ERMDEmptyListMessage.emptyEmbeddedListMessage" [er.directtoweb.ERDDelayedLocalizedAssignment], From 5a7643071e34bd75a11c829760bbe7e0c640a235 Mon Sep 17 00:00:00 2001 From: Fabian Peters Date: Tue, 22 Sep 2015 13:44:09 +0200 Subject: [PATCH 9/9] Nest the table header row inside of the objects repetition. This enables access to the first object when rendering the table header, which in turn allows for displayPropertyKeys rules that depend on an object instance. --- .../ERMDNestingListPageRepetition.html | 22 ++++++++++--------- .../ERMDNestingListPageRepetition.wod | 5 +++++ .../ERMDSimpleListPageRepetition.html | 22 ++++++++++--------- .../ERMDSimpleListPageRepetition.wod | 5 +++++ 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html index c404b11e310..9a222294e8f 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.html @@ -1,18 +1,20 @@ - -   - - - - - + + + +   + + + + + + + +   -   - - diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod index 512b9b345ad..7987dd6cdd9 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDNestingListPageRepetition.wo/ERMDNestingListPageRepetition.wod @@ -29,6 +29,11 @@ ObjectsRepetition: WORepetition { eoSupport = true; } +IsRenderTableHeader : ERXEqualConditional { + value1 = rowIndex; + value2 = 0; +} + LeftAction: WOSwitchComponent { WOComponentName = d2wContext.componentName; localContext = d2wContext; diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.html b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.html index de7d6588753..f23c6ad2a99 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.html +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.html @@ -1,18 +1,20 @@ - -   - - - - - + + + +   + + + + + + + +   -   - - diff --git a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.wod b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.wod index 26dae16242b..d8f7ae0fe2d 100644 --- a/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.wod +++ b/Frameworks/D2W/ERModernDirectToWeb/Components/Nonlocalized.lproj/ERMDSimpleListPageRepetition.wo/ERMDSimpleListPageRepetition.wod @@ -31,6 +31,11 @@ ObjectsRepetition: WORepetition { eoSupport = true; } +IsRenderTableHeader : ERXEqualConditional { + value1 = rowIndex; + value2 = 0; +} + LeftAction: WOSwitchComponent { WOComponentName = d2wContext.componentName; localContext = d2wContext;