Exemplo n.º 1
0
  private PageRequest createPageRequest(final Integer reportId) {
    // Report & Document path
    final PageRequest request;

    if (currentContainerDTO instanceof ProjectDTO) {
      // This element is displayed in a project
      request = new PageRequest(Page.PROJECT_REPORTS);
      request.addParameter(RequestParameter.ID, currentContainerDTO.getId());
      request.addParameter(RequestParameter.REPORT_ID, reportId);

    } else if (currentContainerDTO instanceof OrgUnitDTO) {
      // This element is displayed in a project
      request = new PageRequest(Page.ORGUNIT_REPORTS);
      request.addParameter(RequestParameter.ID, currentContainerDTO.getId());
      request.addParameter(RequestParameter.REPORT_ID, reportId);

    } else {
      if (Log.isDebugEnabled()) {
        Log.debug(
            "ReportElementDTO does not know how to render properly from a '"
                + currentContainerDTO.getClass()
                + "' container.");
      }
      request = null;
    }

    return request;
  }
Exemplo n.º 2
0
  public void init() {
    GWT.log("consolePanel init");
    if (Log.isLoggingEnabled()) {
      final DivLogger divLogger = Log.getLogger(DivLogger.class);
      GWT.log("logging enabled");

      add(divLogger.getWidget());
    } else {
      GWT.log("logging NOT enabled");
    }
  }
Exemplo n.º 3
0
 public void sendEmailUsingJava(String to, String content, String subjectContext) {
   // int smtpPort = 465;
   // int smtpPort = 587;
   // String smtpHost = "smtp.gmail.com";
   // int smtpPort = 25;
   // String smtpHost = "exsmtp.wvu.edu";
   String subject = constants.getString(subjectContext);
   int smtpPort = Integer.parseInt(constants.getString("smtpPort"));
   String smtpHost = constants.getString("smtpHost");
   String urPassword = constants.getString("password");
   String from = constants.getString("emailaddress");
   // String content = contentText;
   // Create a mail session
   java.util.Properties props = new java.util.Properties();
   props = System.getProperties();
   props.put("mail.smtp.host", smtpHost);
   // props.put("mail.smtp.starttls.enable", "true");
   props.put("mail.smtps.auth", "true");
   SmtpAuthenticator authentication = new SmtpAuthenticator();
   // Session session = Session.getInstance(props, null);
   Session session = Session.getInstance(props, authentication);
   session.setDebug(true);
   // Construct the message
   try {
     MimeMessage msg = new MimeMessage(session);
     msg.setFrom(new InternetAddress(from));
     msg.setRecipient(RecipientType.TO, new InternetAddress(to));
     msg.setSubject(subject);
     msg.setText(content);
     msg.setSentDate(new Date());
     Transport tr = null;
     tr = session.getTransport("smtp");
     tr.connect(smtpHost, smtpPort, from, urPassword);
     tr.sendMessage(msg, msg.getAllRecipients());
   } catch (AddressException e) {
     System.out.println(e.getClass().getName() + ": " + e.getMessage());
     Log.info(e.getClass().getName() + ": " + e.getMessage());
     StackTraceElement[] trace = e.getStackTrace();
     for (int i = 0; i < trace.length; i++) {
       System.out.println("\t" + trace[i].toString());
       Log.info("\n\t" + trace[i].toString());
     }
     e.printStackTrace();
   } catch (MessagingException e) {
     System.out.println(e.getClass().getName() + ": " + e.getMessage());
     Log.info(e.getClass().getName() + ": " + e.getMessage());
     StackTraceElement[] trace = e.getStackTrace();
     for (int i = 0; i < trace.length; i++) {
       System.out.println("\t" + trace[i].toString());
       Log.info("\n\t" + trace[i].toString());
     }
     e.printStackTrace();
   }
 }
Exemplo n.º 4
0
  @UiHandler("okBtn")
  public void okBtnClicked(ClickEvent event) {

    Log.info("Event :" + event.getAssociatedType());
    // event.getAssociatedType()
    EntityProxy object = listBox.getValue();
    Log.info("okBtnClicked  :" + object);

    if (object instanceof StandardizedRoleProxy) {
      Log.info("StandardizedRoleProxy");
      delegate.saveStandardizedRole(this);
    }
  }
