| Summary: | IndexOutOfBoundsException in gallery sample | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Konstantin Komissarchik <konstantin> |
| Component: | Sapphire | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ling.hao |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Konstantin Komissarchik
The initial fix is to adjust xml binding specification: The following change is necessary to the Name property in IValuePropertyActionsGalleryReference and IValuePropertyActionsGalleryEntity. Original: @XmlBinding( path = "" ) Fix: @XmlValueBinding( path = "", removeNodeOnSetIfNull = false ) Explanation of the problem: What’s going on is that default xml value binding will remove bound XML node when the property is set to null. This is generally appropriate, but in this case the property is bound to the same XML element as its parent model element (path="" specification). Removing the xml element causes havoc for the parent model element. Leaving this bug open to track making xml binding smarter to avoid this situation in the first place. Fixed the underlying issue and reverted the workarounds in samples. The real fix was to ignore removeNodeOnSetIfNull setting if path is empty (self reference). Verified. |