Community
Participate
Working Groups
DelimitedListBindingImpl provides an easy way to implement lists which are backed by a delimited string, but it currently provides no way to handle a more complex use cases where the extracted string tokens should map to more than one property. Consider the following string: abc:3.5;foo:4.3;xyz:1.2 The list delimiter is ';', which gives us a list of model elements composed around "abc:3.5", "foo:4.3" and "zyz:1.2" strings. No suppose we wanted to further break up those strings on ':' and access those parts via two separate properties. The DelimitedListBindingImpl API does not allow that because it is impossible to provide a customized implementation of the resource constructed for list entries. Proposed API changes: 1. Rename DelimitedListBindingImpl.Entry to DelimitedListBindingImpl.ListEntryResource and make that class public and abstract. 2. Factor out code that makes single-property assumptions into a separate DefaultListEntryResource class. This class can remain private. 3. Add new protected method DelimitedListBindingImpl.createListEntryResource() which should return DefaultListEntryResource by default, but can be overridden to supply a custom implementation for ListEntryResource.
Enhancement implemented.
Verified API changes.