Examples of BaseSearchFilter


Examples of org.projectforge.core.BaseSearchFilter

  }

  private void checkNoAccess(Serializable id, KundeDO kunde, String who)
  {
    try {
      BaseSearchFilter filter = new BaseSearchFilter();
      kundeDao.getList(filter);
      fail("AccessException expected: " + who + " users should not have select list access to customers.");
    } catch (AccessException ex) {
      // OK
    }
View Full Code Here

Examples of org.projectforge.core.BaseSearchFilter

    super(id, model, caller, selectProperty);
    trainingTextField = new PFAutoCompleteTextField<TrainingDO>("trainingField", getModel()) {
      @Override
      protected List<TrainingDO> getChoices(final String input)
      {
        final BaseSearchFilter filter = new BaseSearchFilter();
        filter.setSearchFields("title", "description", "skill.title", "skill.description", "skill.comment");
        filter.setSearchString(input);
        final List<TrainingDO> list = trainingDao.getList(filter);
        return list;
      }

      @Override
View Full Code Here

Examples of org.projectforge.core.BaseSearchFilter

    this.kundeText = kundeText;
    customerTextField = new PFAutoCompleteTextField<KundeDO>("customerField", getModel()) {
      @Override
      protected List<KundeDO> getChoices(final String input)
      {
        final BaseSearchFilter filter = new BaseSearchFilter();
        filter.setSearchFields("id", "name", "identifier", "division");
        filter.setSearchString(input);
        final List<KundeDO> list = kundeDao.getList(filter);
        return list;
      }

      @Override
View Full Code Here

Examples of org.projectforge.core.BaseSearchFilter

    PropertyModel<String> model = new PropertyModel<String>(new PFUserDO(), "username");
    assertInteger(255, MaxLengthTextField.getMaxLength(model));
    assertInteger(255, MaxLengthTextField.getMaxLength(model, 300));
    assertInteger(100, MaxLengthTextField.getMaxLength(model, 100));

    model = new PropertyModel<String>(new BaseSearchFilter(), "searchString");
    Assert.assertNull(MaxLengthTextField.getMaxLength(model));
    assertInteger(100, MaxLengthTextField.getMaxLength(model, 100));

    Assert.assertNull(MaxLengthTextField.getMaxLength(Model.of("test")));
    assertInteger(100, MaxLengthTextField.getMaxLength(Model.of("test"), 100));
View Full Code Here

Examples of org.projectforge.core.BaseSearchFilter

    }
    ContactDO address = contactDao.getById(a3.getId());
    assertEquals("testa3", address.getName());

    // Select filter
    final BaseSearchFilter searchFilter = new BaseSearchFilter();
    searchFilter.setSearchString("testa*");
    final QueryFilter filter = new QueryFilter(searchFilter);
    filter.addOrder(Order.asc("name"));
    final List<ContactDO> result = contactDao.getList(filter);
    assertEquals("Should found 3 address'.", 3, result.size());
    final HashSet<String> set = new HashSet<String>();
View Full Code Here

Examples of org.projectforge.core.BaseSearchFilter

  }

  @Override
  protected List<KontoDO> getChoices(final String input)
  {
    final BaseSearchFilter filter = new BaseSearchFilter();
    filter.setSearchString(input);
    final List<KontoDO> list = kontoDao.getList(filter);
    Collections.sort(list, new Comparator<KontoDO>() {
      public int compare(final KontoDO o1, final KontoDO o2)
      {
        return (o1.getNummer().compareTo(o2.getNummer()));
View Full Code Here

Examples of org.projectforge.core.BaseSearchFilter

    super(id, model, caller, selectProperty);
    kontoTextField = new PFAutoCompleteTextField<KontoDO>("kontoField", getModel()) {
      @Override
      protected List<KontoDO> getChoices(final String input)
      {
        final BaseSearchFilter filter = new BaseSearchFilter();
        filter.setSearchFields("nummer", "bezeichnung", "description");
        filter.setSearchString(input);
        final List<KontoDO> list = kontoDao.getList(filter);
        if (kontoNumberRanges != null && list != null) {
          final List<KontoDO> result = new ArrayList<KontoDO>();
          for (final KontoDO konto : list) {
            if (konto.getStatus() == KontoStatus.NONACTIVE) {
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.