当前位置: 首页>>代码示例>>Java>>正文


Java ILookupRow类代码示例

本文整理汇总了Java中org.eclipse.scout.rt.shared.services.lookup.ILookupRow的典型用法代码示例。如果您正苦于以下问题:Java ILookupRow类的具体用法?Java ILookupRow怎么用?Java ILookupRow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ILookupRow类属于org.eclipse.scout.rt.shared.services.lookup包,在下文中一共展示了ILookupRow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execInitTable

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
protected void execInitTable() {
  String orgaId = organizationId;
  if (StringUtility.isNullOrEmpty(orgaId)) {
    orgaId = BEANS.get(IOrganizationService.class).getOrganizationIdForUser(ClientSession.get().getUserId());
  }

  if (StringUtility.hasText(orgaId)) {
    OrganizationLookupCall call = new OrganizationLookupCall();
    call.setKey(orgaId);
    List<? extends ILookupRow<String>> organizationRows = BEANS.get(IOrganizationLookupService.class).getDataByKey(call);
    if (organizationRows.size() > 0) {
      String organizationName = organizationRows.get(0).getText();
      OrganizationColumnFilter filter = new OrganizationColumnFilter(organizationName);
      getUserFilterManager().addFilter(filter);
    }
  }
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:19,代码来源:PersonTablePage.java

示例2: testRaceField

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Test
public void testRaceField() throws Exception {
  event = new EventWithIndividualValidatedRaceTestDataProvider(new String[]{"31"}, new String[]{"31"});

  DownloadedECardForm download = new DownloadedECardForm();
  download.setPunchSessionNr(event.getPunchSessionNr());
  download.startModify();

  ScoutClientAssert.assertEnabled(download.getEventField());
  ScoutClientAssert.assertEnabled(download.getRaceField());

  List<? extends ILookupRow<?>> rows = download.getRaceField().callBrowseLookup("", Integer.MAX_VALUE);
  Assert.assertEquals("Race Lookup Rows", 1, rows.size());
  Assert.assertEquals("Race Lookup Value", event.getRaceNr(), rows.get(0).getKey());

  download.doClose();
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:18,代码来源:DownloadedECardFormRaceFieldTest.java

示例3: testRaceFieldMultipleEvents

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Test
public void testRaceFieldMultipleEvents() throws Exception {
  event = new EventWithIndividualValidatedRaceTestDataProvider(new String[]{"31"}, new String[]{"31"});
  event2 = new EventWithIndividualValidatedRaceTestDataProvider(new String[]{"31"}, new String[]{"31"});

  DownloadedECardForm download = new DownloadedECardForm();
  download.setPunchSessionNr(event.getPunchSessionNr());
  download.startModify();

  List<? extends ILookupRow<?>> rows = download.getRaceField().callBrowseLookup("", Integer.MAX_VALUE);
  Assert.assertEquals("Race Lookup Rows", 1, rows.size());
  Assert.assertEquals("Race Lookup Value", event.getRaceNr(), rows.get(0).getKey());

  // check race field is empty when no event is set
  download.getEventField().setValue(null);
  ScoutClientAssert.assertDisabled(download.getRaceField());
  ScoutClientAssert.assertEnabled(download.getEventField());
  Assert.assertNull("Race Empty", download.getRaceField().getValue());

  download.getEventField().setValue(event2.getEventNr());
  rows = download.getRaceField().callBrowseLookup("", Integer.MAX_VALUE);
  Assert.assertEquals("Race Lookup Rows", 1, rows.size());
  Assert.assertEquals("Race Lookup Value", event2.getRaceNr(), rows.get(0).getKey());

  download.doClose();
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:27,代码来源:DownloadedECardFormRaceFieldTest.java

示例4: selectFirstEntry

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
/**
 * gets the first entry of a smartfield that is enabled and active
 */
public static <T> boolean selectFirstEntry(ISmartField<T> smartField) {
  if (smartField == null || smartField.getLookupCall() == null) {
    return false;
  }
  try {
    List<? extends ILookupRow> lookupRows = smartField.callBrowseLookup(null, 10);
    if (lookupRows != null) {
      for (ILookupRow row : lookupRows) {
        if (row.isActive() && row.isEnabled()) {
          @SuppressWarnings("unchecked")
          T value = (T) row.getKey();
          smartField.setValue(value);
          if (smartField.getErrorStatus() == null) {
            return true;
          }
        }
      }
    }
  }
  catch (ProcessingException e) {
    LOG.warn("enexpected exception while selecting first valid value in smart field [" + smartField + "]", e);
  }
  return false;
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:28,代码来源:ClientTestingUtility.java

示例5: getDefaultSmartFieldValue

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
protected Object getDefaultSmartFieldValue(ISmartField<?> field) {
  try {
    List<? extends ILookupRow<?>> lookupRows = field.callBrowseLookup(null, 20);
    if (lookupRows != null && lookupRows.size() > 0) {
      int startIndex = gen.nextInt(lookupRows.size());
      int i = startIndex;
      do {
        ILookupRow row = lookupRows.get(i);
        if (row.isActive() && row.isEnabled()) {
          return row.getKey();
        }
        i++;
        if (i >= lookupRows.size()) {
          i = 0;
        }
      }
      while (i != startIndex);
    }
  }
  catch (ProcessingException e) {
    throw new RuntimeException("Unexpected exception while filling smartfield [" + field.getClass().getName() + "]", e);
  }
  return null;
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:26,代码来源:RandFormFieldValueProvider.java

示例6: getDefaultSmartFieldValue

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
protected Object getDefaultSmartFieldValue(ISmartField<?> field) {
  try {
    List<? extends ILookupRow<?>> lookupRows = field.callBrowseLookup(null, 10);
    if (lookupRows != null) {
      for (ILookupRow row : lookupRows) {
        if (row.isActive() && row.isEnabled()) {
          return row.getKey();
        }
      }
    }
  }
  catch (ProcessingException e) {
    throw new RuntimeException("Unexpected exception while filling smartfield [" + field.getClass().getName() + "]", e);
  }
  return null;
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:17,代码来源:AbstractFormFieldValueProvider.java

示例7: execFilterLookupResult

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
protected void execFilterLookupResult(ILookupCall<String> call, List<ILookupRow<String>> result) {
  Iterator<ILookupRow<String>> iterator = result.iterator();
  while (iterator.hasNext()) {
    ILookupRow<String> row = iterator.next();
    if (filteredPersons.contains(row.getKey())) {
      iterator.remove();
    }
  }
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:11,代码来源:PersonChooserForm.java

示例8: execFormatValue

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
protected String execFormatValue(String value) {
  CountryLookupCall lookup = new CountryLookupCall();
  lookup.setKey(value);
  for (ILookupRow<String> row : lookup.getDataByKey()) {
    value = row.getText();
    break;
  }
  return super.execFormatValue(value);
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:11,代码来源:OrganizationOverview.java

示例9: getDataByKey

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
public List<? extends ILookupRow<String>> getDataByKey(ILookupCall<String> call) {
  ArrayList<LookupRow<String>> rows = new ArrayList<>();
  AccountFormData formData = BEANS.get(IAccountService.class).load(call.getKey());

  rows.add(new LookupRow<>(formData.getAddress().getValue(), formData.getName().getValue()));

  return rows;
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:10,代码来源:WalletLookupService.java

示例10: getDataByText

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
public List<? extends ILookupRow<String>> getDataByText(ILookupCall<String> call) {
  ArrayList<LookupRow<String>> rows = new ArrayList<>();
  String searchText = getSearchText(call);
  AccountTablePageData pageData = BEANS.get(IAccountService.class).getAccountTableData(new SearchFilter(), getPersonId());

  for (AccountTableRowData row : pageData.getRows()) {
    if (StringUtility.containsStringIgnoreCase(row.getAccountName(), searchText)) {
      rows.add(new LookupRow<>(row.getAddress(), row.getAccountName()));
    }
  }

  return rows;
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:15,代码来源:WalletLookupService.java

示例11: getDataByAll

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
public List<? extends ILookupRow<String>> getDataByAll(ILookupCall<String> call) {
  ArrayList<LookupRow<String>> rows = new ArrayList<>();
  AccountTablePageData pageData = BEANS.get(IAccountService.class).getAccountTableData(new SearchFilter(), getPersonId());

  for (AccountTableRowData row : pageData.getRows()) {
    rows.add(new LookupRow<>(row.getAddress(), row.getAccountName()));
  }

  return rows;
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:12,代码来源:WalletLookupService.java

示例12: prepareRows

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
public void prepareRows(List<? extends ILookupRow<Long>> rows) {
  if (rows == null) {
    return;
  }
  for (ILookupRow<Long> row : rows) {
    String rentalCard = null;
    String typeText = null;
    row.setForegroundColor(ColorUtility.BLACK);
    if (!StringUtility.isNullOrEmpty(row.getTooltipText()) && row.getTooltipText().equalsIgnoreCase(Boolean.TRUE.toString())) {
      row.setForegroundColor(ColorUtility.BLUE);
      rentalCard = Texts.get("RentalCard");
    }
    row.setTooltipText(row.getText());
    if (!StringUtility.isNullOrEmpty(row.getBackgroundColor())) {
      Long id = NumberUtility.parseLong(row.getBackgroundColor());
      if (id != null && id != 0) {
        ECardTypeCodeType codeType = BEANS.get(ECardTypeCodeType.class);
        ICode code = codeType.getCode(id);
        if (code != null) {
          typeText = code.getText();
        }
      }
    }
    row.setBackgroundColor(null);
    if (rentalCard != null && typeText != null) {
      row.setText(row.getText() + " (" + rentalCard + ", " + typeText + ")");
    }
    else if (rentalCard != null || typeText != null) {
      row.setText(row.getText() + " (" + (rentalCard != null ? rentalCard : typeText) + ")");
    }
  }
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:33,代码来源:ECardLookupCall.java

示例13: getDataByAll

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
public List<? extends ILookupRow<Long>> getDataByAll() throws ProcessingException {
  List<? extends ILookupRow<Long>> rows = super.getDataByAll();
  if (restrictToEventNrs != null) {
    List<ILookupRow<Long>> filtered = new ArrayList<ILookupRow<Long>>();
    for (ILookupRow<Long> row : rows) {
      if (restrictToEventNrs.contains(row.getKey())) {
        filtered.add(row);
      }
    }
    return filtered;
  }
  return rows;
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:15,代码来源:EventLookupCall.java

示例14: getDataByText

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
public List<? extends ILookupRow<Long>> getDataByText() throws ProcessingException {
  List<? extends ILookupRow<Long>> rows = super.getDataByText();
  if (restrictToEventNrs != null) {
    List<ILookupRow<Long>> filtered = new ArrayList<ILookupRow<Long>>();
    for (ILookupRow<Long> row : rows) {
      if (restrictToEventNrs.contains(row.getKey())) {
        filtered.add(row);
      }
    }
    return filtered;
  }
  return rows;
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:15,代码来源:EventLookupCall.java

示例15: execFilterLookupResult

import org.eclipse.scout.rt.shared.services.lookup.ILookupRow; //导入依赖的package包/类
@Override
protected void execFilterLookupResult(ILookupCall<Long> call, List<ILookupRow<Long>> result) {
  RankingType type = getConfiguredRankingType();
  List<ILookupRow<Long>> filtered = new ArrayList<ILookupRow<Long>>();
  for (ILookupRow<Long> row : result) {
    ICode code = BEANS.get(RankingFormulaTypeCodeType.class).getCode(row.getKey());
    AbstractFormulaCode formulaCode = (AbstractFormulaCode) code;
    if (formulaCode.getRankingType() == null || formulaCode.getRankingType().equals(type)) {
      filtered.add(row);
    }
  }
  result.clear();
  result.addAll(filtered);
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:15,代码来源:AbstractRankingBox.java


注:本文中的org.eclipse.scout.rt.shared.services.lookup.ILookupRow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。