Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.0
-
Fix Version/s: 1.2.0
-
Component/s: trails-core
-
Labels:None
-
Environment:XP Pro, apache-maven-2.0.8, eclipse-3.3.1.1, jre-1.5.0_14, ognl-2.7.3-SNAPSHOT, tapestry-4.1.6-SNAPSHOT , MySQL-5.0.45
-
Number of attachments :
Description
Collection Semantics for EditPage miss the mark - not natural
EditPage.JAVA
public boolean cameFromCollection()
All the above method characterizes is that the page is referenced by a delegate page. Has nothing to do with collection. And it seems reasonable to state that it would only be useful for the root case.
Granted, yes trails may need to check for this.
But more checks are warranted, like a real natural check for collection or a reference?
Here is an appropriate implementation
// the patch
public boolean cameFromCollection()
{ return (getAssociationDescriptor() instanceof CollectionDescriptor); }
// optional
public boolean isReferencedByParentPage()
{ return getParent() != null; }
These aspects can be worked into the dependent logic as needed