Examples of PFAutoCompleteMaxLengthTextField


Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

  @SuppressWarnings("serial")
  public AbstractFieldsetPanel< ? > addLocation(final TimesheetEditFilter filter)
  {
    final FieldProperties<String> props = getLocationProperties();
    final AbstractFieldsetPanel< ? > fs = gridBuilder.newFieldset(props);
    final PFAutoCompleteMaxLengthTextField locationTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
        new PropertyModel<String>(timesheet, "location")) {
      @Override
      protected List<String> getChoices(final String input)
      {
        return trimResults(timesheetDao.getLocationAutocompletion(input));
      }

      private List<String> trimResults(final List<String> result)
      {
        if(result != null && result.size() > 0 && filter != null && filter.getIgnoredLocations() != null && filter.getIgnoredLocations().size() > 0) {
          result.removeAll(filter.getIgnoredLocations());
        }
        return result;
      }

      @Override
      protected List<String> getFavorites()
      {
        return trimResults(getTimesheetPrefData().getRecentLocations());
      }
    };
    locationTextField.withMatchContains(true).withMinChars(2).withFocus(true);
    fs.setStoreObject(locationTextField);
    fs.add(locationTextField);
    if (fs instanceof FieldsetPanel) {
      ((FieldsetPanel) fs).addKeyboardHelpIcon(getString("tooltip.autocomplete.withDblClickFunction"));
      ((FieldsetPanel) fs).addHelpIcon(getString("timesheet.location.tooltip"));
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

  @SuppressWarnings("serial")
  public AbstractFieldsetPanel< ? > addOrganization()
  {
    final FieldProperties<String> props = getOrganizationProperties();
    final AbstractFieldsetPanel< ? > fs = gridBuilder.newFieldset(props);
    fs.add(dependentFormComponents[2] = new PFAutoCompleteMaxLengthTextField(fs.getTextFieldId(), props.getPropertyModel()) {

      @Override
      protected List<String> getChoices(final String input)
      {
        return contactDao.getAutocompletion("organization", input);
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

    final MaxLengthTextField titleField = new MaxLengthTextField(fsTitle.getTextFieldId(), new PropertyModel<String>(model.getPollDo(), "title"));
    titleField.setRequired(true);
    fsTitle.add(titleField);

    final FieldsetPanel fsLocation = gridBuilder.newFieldset(getString("plugins.poll.new.location"));
    final PFAutoCompleteMaxLengthTextField locationTextField = new PFAutoCompleteMaxLengthTextField(fsLocation.getTextFieldId(),
        new PropertyModel<String>(model.getPollDo(), "location")) {
      private static final long serialVersionUID = 2008897410054999896L;

      @Override
      protected List<String> getChoices(final String input)
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

  @SuppressWarnings("serial")
  public AbstractFieldsetPanel< ? > addOrganization()
  {
    final FieldProperties<String> props = getOrganizationProperties();
    final AbstractFieldsetPanel< ? > fs = gridBuilder.newFieldset(props);
    fs.add(dependentFormComponents[2] = new PFAutoCompleteMaxLengthTextField(fs.getTextFieldId(), props.getPropertyModel()) {

      @Override
      protected List<String> getChoices(final String input)
      {
        return addressDao.getAutocompletion("organization", input);
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

  @SuppressWarnings("serial")
  public AbstractFieldsetPanel< ? > addAddressText(final String addressType, final String addressTextProperty)
  {
    final FieldProperties<String> props = getAddressTextProperties(addressType, addressTextProperty);
    final AbstractFieldsetPanel< ? > fs = gridBuilder.newFieldset(props);
    fs.add(new PFAutoCompleteMaxLengthTextField(fs.getTextFieldId(), props.getPropertyModel()) {
      @Override
      protected List<String> getChoices(final String input)
      {
        return addressDao.getAutocompletion(addressTextProperty, input);
      }
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

      }
    }
    {
      // LOCATION
      final FieldsetPanel fieldSet = gridBuilder.newFieldset(getString("plugins.teamcal.event.location"));
      final PFAutoCompleteMaxLengthTextField locationTextField = new PFAutoCompleteMaxLengthTextField(fieldSet.getTextFieldId(),
          new PropertyModel<String>(data, "location")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return teamEventDao.getLocationAutocompletion(input, calendarsWithFullAccess);
        }
      };
      locationTextField.withMatchContains(true).withMinChars(3);
      fieldSet.add(locationTextField);
      if (access == false)
        fieldSet.setEnabled(false);
    }
    {
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

  }

  @SuppressWarnings("serial")
  private PFAutoCompleteTextField<String> createAutocompleteTextField(final String property)
  {
    final PFAutoCompleteTextField<String> textField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(
        data, property)) {
      @Override
      protected List<String> getChoices(final String input)
      {
        return parentPage.getBaseDao().getAutocompletion(property, input);
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

  {
    super.init();
    {
      // Organization
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("organization"));
      final PFAutoCompleteMaxLengthTextField organizationField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "organization")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("organization", input);
        }
      };
      organizationField.withMatchContains(true).withMinChars(2).withFocus(true);
      WicketUtils.setStrong(organizationField);
      fs.add(organizationField);
    }
    {
      // Product
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("plugins.licensemanagement.product"));
      final PFAutoCompleteMaxLengthTextField productField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "product")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("product", input);
        }
      };
      productField.withMatchContains(true).withMinChars(2);
      productField.setRequired(true);
      WicketUtils.setStrong(productField);
      fs.add(productField);
    }
    {
      // Version
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

    }
    gridBuilder.newGridPanel();
    {
      // Receiver
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.postausgang.empfaenger"));
      final PFAutoCompleteMaxLengthTextField empfaengerTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "empfaenger")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("empfaenger", input);
        }
      };
      empfaengerTextField.withMatchContains(true).withMinChars(2).withFocus(true);
      empfaengerTextField.setRequired(true);
      WicketUtils.setStrong(empfaengerTextField);
      fs.add(empfaengerTextField);
    }
    {
      // Person
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.postausgang.person"));
      final PFAutoCompleteMaxLengthTextField personTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "person")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("person", input);
        }
      };
      personTextField.withMatchContains(true).withMinChars(2);
      fs.add(personTextField);
    }
    {
      // Content
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.post.inhalt"));
      final PFAutoCompleteMaxLengthTextField inhaltTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "inhalt")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("inhalt", input);
        }
      };
      inhaltTextField.withMatchContains(true).withMinChars(2);
      inhaltTextField.setRequired(true);
      fs.add(inhaltTextField);
    }
    {
      // Comment
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("comment"));
View Full Code Here