Exemplo n.º 5
0
 public void refresh() {
   Log.debug("DhcpNatConfigTab.refresh()");
   if (m_dirty && m_initialized) {
     m_dirty = false;
     if (m_selectNetIfConfig == null) {
       Log.debug("DhcpNatConfigTab.refresh() - resetting");
       reset();
     } else {
       Log.debug("DhcpNatConfigTab.refresh() - updating");
       update();
     }
   }
 }
  private void init() {
    request = requests.anamnesisCheckRequest();

    if (anamnesisCheck == null) {
      AnamnesisCheckProxy anamnesisCheck = request.create(AnamnesisCheckProxy.class);
      this.anamnesisCheck = anamnesisCheck;
      view.setEditTitle(false);
    } else {
      // cannot be set via editor...
      view.setEditTitle(true);
    }

    //		GWT.log("$$$$$$$$$$$$$$$$ anamnesisCheck be
    // title="+anamnesisCheck.getAnamnesisCheckTitle().getText());
    //		GWT.log("$$$$$$$$$$$$$$$$ anamnesisCheck be sort oder="+anamnesisCheck.getSort_order());
    anamnesisCheckBefore = anamnesisCheck;

    Log.info("edit");

    Log.info("persist");

    request.persist().using(anamnesisCheck);
    editorDriver.edit(anamnesisCheck, request);

    Log.info("flush");
    //		editorDriver.flush();
    Log.debug("Create für: " + anamnesisCheck.getId());

    // manually update value fields... (no editor support)

    view.update(anamnesisCheck);

    initInsideTitle();
    if (place.getOperation() == Operation.EDIT) {
      getQuestionsByselected(anamnesisCheck.getAnamnesisCheckTitle());
    } else if (place.getOperation() == Operation.CREATE) {
      requests
          .anamnesisCheckTitleRequest()
          .findAnamnesisCheckTitle(Long.valueOf(place.getTitleId()))
          .fire(
              new Receiver<AnamnesisCheckTitleProxy>() {

                @Override
                public void onSuccess(AnamnesisCheckTitleProxy response) {
                  getQuestionsByselected(response);
                }
              });
    }
  }
Exemplo n.º 7
0
 private void log(Message message) {
   String formattedMessage =
       "At [" + message.getFired() + "] MessageCenter received: " + message.getConciseMessage();
   if (message.severity == Message.Severity.Info) {
     Log.info(formattedMessage);
   } else if (message.severity == Message.Severity.Warning) {
     Log.warn(formattedMessage);
   } else if (message.severity == Message.Severity.Error) {
     Log.error(formattedMessage);
   } else if (message.severity == Message.Severity.Fatal) {
     Log.fatal(formattedMessage);
   } else {
     Log.debug(formattedMessage);
   }
 }
Exemplo n.º 8
0
  @Inject
  public MainPanel(
      final MessagesImpl messages,
      final ConstantsImpl constants,
      final GlobalResources resources,
      final NewPostGadgetService service,
      final VegaUtils utils) {
    initWidget(uiBinder.createAndBindUi(this));
    resources.globalCSS().ensureInjected();
    this.service = service;
    this.messages = messages;
    this.constants = constants;
    this.resources = resources;
    this.utils = utils;
    //		dsAboutPnl.setHeader()
    try {
      setForumInfoIntoGadget(messages, utils);
    } catch (Exception e) {
      Log.debug(e.getMessage());
    }
    Timer timer =
        new Timer() {

          @Override
          public void run() {
            try {
              setForumInfoIntoGadget(messages, utils);
            } catch (Exception e) {
              Log.debug(e.getMessage());
            }
          }
        };
    timer.schedule(1000);
    utils.reportPageview("/newpost/");
  }
Exemplo n.º 9
0
  public ConsolePanel(MyWebApp mywebapp) {
    super(mywebapp);
    Widget divLogger = Log.getLogger(DivLogger.class).getWidget();
    add(divLogger);

    // ADD A TEXT TO APPEND TO
  }
  public SPDetailsReviewAnamnesisTableSubView addAnamnesisCheckTitle(
      AnamnesisCheckTitleProxy title) {
    Log.info("initializing anamnesis check title table and putting it on tab");
    String titleText = "";

    if (title.getText() != null) {
      titleText = title.getText();
    }

    SPDetailsReviewAnamnesisTableSubView tableSubView =
        new SPDetailsReviewAnamnesisTableSubViewImpl();

    anamnesisTabs.add((Widget) tableSubView, titleText);

    // anamnesisTabs.getTabWidget(0).getParent().addStyleName("chnagedTabStyle");

    /*if (anamnesisTabs.getWidgetCount() == 1) {
    	anamnesisTabs.addSelectionHandler(new SelectionHandler<Integer>() {
    		@Override
    		public void onSelection(SelectionEvent<Integer> event) {
    			//delegate.performAnamnesisSearch();
    			//delegate.storeDisplaySettings();
    		}
    	});
    }*/
    return tableSubView;
  }
