Re:
https://github.com/fusesource/fuseide/issues/151
<
https://github.com/fusesource/fuseide/issues/151>
I’m thinking it would be a good idea to break our wizard up into a number of pages.
Page 1:
Provides the following inputs:
camel context path
transformation file name
transformation id
source and target type (no path to definitions though)
Finish enabled (next disabled) if transformation is Java to Java
Layout tweaked to present source type and target type dropdowns in the same row
.e.g. [Source Type] —> [Target Type]
Add “Other” as an option to the types
Page 2:
This page configures the source type. If source type is Java, this page is skipped.
Two options on this page (mutually exclusive):
If the type is XML, XSD, JSON, or JSON Schema, provide browser for file as we do today
If the type is “Other”, the user needs to provide two pieces of data:
select from a drop-down of existing data format definitions (this can be queried from the
config builder)
specify the source class used for the mapping
If target type != Java, then Next is enabled and Finish is disabled. If target type ==
Java, reverse that.
Page 3:
This page configures the target type.
Two options on this page (mutually exclusive):
If the type is XML, XSD, JSON, or JSON Schema, provide browser for file as we do today
If the type is “Other”, the user needs to provide two pieces of data:
select from a drop-down of existing data format definitions (this can be queried from the
config builder)
specify the target class used for the mapping
Finish is enabled once the target configuration is specified.
Another idea I’ve been playing around with is removing support for changing the source and
target types in the editor and instead allowing the user to select the target type in the
wizard. Since changing a source or target type invalidates all mappings anyway, I don’t
think this is much of an inconvenience. It also makes life simpler as we won’t need to
change the Camel config from within the mapper editor any longer to update source/target
types. If we went ahead with this plan, then my comments above about skipping the
source/target pages in the wizard would no longer apply. Instead, we would have a page
where the user had a type browser where they selected the source and target type on each
page.
Hopefully, this all makes sense. If no, let me know. :-)
regards,
keith