This is an automated email from the git hooks/post-receive script. New commit to branch feature/9526 in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 9596da19f93d4b4f41bfb74fa9fbb64c9999771a Author: Kevin Morin <morin@codelutin.com> Date: Thu Dec 14 11:50:31 2017 +0100 refs #9526 fix combobox loading --- .../ui/swing/content/demande/TakenByFormUI.css | 2 +- .../swing/content/demande/TakenByFormUIHandler.java | 12 ++---------- .../demande/actions/OpenTakenByFormAction.java | 21 ++++++--------------- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUI.css b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUI.css index 23c45def..a3440599 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUI.css +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUI.css @@ -29,7 +29,7 @@ showReset: true; showDecorator: false; bean: {model}; - property: users; + property: takenBy; selectedItem: { model.getTakenBy() }; } diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUIHandler.java index 1d41605b..cc4fb7a3 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/TakenByFormUIHandler.java @@ -16,19 +16,11 @@ import java.util.Collection; public class TakenByFormUIHandler extends AbstractFaxToMailUIHandler<TakenByFormUIModel, TakenByFormUI> implements Cancelable { @Override - public void beforeInit(TakenByFormUI ui) { - super.beforeInit(ui); - - TakenByFormUIModel model = new TakenByFormUIModel(); - this.ui.setContextValue(model); - } - - @Override - public void afterInit(TakenByFormUI takenByFormUI) { + public void afterInit(TakenByFormUI ui) { initUI(ui); // users - initBeanFilterableComboBox(ui.getTakenByComboBox(), getModel().getUsers(), null); + initBeanFilterableComboBox(ui.getTakenByComboBox(), getModel().getUsers(), getModel().getTakenBy()); } @Override diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java index 88e05c63..22331e26 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/actions/OpenTakenByFormAction.java @@ -26,27 +26,18 @@ public class OpenTakenByFormAction extends AbstractFaxToMailAction<DemandeListUI protected TakenByFormUI frameContent; protected JFrame frame; - protected List<DemandeUIModel> demandsToTake; - public OpenTakenByFormAction(DemandeListUIHandler handler) { super(handler, false); } @Override - public boolean prepareAction() throws Exception { - demandsToTake = getModel().getSelectedEmails(); - return true; - } - - @Override public void doAction() throws Exception { - + List<DemandeUIModel> demandsToTake = getModel().getSelectedEmails(); DemandeUIModel demand = demandsToTake.get(0); - frameContent = new TakenByFormUI(getUI()); - TakenByFormUIModel model = frameContent.getModel(); + TakenByFormUIModel model = new TakenByFormUIModel(); - if (demandsToTake.size()==1){ + if (demandsToTake.size() == 1) { model.setTakenBy(demand.getTakenBy()); } @@ -58,14 +49,14 @@ public class OpenTakenByFormAction extends AbstractFaxToMailAction<DemandeListUI List<FaxToMailUser> users = (List<FaxToMailUser>)mailFolderService.getUsersForFolder(folder.getTopiaId()); model.setUsers(users); - frameContent.setContextValue(model); + getUI().setContextValue(model); + + frameContent = new TakenByFormUI(getUI()); } @Override public void postSuccessAction() { super.postSuccessAction(); - //frameContent.getTakenByComboBox().addItems(frameContent.getModel().getUsers()); - //frameContent.getTakenByComboBox().setSelectedItem(frameContent.getModel().getTakenBy()); frame = getHandler().openModalFrame(frameContent, t("faxtomail.takenby.modalTitle"), new Dimension(300, 30)); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.