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


Java BeanContainer.setBeanIdProperty方法代码示例

本文整理汇总了Java中com.vaadin.data.util.BeanContainer.setBeanIdProperty方法的典型用法代码示例。如果您正苦于以下问题:Java BeanContainer.setBeanIdProperty方法的具体用法?Java BeanContainer.setBeanIdProperty怎么用?Java BeanContainer.setBeanIdProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.data.util.BeanContainer的用法示例。


在下文中一共展示了BeanContainer.setBeanIdProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MilestoneListSelect

import com.vaadin.data.util.BeanContainer; //导入方法依赖的package包/类
public MilestoneListSelect() {
    this.setItemCaptionMode(ItemCaptionMode.PROPERTY);

    MilestoneSearchCriteria criteria = new MilestoneSearchCriteria();
    criteria.setProjectIds(new SetSearchField<>(CurrentProjectVariables.getProjectId()));

    MilestoneService milestoneService = AppContextUtil.getSpringBean(MilestoneService.class);
    List<SimpleMilestone> milestones = (List<SimpleMilestone>) milestoneService.findPageableListByCriteria(new BasicSearchRequest<>(criteria));

    BeanContainer<String, SimpleMilestone> beanItem = new BeanContainer<>(SimpleMilestone.class);
    beanItem.setBeanIdProperty("id");

    milestones.forEach(beanItem::addBean);

    this.setContainerDataSource(beanItem);
    this.setItemCaptionPropertyId("name");
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:18,代码来源:MilestoneListSelect.java

示例2: RoleComboBox

import com.vaadin.data.util.BeanContainer; //导入方法依赖的package包/类
public RoleComboBox() {
    this.setNullSelectionAllowed(false);
    this.setItemCaptionMode(ItemCaptionMode.PROPERTY);

    RoleSearchCriteria criteria = new RoleSearchCriteria();

    RoleService roleService = AppContextUtil.getSpringBean(RoleService.class);
    List<SimpleRole> roles = (List<SimpleRole>) roleService.findPageableListByCriteria(new BasicSearchRequest<>(criteria));

    BeanContainer<String, SimpleRole> beanItem = new BeanContainer<>(SimpleRole.class);
    beanItem.setBeanIdProperty("id");
    this.setContainerDataSource(beanItem);
    this.setItemCaptionPropertyId("rolename");

    SimpleRole ownerRole = new SimpleRole();
    ownerRole.setId(-1);
    ownerRole.setRolename(UserUIContext.getMessage(RoleI18nEnum.OPT_ACCOUNT_OWNER));
    beanItem.addBean(ownerRole);

    roles.forEach(role -> {
        beanItem.addBean(role);
        if (Boolean.TRUE.equals(role.getIsdefault())) {
            this.setValue(role.getId());
        }
    });
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:27,代码来源:RoleComboBox.java

示例3: createItemContainer

import com.vaadin.data.util.BeanContainer; //导入方法依赖的package包/类
private BeanContainer<String, SecurityGroupMemberItemDto> createItemContainer() {
    BeanContainer<String, SecurityGroupMemberItemDto> container = new BeanContainer<String, SecurityGroupMemberItemDto>(
            SecurityGroupMemberItemDto.class);
    container.setBeanIdProperty("openstackId");
    container.setItemSorter(ViewUtil.getCaseInsensitiveItemSorter());
    return container;
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:8,代码来源:BaseSecurityGroupWindow.java


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