Examples of org.projectforge.web.wicket.autocompletion.PFAutoCompleteMaxLengthTextField

    }
    gridBuilder.newGridPanel();
    {
      // Sender
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.posteingang.absender"));
      final PFAutoCompleteMaxLengthTextField absenderTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "absender")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("absender", input);
        }
      };
      absenderTextField.withMatchContains(true).withMinChars(2).withFocus(true);
      absenderTextField.setRequired(true);
      WicketUtils.setStrong(absenderTextField);
      fs.add(absenderTextField);
    }
    {
      // Person
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.posteingang.person"));
      final PFAutoCompleteMaxLengthTextField personTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "person")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("person", input);
        }
      };
      personTextField.withMatchContains(true).withMinChars(2);
      fs.add(personTextField);
    }
    {
      // Content
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("orga.post.inhalt"));
      final PFAutoCompleteMaxLengthTextField inhaltTextField = new PFAutoCompleteMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "inhalt")) {
        @Override
        protected List<String> getChoices(final String input)
        {
          return getBaseDao().getAutocompletion("inhalt", input);
        }
      };
      inhaltTextField.withMatchContains(true).withMinChars(2);
      inhaltTextField.setRequired(true);
      fs.add(inhaltTextField);
    }
    {
      // Content
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("comment"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.