예제 #1
0
 private void addPlatformValueChangeHandler() {
   platformValueListBox.addValueChangeHandler(
       new ValueChangeHandler<Platform>() {
         @Override
         public void onValueChange(ValueChangeEvent<Platform> valueChangeEvent) {
           Platform platform = valueChangeEvent.getValue();
           if (!platform.equals(EmptyObject.getEmptyPlatform())
               || !articlePfValueListBox.getValue().equals(EmptyObject.getEmptyArticlePf())) {
             int index = platformValueListBox.getIndex();
             int size = platformValueListBox.getListSize();
             arrowStatus(index, size);
             presenter.getEventBus().searchForArticlePf(platform, false);
             platformValueListBox.setFocus(false);
             lastPlatformChoice = platform;
           } else {
             presenter.getEventBus().showBothBoxAtAllMessage();
             setPlatformValue(lastPlatformChoice);
           }
         }
       });
 }
예제 #2
0
 private void addArticleValueChangeHandler() {
   articlePfValueListBox.addValueChangeHandler(
       new ValueChangeHandler<ArticlePf>() {
         @Override
         public void onValueChange(ValueChangeEvent<ArticlePf> valueChangeEvent) {
           ArticlePf articlePf = valueChangeEvent.getValue();
           if (!articlePf.equals(EmptyObject.getEmptyArticlePf())
               || !platformValueListBox.getValue().equals(EmptyObject.getEmptyPlatform())) {
             int index = articlePfValueListBox.getIndex();
             int size = articlePfValueListBox.getListSize();
             arrowStatus(index, size);
             presenter.getEventBus().searchForStock(articlePf, false);
             articlePfValueListBox.setFocus(false);
             lastArticleChoice = articlePf;
             presenter.setParamSessionArticlePf(articlePf);
           } else {
             presenter.getEventBus().showBothBoxAtAllMessage();
             setArticlePfValue(lastArticleChoice);
           }
         }
       });
 }