Exemplo n.º 11
0
  public boolean leave() {
    Log.trace("checking csv mapping");

    DefinitionsMappings mappings = view.getMappings();

    boolean valid = validateMappings(mappings);

    if (showMetadata) {
      String csvName = view.getCsvName();
      String version = view.getVersion();
      valid &= validateAttributes(csvName, version);
    }

    if (valid) {
      publishBus.fireEventFromSource(new MappingsUpdatedEvent(mappings), this);

      PublishMetadata metadata = new PublishMetadata();
      metadata.setName(ValueUtils.getValue(view.getCsvName()));
      metadata.setVersion(view.getVersion());
      metadata.setSealed(view.getSealed());
      metadata.setAttributes(this.metadata.getAttributes());
      publishBus.fireEventFromSource(new ItemUpdatedEvent<PublishMetadata>(metadata), this);
    }

    return valid;
  }
Exemplo n.º 12
0
  private void reset() {
    Log.debug("DhcpNatConfigTab: reset()");
    m_modeCombo.setSimpleValue(MessageUtils.get(GwtNetRouterMode.netRouterOff.name()));
    m_modeCombo.setOriginalValue(m_modeCombo.getValue());

    m_dhcpBeginAddressField.setValue("");
    m_dhcpBeginAddressField.setOriginalValue(m_dhcpBeginAddressField.getValue());

    m_dhcpEndAddressField.setValue("");
    m_dhcpEndAddressField.setOriginalValue(m_dhcpEndAddressField.getValue());

    m_dhcpSubnetMaskField.setValue("");
    m_dhcpSubnetMaskField.setOriginalValue(m_dhcpSubnetMaskField.getValue());

    m_dhcpLeaseDefaultField.setValue(0);
    m_dhcpLeaseDefaultField.setOriginalValue(m_dhcpLeaseDefaultField.getValue());

    m_dhcpLeaseMaxField.setValue(0);
    m_dhcpLeaseMaxField.setOriginalValue(m_dhcpLeaseMaxField.getValue());

    m_passDnsRadioTrue.setValue(false);
    m_passDnsRadioTrue.setOriginalValue(m_passDnsRadioTrue.getValue());

    m_passDnsRadioFalse.setValue(true);
    m_passDnsRadioFalse.setOriginalValue(m_passDnsRadioFalse.getValue());

    m_passDnsRadioGroup.setValue(m_passDnsRadioFalse);
    m_passDnsRadioGroup.setOriginalValue(m_passDnsRadioGroup.getValue());

    update();
  }
Exemplo n.º 13
0
  @UiHandler("createNewPostBtn")
  void createNewPost(ClickEvent event) {
    String userId = utils.retrUserId();
    String projectId = utils.retrFromState("projectId");
    String title = newPostTtlTextBox.getText();
    utils.showStaticMessage(messages.showSentRequestMsg(utils.retrFromState("projectName")));
    try {
      service.createNewPost(
          projectId,
          userId,
          title,
          new AsyncCallback<JSONValue>() {

            @Override
            public void onSuccess(JSONValue result) {
              Log.debug(result.toString());
              utils.dismissStaticMessage();
              utils.showSuccessMessage(constants.successStr(), 3);
            }

            @Override
            public void onFailure(Throwable caught) {
              utils.dismissStaticMessage();
              utils.alert(caught.getMessage());
            }
          });
    } catch (RequestException e) {
      Log.error("error in createNewPost", e);
    }
    utils.reportEvent("/newpost/", "createNewPost", projectId, 1);
  }
Exemplo n.º 14
0
  /** change Filter Title ListBox selectedValue */
  @SuppressWarnings("deprecation")
  @Override
  public void changeFilterTitleShown(String selectedtTitle) {
    Log.debug("###########this is changeFilterTitleShown");

    //		Window.alert("getSelectedFilterTitle() = " + getSelectedFilterTitle());
    requests
        .anamnesisCheckRequest()
        .findTitlesContatisAnamnesisChecksWithSearching(
            place.getSearchStr(), getSelectedFilterTitle())
        .fire(
            new Receiver<List<AnamnesisCheckTitleProxy>>() {

              @Override
              public void onSuccess(List<AnamnesisCheckTitleProxy> response) {
                Log.debug("????????in changeFilterTitleShown response = " + response.size());
                view.getAnamnesisCheckPanel().clear();
                if ((place.getSearchStr() == null || place.getSearchStr().equals(""))
                    && getSelectedFilterTitle() == null) {
                  view.loadAnamnesisCheckPanel(response, false);
                } else {
                  view.loadAnamnesisCheckPanel(response, true);
                }
              }
            });
  }
  public SettingsTabs(GwtSession currentSession, ServiceTree serviceTree) {
    m_currentSession = currentSession;
    m_servicesTree = serviceTree;

    Log.debug("about to get the firewall configuration");
    initTabs();
  }
