Ticket #716 (closed defect: fixed)
ContainerHierarchicalWrapper MethodInvocationException
| Reported by: | Artur Signell | Owned by: | Jani Laakso |
|---|---|---|---|
| Priority: | blocker | Milestone: | 4.0.2 |
| Component: | Server-side framework | Version: | 4.0.1 |
| Keywords: | Cc: | ||
| Known Issue description: | Relocating an item to root node is not possible with ContainerHierarchicalWrapper. | ||
| Hours estimate: | Deadline (dd.mm.yyyy): | ||
| Known Issue version (since): | 4.0.0 | Known Issue title: | ContainerHierarchicalWrapper setParent at root level issue |
| Hours done: | Depends to: | ||
| Affects documentation: | no | ||
| Known Issue workaround: | If you need to relocate an item to root node, create new Container. | ||
| Affects release notes: | yes | Contract: | |
Description
setParent fails at the following line if newParentId is null
// Check if no change is necessary
if ((newParentId == null && oldParentId == null)
|| newParentId.equals(oldParentId))
return true;
so it is impossible to relocate an item to root level!
Simple fix:
if ((newParentId == null && oldParentId == null)
|| (newParentId != null && newParentId.equals(oldParentId)))
return true;
Change History
Note: See
TracTickets for help on using
tickets.
