I have something like 10 components that have code that's very similar, except for the target that it's applied to and some other minor differences.
For example, I return xml to component1
and component2
that differs in this way:
component 1: event.result.names.name
component 2: event.result.phones.phone
I then bind these to a List
, and the name of that list differs by component.
component 1: nameslist.dataProvider =
component 2: phoneslist.dataProvider =
How do I create a single method that would accept as parameters just the names/pointers/references to the objects I need worked on. For examples nameslist
or phoneslist
as List
or .phones.phone
vs. .names.name
for the structure of the xml returned?