class EnumDropDownUtilities {

    public void setDropDownData(final String value,
                                final DropDownData dropData,
                                final boolean isMultipleSelect,
                                final Path resource,
                                final ListBox listBox) {

        //if we have to do it lazy, we will hit up the server when the widget gets focus
        if (dropData != null && dropData.getFixedList() == null && dropData.getQueryExpression() != null) {
            Scheduler.get().scheduleDeferred(new Command() {
                public void execute() {
                    BusyPopup.showMessage(CommonConstants.INSTANCE.RefreshingList());

                    MessageBuilder.createCall(new RemoteCallback<String[]>() {
                                                  public void callback(String[] response) {
                                                      BusyPopup.close();

                                                      if (response.length == 0) {
                                                          response = new String[]{CommonConstants.INSTANCE.UnableToLoadList()};
                                                      }

                                                      fillDropDown(value,
                                                                   response,
                                                                   isMultipleSelect,
                                                                   listBox);
                                                  }
                                              },
                                              new BusErrorCallback() {
                                                  @Override
                                                  public boolean error(Message message,
                                                                       Throwable throwable) {
                                                      BusyPopup.close();
                                                      return false;
                                                  }
                                              },
                                              EnumDropdownService.class
                    ).loadDropDownExpression(resource,
                                             dropData.getValuePairs(),
                                             dropData.getQueryExpression());
                }
            });
        } else {
            //otherwise its just a normal one...
            fillDropDown(value,
                         dropData,
                         isMultipleSelect,
                         listBox);
        }
    }

}