I like this suggestion. I think supporting both the Factory and Injection point are necessary.On Fri, Sep 4, 2015 at 1:55 PM, George Gastaldi <ggastald@redhat.com> wrote:_______________________________________________Based on Antonio's suggestions, I have elaborated 2 proposals:Hello,Antonio Goncalves pointed out in https://issues.jboss.org/browse/FORGE-2331 (also in https://issues.jboss.org/browse/FORGE-2469) that some input configurations could be reused.For example, the targetPackage although is used in several commands, is initialized differently on some commands.What would you think it would be a nice strategy to reuse UIInputComponents?
1) Introduce specializations of UIInput:
Eg: @Inject private TargetPackage targetPackage; (Where TargetPackage extends UIInput<String>)More info here:https://gist.github.com/gastaldi/46b3f38bc38c5efcc0ba2) Move the component creation to utility classes:
eg: @Inject InputFactory factory;and in the initializeUI of the UICommand:
targetPackage = factory.createTargetPackage(builder) ;Of course, we could have a mix of both, but I would like to know your thoughts about each proposal.Best Regards,
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev--
_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev