
|
If you were logged in you would be able to see more operations.
|
|
|
Trails
Created: 24/Apr/08 10:51 AM
Updated: 12/Jul/08 02:44 AM
|
|
| Component/s: |
trails-core
|
| Affects Version/s: |
1.2.0
|
| Fix Version/s: |
1.2.0
|
|
|
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
|
|
Collection Semantics for EditPage miss the mark - not natural
EditPage.JAVA
public boolean cameFromCollection()
{
return getParent() != null;
}
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
|
|
Description
|
Collection Semantics for EditPage miss the mark - not natural
EditPage.JAVA
public boolean cameFromCollection()
{
return getParent() != null;
}
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 |
Show » |
|
It also serves my personal implementation of
http://jira.codehaus.org/browse/TRAILS-129
whose title should be changed to "ObjectReferenceDescriptor needs to support inverse"
I have the sweetest implementation of trails runniing.