Exemplo n.º 16
0
  /** Instantiates a new change log panel. */
  private ChangeLogPanel() {

    MainPanel.setCommInfo(true);
    try {
      new RequestBuilder(RequestBuilder.GET, "CHANGELOG")
          .sendRequest(
              "",
              new RequestCallback() {
                @Override
                public void onError(Request res, Throwable throwable) {
                  MainPanel.setCommInfo(false);
                  Log.error(throwable.getMessage());
                }

                @Override
                public void onResponseReceived(Request request, Response response) {
                  MainPanel.setCommInfo(false);
                  String text = response.getText();
                  HTML w = new HTML("<p>" + text + "</p>");
                  d.setWidget(w);
                }
              });
    } catch (RequestException e) {
      MainPanel.setCommInfo(false);
      Log.error(e.getMessage());
    }

    d = new DecoratorPanel();
    d.setWidth("100%");

    initWidget(d);
  }
 @Override
 public void onSuccess(UpdateTransUnitResult result) {
   TransUnit updatedTU = result.getUpdateInfoList().get(0).getTransUnit();
   Log.debug("save resulted TU: " + updatedTU.debugString());
   if (result.isSingleSuccess()) {
     eventBus.fireEvent(
         new NotificationEvent(
             NotificationEvent.Severity.Info,
             messages.notifyUpdateSaved(updatedTU.getRowIndex(), updatedTU.getId().toString()),
             goToRowLink));
     int rowIndexOnPage = navigationService.findRowIndexById(updatedTU.getId());
     if (rowIndexOnPage != NavigationService.UNDEFINED) {
       UndoLink undoLink = undoLinkProvider.get();
       undoLink.prepareUndoFor(result);
       targetContentsPresenter.addUndoLink(rowIndexOnPage, undoLink);
       navigationService.updateDataModel(updatedTU);
       targetContentsPresenter.confirmSaved(updatedTU);
       targetContentsPresenter.setFocus();
     }
     queue.removeSaved(event, updatedTU.getVerNum());
   } else {
     saveFailure(result.getUpdateInfoList().get(0).getErrorMessage());
   }
   if (queue.hasPending()) {
     performSave(id);
   }
 }
Exemplo n.º 18
0
  public void getAnnotationList(String annotates, final boolean forceDecorate) {
    if (annotates.contains("?")) {
      annotates = annotates.substring(0, annotates.indexOf('?'));
    }
    String url = controller.getAnnoteaServerUrl() + "?w3c_annotates=" + annotates;
    RequestBuilder getRequest = new RequestBuilder(RequestBuilder.GET, URL.encode(url));
    try {
      getRequest.sendRequest(
          null,
          new RequestCallback() {
            public void onError(Request request, Throwable exception) {}

            public void onResponseReceived(Request request, Response response) {
              responseManager.processAnnotationListResponse(response.getText());
              if (forceDecorate) {
                // Force all the annotations to be redecorated
                controller.updateAnnotations(true);
              }
            }
          });
    } catch (RequestException e) {
      GWT.log("Error while requesting annotations: " + url, e);
      Log.debug("Error while requesting annotations: " + url, e);
      Window.alert(e.toString());
    }
  }
Exemplo n.º 19
0
  public void deleteAnnotation(String annotates, final Annotation annotation) {
    if (annotates.contains("?")) {
      annotates = annotates.substring(0, annotates.indexOf('?'));
    }

    String url = controller.getAnnoteaServerUrl() + "/" + annotation.getUUID();
    url += "?document_url=" + annotates;
    RequestBuilder req = new RequestBuilder("DELETE", url) {
          // nothing to override... used to make a *real* HTTP DELETE request
        };

    try {
      req.sendRequest(
          null,
          new RequestCallback() {
            public void onError(Request arg0, Throwable arg1) {}

            public void onResponseReceived(Request arg0, Response arg1) {
              getAnnotationList(Window.Location.getHref(), true);
              controller.reloadAnnotations();
            }
          });
    } catch (RequestException e) {
      GWT.log("Error while deleting an annotation: " + url, e);
      Log.debug("Error while deleting an annotation: " + url, e);
    }
  }
Exemplo n.º 20
0
  public void submitAnnotation(Annotation newAnnotation) {
    AnnotationXmlGenerator xmlGenerator =
        new AnnotationXmlGenerator(webConfiguration, newAnnotation);
    String request = xmlGenerator.generateXml();
    postRequest =
        new RequestBuilder(RequestBuilder.POST, URL.encode(controller.getAnnoteaServerUrl()));
    try {
      postRequest.sendRequest(
          request,
          new RequestCallback() {
            public void onError(Request request, Throwable exception) {
              Window.alert("Error while sending data to annotea server: " + exception.toString());
            }

            public void onResponseReceived(Request request, Response response) {
              responseManager.processSubmitAnnotationResponse(response.getText());
              getAnnotationList(controller.getDocumentUrl());
              controller.reloadAnnotations();
            }
          });
    } catch (Throwable e) {
      GWT.log("Error while sending new annotation", e);
      Log.debug("Error while sending new annotation", e);
    }
  }
Exemplo n.º 21
0
  @SuppressWarnings("deprecation")
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {

    Log.info("ClinicDetailsActivity.start()");
    ClinicDetailsView ClinicDetailsView = new ClinicDetailsViewImpl();
    ClinicDetailsView.setPresenter(this);

    this.widget = panel;
    this.view = ClinicDetailsView;
    widget.setWidget(ClinicDetailsView.asWidget());

    view.setDelegate(this);
    loadDisplaySettings();

    requests
        .find(place.getProxyId())
        .fire(
            new Receiver<Object>() {

              public void onFailure(ServerFailure error) {
                Log.error(error.getMessage());
              }

              @Override
              public void onSuccess(Object response) {

                if (response instanceof ClinicProxy) {
                  Log.info(((ClinicProxy) response).getName());
                  init((ClinicProxy) response);
                }
              }
            });
  }
Exemplo n.º 22
0
 public static logbook.server.domain.Student findStudentFromSession() {
   HttpSession session = RequestFactoryServlet.getThreadLocalRequest().getSession();
   String shibId = (String) session.getAttribute(UNIQUE_ID);
   Log.info("shib id: " + shibId);
   Student student = Student.findStudentUsingShibId(shibId);
   return student;
 }
Exemplo n.º 23
0
  /**
   * Called from the table selection handler
   *
   * @param anamnesisCheck
   */
  @Override
  public void showDetails(AnamnesisCheckProxy anamnesisCheck) {

    Log.debug(anamnesisCheck.getId().toString());

    goTo(new AnamnesisCheckDetailsPlace(anamnesisCheck.stableId(), Operation.DETAILS));
  }
Exemplo n.º 24
0
  /** @param AssesmentProxy assesment */
  private void init(QuestionProxy question) {

    this.question = question;
    Log.debug("Details für: " + question.getQuestionText());
    view.setValue(question);

    initAnswerView();
  }
  @Override
  public void onTransUnitSave(TransUnitSaveEvent event) {
    TransUnitId idToSave = event.getTransUnitId();
    Log.info("TU save event: new[" + event.getTargets() + "] + old: [" + event.getOldContents());
    if (stateHasNotChanged(event)) {
      Log.info("NO OP! state has not changed for " + idToSave);
      return;
    }

    queue.push(event);
    if (queue.isSaving(idToSave)) {
      Log.info(idToSave + " has saving event. Put in queue and return.");
      return;
    }

    performSave(idToSave);
  }
Exemplo n.º 26
0
    @Override
    public void onSuccess(List<AnamnesisCheckProxy> response) {
      Log.debug("setQuestionTableData() - sueccess and response size = " + response.size());
      Log.debug("dataProvider.getList().size() = " + dataProvider.getList().size());

      dataProvider.getList().clear();
      dataProvider.getList().addAll(response);
      // AnamnesisCheckActivity.this.view.getTable().setPageSize(dataProvider.getList().size());
      AnamnesisCheckActivity.this.view.setTableSize(dataProvider.getList().size());
      Log.info("page size--" + AnamnesisCheckActivity.this.view.getTable().getPageSize());
      AnamnesisCheckActivity.this.view.getTable().redraw();
      dataProvider.refresh();
      AnamnesisCheckActivity.this.view.getTable().redraw();
      // innerSystemStartView.getTable().cellTable.setPageSize(25);
      // anamnesisCheckTable.cellTable.setPageSize(25);
      Log.info("data provider--" + dataProvider.getList().size());
    }
Exemplo n.º 27
0
  private void loadDisplaySettings() {
    int detailsTab = 0;
    if (userSettings.hasSettings()) {
      Log.info("Loading Display");
      detailsTab = userSettings.getIntValue("detailsTab");
    }

    view.setSelectedDetailsTab(detailsTab);
  }
Exemplo n.º 28
0
  @SuppressWarnings("deprecation")
  @Override
  public void setQuestionTableData(AnamnesisCheckTitleProxy title) {
    if (mapTitlesToProviders.size() < 1) {
      Log.warn("No data providers!?");
    }

    ListDataProvider<AnamnesisCheckProxy> dataProvider = mapTitlesToProviders.get(title);

    if (dataProvider.getList() != null) {
      Log.debug("view.getSearchBoxShown() = " + view.getSearchBoxShown());
      requests
          .anamnesisCheckRequest()
          .findAnamnesisChecksBySearchWithAnamnesisCheckTitle(view.getSearchBoxShown(), title)
          .with("anamnesisCheckTitle")
          .fire(new AnamnesisCheckReceiver(dataProvider));
    }
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {

    Log.info("AnamnesisCheckEditActivity.start()");
    AnamnesisCheckEditView anamnesisCheckEditView = new AnamnesisCheckEditViewImpl();

    this.widget = panel;
    this.view = anamnesisCheckEditView;

    editorDriver = view.createEditorDriver();

    view.setDelegate(this);

    if (this.place.getOperation() == Operation.EDIT) {
      Log.info("edit");
      requests
          .find(place.getProxyId())
          .with("anamnesisForm", "anamnesisCheckTitle")
          .fire(
              new Receiver<Object>() {
                public void onFailure(ServerFailure error) {
                  Log.error(error.getMessage());
                }

                @Override
                public void onSuccess(Object response) {
                  if (response instanceof AnamnesisCheckProxy) {
                    Log.info(((AnamnesisCheckProxy) response).getId().toString());
                    // init((AnamnesisCheckProxy) response);
                    anamnesisCheck = (AnamnesisCheckProxy) response;
                    init();
                  }
                }
              });
    } else {

      Log.info("new AnamnesisCheck");
      // anamnesisCheckPlace.setProxyId(anamnesisCheck.stableId());
      init();
    }
    // view.initialiseDriver(requests);
    widget.setWidget(anamnesisCheckEditView.asWidget());
    // setTable(view.getTable());
  }
Exemplo n.º 30
0
  private static void matchSubElements(
      ModelNode descriptionModel, List<String> fieldNames, SafeHtmlBuilder html) {

    if (descriptionModel.hasDefined(RESULT))
      descriptionModel = descriptionModel.get(RESULT).asObject();

    try {

      // match attributes
      if (descriptionModel.hasDefined(ATTRIBUTES)) {

        List<Property> elements = descriptionModel.get(ATTRIBUTES).asPropertyList();

        for (Property element : elements) {
          String childName = element.getName();
          ModelNode value = element.getValue();

          if (fieldNames.contains(childName)) {
            // make sure it's not processed twice
            fieldNames.remove(childName);

            html.appendHtmlConstant("<tr class='help-field-row'>");
            html.appendHtmlConstant("<td class='help-field-name'>");
            html.appendEscaped(childName).appendEscaped(": ");
            html.appendHtmlConstant("</td>");
            html.appendHtmlConstant("<td class='help-field-desc'>");
            html.appendEscaped(value.get("description").asString());
            html.appendHtmlConstant("</td>");
            html.appendHtmlConstant("</tr>");
          }
        }
      }

      if (fieldNames.isEmpty()) return;

      // visit child elements
      if (descriptionModel.hasDefined("children")) {
        List<Property> children = descriptionModel.get("children").asPropertyList();

        for (Property child : children) {
          ModelNode childDesc = child.getValue();
          for (Property modDescProp : childDesc.get(MODEL_DESCRIPTION).asPropertyList()) {

            matchSubElements(
                childDesc.get(MODEL_DESCRIPTION, modDescProp.getName()), fieldNames, html);

            // exit early
            if (fieldNames.isEmpty()) return;
          }
        }
      }

    } catch (IllegalArgumentException e) {
      Log.error("Failed to read help descriptionModel", e);
    }
  }