2015-08-19 10:15 GMT-03:00 George Gastaldi <ggastald@redhat.com>:Hi Rafael,
Thank you very much. I think we can investigate if that is possible using the Eclipse APIs. If you could open another issue that would be great.Thanks
Em 19/08/2015 09:16, "Rafael Pestano" <rmpestano@gmail.com> escreveu:Hi George, just create it: https://issues.jboss.org/browse/FORGE-2443about selecting more than one file in UiInputMany, should I open another issue or it is the expected behaviour?2015-08-19 2:19 GMT-03:00 George Gastaldi <ggastald@redhat.com>:This definitely looks like a bug. Can you open an issue in our JIRA? I'll have a look asap.
Em 18/08/2015 22:10, "Rafael Pestano" <rmpestano@gmail.com> escreveu:About setting values of UiInputMany I'm trying to add files to an UIInputMany from a DirectoryResource but UIInputMany is not updated, see example:@Inject@WithAttributes(label = "Select Files")private UIInputMany<FileResource<?>> files;@Inject@WithAttributes(label = "Select dir")private UIInput<DirectoryResource> dir;UIOutput out;@Overridepublic void initializeUI(UIBuilder uiBuilder) throws Exception {dir.addValueChangeListener(new ValueChangeListener() {@Overridepublic void valueChanged(ValueChangeEvent event) {List<FileResource<?>> fileList = (List<FileResource<?>>) files.getValue();DirectoryResource selectedDir = (DirectoryResource) event.getNewValue();for (Resource<?> resource : selectedDir.listResources()) {FileResource<?> fileToAdd = resource.reify(FileResource.class);if(fileToAdd != null && fileToAdd.exists() && !fileList.contains(fileToAdd)){fileList.add(fileToAdd);}}//files.setValue(fileList);for (FileResource<?> fileResource : ((List<FileResource<?>>) files.getValue())) {out.out().println(fileResource.getName());}}});uiBuilder.add(dir).add(files);}Although file names are printed in the console the UI is not updated.Also files are not added to fileList until I add a file using UIInputMany, see this 30sec video: http://youtu.be/waJRpyGXIcw2015-08-18 20:04 GMT-03:00 Rafael Pestano <rmpestano@gmail.com>:Also in Eclipse (mars) i just can add a file at a time in UIInputMany.2015-08-18 15:36 GMT-03:00 George Gastaldi <ggastald@redhat.com>:Yes, you can call UIInputMany.setValues or setDefaultValues in the initializeUI method. I'll have a look at the UI behaviorOn Tue, Aug 18, 2015 at 3:30 PM, Rafael Pestano <rmpestano@gmail.com> wrote:I'm using forge 2.17.02015-08-18 15:29 GMT-03:00 Rafael Pestano <rmpestano@gmail.com>:Another question, can I feed/initialize the UIInputMany with values on initializeUI method?2015-08-18 15:24 GMT-03:00 Rafael Pestano <rmpestano@gmail.com>:Hi George,
I'm on Intellij2015-08-18 15:07 GMT-03:00 George Gastaldi <ggastald@redhat.com>:Yes, that's how it should work. What UI are you using? Eclipse?On Tue, Aug 18, 2015 at 3:00 PM, Rafael Pestano <rmpestano@gmail.com> wrote:_______________________________________________it promps the filesystem wizard to pick files but i can only select a single file at a time.Here the way way i'm using it:Hi guys,there is a way to select multiple files at once using UIInputMany?@Inject
@WithAttributes(label = "Select Files")
private UIInputMany<FileResource<?>> files;
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
--
--
--
_______________________________________________
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--
--
_______________________________________________
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--
_______________________________________________
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--
_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev