com.vaadin.ui.HasComponents - java examples

Here are the examples of the java api com.vaadin.ui.HasComponents taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

71 Examples 7

19 View Complete Implementation : AbstractPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
protected void onHandleChain(HasComponents container, PageActionChain pageActionChain) {
    throw new UnsupportedOperationException("You need override this method");
}

19 View Complete Implementation : ProjectRoleListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.ROLES)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.ROLE_ENTRY, view);
        searchCriteria = (ProjectRoleSearchCriteria) data.getParams();
        doSearch(searchCriteria);
        ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadCrumb.gotoRoleList();
    } else {
        throw new SecureAccessException();
    }
}

19 View Complete Implementation : CmsRemovableFormRow.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Method to remove row.<p>
 */
void removeRow() {
    HasComponents parent = CmsRemovableFormRow.this.getParent();
    if (parent instanceof ComponentContainer) {
        ((ComponentContainer) parent).removeComponent(CmsRemovableFormRow.this);
    }
    if (m_remove != null) {
        m_remove.run();
    }
}

19 View Complete Implementation : IDGenerator.java
Copyright Apache License 2.0
Author : korpling
public static void replacedignIDForFields(HasComponents parent, Component... components) {
    for (Component c : components) {
        replacedignIDForField(parent, c);
    }
}

18 View Complete Implementation : ComponentAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.COMPONENTS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.COMPONENT_ENTRY, view);
        Component component = (Component) data.getParams();
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (component.getId() == null) {
            component.setSaccountid(AppUI.getAccountId());
            component.setProjectid(CurrentProjectVariables.getProject().getId());
            component.setStatus(StatusI18nEnum.Open.name());
            breadcrumb.gotoComponentAdd();
        } else {
            breadcrumb.gotoComponentEdit(component);
        }
        view.edireplacedem(component);
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

18 View Complete Implementation : RoleListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (UserUIContext.canRead(RolePermissionCollections.ACCOUNT_ROLE)) {
        AccountModule accountModule = (AccountModule) container;
        accountModule.gotoSubView(SettingUIConstants.ROLES, view);
        searchCriteria = (RoleSearchCriteria) data.getParams();
        doSearch(searchCriteria);
        AccountSettingBreadcrumb breadcrumb = ViewManager.getCacheComponent(AccountSettingBreadcrumb.clreplaced);
        breadcrumb.gotoRoleList();
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

18 View Complete Implementation : ThemeCustomizePresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
}

18 View Complete Implementation : UserAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    AccountModule accountModule = (AccountModule) container;
    accountModule.gotoSubView(SettingUIConstants.USERS, view);
    SimpleUser user = (SimpleUser) data.getParams();
    AccountSettingBreadcrumb breadcrumb = ViewManager.getCacheComponent(AccountSettingBreadcrumb.clreplaced);
    if (user.getUsername() == null) {
        user.setAccountId(AppUI.getAccountId());
        view.edireplacedem(user, false);
        breadcrumb.gotoUserAdd();
    } else {
        breadcrumb.gotoUserEdit(user);
        view.edireplacedem(user);
    }
}

18 View Complete Implementation : DDUtil.java
Copyright Apache License 2.0
Author : cuba-platform
public static void verifyHandlerType(HasComponents layout, DropHandler handler) {
    if (handler instanceof AbstractDefaultLayoutDropHandler) {
        AbstractDefaultLayoutDropHandler dropHandler = (AbstractDefaultLayoutDropHandler) handler;
        if (!dropHandler.getTargetLayoutType().isreplacedignableFrom(layout.getClreplaced())) {
            throw new IllegalArgumentException("Cannot add a handler for " + dropHandler.getTargetLayoutType() + " to a " + layout.getClreplaced());
        }
    }
}

18 View Complete Implementation : AbstractPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
public final void handleChain(HasComponents container, PageActionChain pageActionChain) {
    ScreenData pageAction = pageActionChain.pop();
    boolean isSuccess = go(container, pageAction);
    if (isSuccess) {
        if (pageActionChain.hasNext()) {
            onHandleChain(container, pageActionChain);
        } else {
            onDefaultStopChain();
        }
    }
}

18 View Complete Implementation : ProjectDashboardPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onHandleChain(HasComponents container, PageActionChain pageActionChain) {
    ScreenData<?> pageAction = pageActionChain.peek();
    Clreplaced<? extends IPresenter> presenterCls = ProjectPresenterDataMapper.presenter(pageAction);
    if (presenterCls != null) {
        IPresenter<?> presenter = PresenterResolver.getPresenter(presenterCls);
        presenter.handleChain(view, pageActionChain);
    } else {
        throw new UnsupportedOperationException("Not support page action chain " + pageAction);
    }
}

18 View Complete Implementation : TaskAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.TICKET_ENTRY, view);
        SimpleTask task = (SimpleTask) data.getParams();
        ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (task.getId() == null) {
            breadCrumb.gotoTaskAdd();
            task.setSaccountid(AppUI.getAccountId());
        } else {
            breadCrumb.gotoTaskEdit(task);
        }
        view.edireplacedem(task);
    } else {
        throw new SecureAccessException();
    }
}

17 View Complete Implementation : VersionListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.VERSIONS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.VERSION_ENTRY, view);
        searchCriteria = (VersionSearchCriteria) data.getParams();
        int totalCount = versionService.getTotalCount(searchCriteria);
        if (totalCount > 0) {
            doSearch(searchCriteria);
        } else {
            view.showNoItemView();
        }
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadcrumb.gotoVersionList();
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

17 View Complete Implementation : ComponentListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.COMPONENTS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.COMPONENT_ENTRY, view);
        searchCriteria = (ComponentSearchCriteria) data.getParams();
        int totalCount = componentService.getTotalCount(searchCriteria);
        if (totalCount > 0) {
            doSearch(searchCriteria);
        } else {
            view.showNoItemView();
        }
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadcrumb.gotoComponentList();
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

17 View Complete Implementation : ProjectAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    ProjectDashboardContainer projectViewContainer = (ProjectDashboardContainer) container;
    projectViewContainer.setContent(view);
    Project project = (Project) data.getParams();
    if (project.getId() == null) {
        project.setSaccountid(AppUI.getAccountId());
        AppUI.addFragment("project/add", UserUIContext.getMessage(GenericI18Enum.BROWSER_ADD_ITEM_replacedLE, UserUIContext.getMessage(ProjectI18nEnum.SINGLE)));
    } else {
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadcrumb.gotoProjectEdit();
    }
    view.edireplacedem(project);
}

17 View Complete Implementation : ProjectMemberEditPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.USERS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.SETTING, view);
        SimpleProjectMember member = (SimpleProjectMember) data.getParams();
        view.edireplacedem(member);
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (member.getId() == null) {
            breadcrumb.gotoUserAdd();
        } else {
            breadcrumb.gotoUserEdit(member);
        }
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

17 View Complete Implementation : IDGenerator.java
Copyright Apache License 2.0
Author : korpling
protected static String replacedignIDForField(HasComponents parent, Component c) {
    String fieldName = "c";
    if (parent != null && c != null) {
        // iterate over each field of the parent
        for (Field f : parent.getClreplaced().getDeclaredFields()) {
            if (Component.clreplaced.isreplacedignableFrom(f.getType())) {
                try {
                    f.setAccessible(true);
                    Component fieldComponent = (Component) f.get(parent);
                    if (fieldComponent == c) {
                        fieldName = f.getName();
                    }
                } catch (IllegalArgumentException | IllegalAccessException | SecurityException ex) {
                    log.warn("Could not automatically get field name for replacedigning ID", ex);
                }
            }
        }
    }
    return replacedignID(c, fieldName);
}

17 View Complete Implementation : ProjectViewPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
public void onGo(HasComponents container, ScreenData<?> data) {
    ProjectModule prjContainer = (ProjectModule) container;
    prjContainer.setContent(view);
    if (data.getParams() instanceof Integer) {
        ProjectService projectService = AppContextUtil.getSpringBean(ProjectService.clreplaced);
        SimpleProject project = projectService.findById((Integer) data.getParams(), AppUI.getAccountId());
        if (project == null) {
            throw new ResourceNotFoundException();
        } else {
            ProjectMemberService projectMemberService = AppContextUtil.getSpringBean(ProjectMemberService.clreplaced);
            boolean userBelongToProject = projectMemberService.isUserBelongToProject(UserUIContext.getUsername(), project.getId(), AppUI.getAccountId());
            if (userBelongToProject || UserUIContext.isAdmin()) {
                CurrentProjectVariables.setProject(project);
                view.initView(project);
            } else {
                throw new UserNotBelongProjectException();
            }
        }
    }
}

17 View Complete Implementation : UserWorkloadReportPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    IReportContainer reportContainer = (IReportContainer) container;
    reportContainer.addView(view);
    view.display();
    ReportBreadcrumb breadCrumb = ViewManager.getCacheComponent(ReportBreadcrumb.clreplaced);
    breadCrumb.gotoUserWorkloadReport();
}

16 View Complete Implementation : IDGenerator.java
Copyright Apache License 2.0
Author : korpling
public static void replacedignIDForEachField(HasComponents parent) {
    if (parent != null) {
        Iterator<Component> itComponents = parent.iterator();
        while (itComponents.hasNext()) {
            Component c = itComponents.next();
            replacedignIDForField(parent, c);
        }
    }
}

16 View Complete Implementation : IDGenerator.java
Copyright Apache License 2.0
Author : korpling
private static boolean childHasID(HasComponents parent, String id) {
    if (parent != null && id != null) {
        Iterator<Component> itChildren = parent.iterator();
        while (itChildren.hasNext()) {
            Component child = itChildren.next();
            if (id.equals(child.getId())) {
                return true;
            }
        }
    }
    return false;
}

16 View Complete Implementation : BoardContainerPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    ProjectModule module = (ProjectModule) container;
    module.setContent(view);
    IPresenter<?> presenter;
    if (data instanceof ProjectScreenData.GotoList) {
        presenter = PresenterResolver.getPresenter(ProjectListPresenter.clreplaced);
    } else if (data instanceof ReportScreenData.GotoConsole || data instanceof ReportScreenData.GotoWeeklyTiming || data instanceof ReportScreenData.GotoUserWorkload || data instanceof ReportScreenData.GotoTimesheet || data instanceof StandupScreenData.Search) {
        presenter = PresenterResolver.getPresenter(IReportPresenter.clreplaced);
    } else if (data instanceof ClientScreenData.Add || data instanceof ClientScreenData.Edit || data instanceof ClientScreenData.Read || data instanceof ClientScreenData.Search) {
        presenter = PresenterResolver.getPresenter(IClientPresenter.clreplaced);
    } else if (data instanceof ProjectModuleScreenData.SearchItem) {
        presenter = PresenterResolver.getPresenter(ProjectSearchItemPresenter.clreplaced);
    } else {
        presenter = PresenterResolver.getPresenter(UserProjectDashboardPresenter.clreplaced);
    }
    presenter.go(view, data);
}

16 View Complete Implementation : MilestoneAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.MILESTONES)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.MILESTONE_ENTRY, view);
        SimpleMilestone milestone = (SimpleMilestone) data.getParams();
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (milestone.getId() == null) {
            milestone.setSaccountid(AppUI.getAccountId());
            breadcrumb.gotoMilestoneAdd();
        } else {
            breadcrumb.gotoMilestoneEdit(milestone);
        }
        view.edireplacedem(milestone);
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

16 View Complete Implementation : ProjectMemberReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    boolean isCurrentUserAccess = false;
    if (data.getParams() instanceof String) {
        if (UserUIContext.getUsername().equals(data.getParams())) {
            isCurrentUserAccess = true;
        }
    }
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.USERS) || isCurrentUserAccess) {
        ProjectMemberService prjMemberService = AppContextUtil.getSpringBean(ProjectMemberService.clreplaced);
        SimpleProjectMember prjMember = null;
        if (data.getParams() instanceof Integer) {
            prjMember = prjMemberService.findById((Integer) data.getParams(), AppUI.getAccountId());
        } else if (data.getParams() instanceof String) {
            String username = (String) data.getParams();
            prjMember = prjMemberService.findMemberByUsername(username, CurrentProjectVariables.getProjectId(), AppUI.getAccountId());
        }
        if (prjMember != null) {
            ProjectView projectView = (ProjectView) container;
            projectView.gotoSubView(ProjectView.USERS_ENTRY, view);
            view.previewItem(prjMember);
            ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
            breadCrumb.gotoUserRead(prjMember);
        } else {
            NotificationUtil.showRecordNotExistNotification();
        }
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

16 View Complete Implementation : AbstractPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
public boolean go(HasComponents container, ScreenData<?> data) {
    if (!UserUIContext.getInstance().getIsValidAccount() && (!(this instanceof AccountModulePresenter) && ModuleHelper.getCurrentModule() != null && !ModuleHelper.isCurrentAccountModule())) {
        EventBusFactory.getInstance().post(new ShellEvent.GotoUserAccountModule(this, new String[] { "billing" }));
        return true;
    } else {
        initView();
        if (view == null) {
            LOG.error("Can not find view " + viewClreplaced);
            return false;
        }
        if (checkPermissionAccessIfAny()) {
            try {
                onGo(container, data);
            } catch (Throwable e) {
                onErrorStopChain(e);
                return false;
            }
        } else {
            NotificationUtil.showMessagePermissionAlert();
        }
        return true;
    }
}

15 View Complete Implementation : ProjectSummaryPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    ProjectDashboardContainer projectViewContainer = (ProjectDashboardContainer) container;
    projectViewContainer.setContent(view);
    view.lazyLoadView();
    ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
    breadcrumb.gotoProjectSummary();
}

15 View Complete Implementation : ComponentReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.COMPONENTS)) {
        if (data.getParams() instanceof Integer) {
            ComponentService componentService = AppContextUtil.getSpringBean(ComponentService.clreplaced);
            SimpleComponent component = componentService.findById((Integer) data.getParams(), AppUI.getAccountId());
            if (component != null) {
                ProjectView projectView = (ProjectView) container;
                projectView.gotoSubView(ProjectView.COMPONENT_ENTRY, view);
                view.previewItem(component);
                ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
                breadcrumb.gotoComponentRead(component);
            } else {
                NotificationUtil.showRecordNotExistNotification();
            }
        } else {
            throw new MyCollabException("Unhandle this case yet");
        }
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

15 View Complete Implementation : ProfileReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    ProfileContainer profileContainer = (ProfileContainer) container;
    profileContainer.removeAllComponents();
    profileContainer.addComponent(view);
    User currentUser = UserUIContext.getUser();
    view.previewItem(currentUser);
    AccountSettingBreadcrumb breadcrumb = ViewManager.getCacheComponent(AccountSettingBreadcrumb.clreplaced);
    breadcrumb.gotoProfile();
}

15 View Complete Implementation : RoleAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (UserUIContext.canWrite(RolePermissionCollections.ACCOUNT_ROLE)) {
        AccountModule accountModule = (AccountModule) container;
        accountModule.gotoSubView(SettingUIConstants.ROLES, view);
        Role role = (Role) data.getParams();
        AccountSettingBreadcrumb breadcrumb = ViewManager.getCacheComponent(AccountSettingBreadcrumb.clreplaced);
        if (role.getId() == null) {
            role.setSaccountid(AppUI.getAccountId());
            breadcrumb.gotoRoleAdd();
        } else {
            breadcrumb.gotoRoleEdit(role);
        }
        view.edireplacedem(role);
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

15 View Complete Implementation : LoginPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    MainWindowContainer windowContainer = (MainWindowContainer) container;
    windowContainer.setContent(view);
    AppUI.addFragment("user/login", LocalizationHelper.getMessage(SiteConfiguration.getDefaultLocale(), ShellI18nEnum.OPT_LOGIN_PAGE));
}

15 View Complete Implementation : DefaultDynaFormLayout.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
public AbstractComponent getLayout() {
    FormContainer layout = new FormContainer();
    int sectionCount = dynaForm.getSectionCount();
    sectionMappings = new HashMap<>();
    for (int i = 0; i < sectionCount; i++) {
        DynaSection section = dynaForm.getSection(i);
        if (section.isDeletedSection()) {
            continue;
        }
        HasComponents sectionContainer = null;
        if (section.getHeader() != null) {
            sectionContainer = new FormSection(UserUIContext.getMessage(section.getHeader()));
            layout.addComponent(sectionContainer);
        }
        GridFormLayoutHelper gridLayout;
        if (section.isDeletedSection() || section.getFieldCount() == 0) {
            continue;
        }
        if (section.getLayoutType() == LayoutType.ONE_COLUMN) {
            gridLayout = GridFormLayoutHelper.defaultFormLayoutHelper(section.getLayoutType());
            int rowIndex = 0;
            for (int j = 0; j < section.getFieldCount(); j++) {
                AbstractDynaField dynaField = section.getField(j);
                if (!excludeFields.contains(dynaField.getFieldName())) {
                    gridLayout.buildCell(dynaField.getFieldName(), UserUIContext.getMessage(dynaField.getDisplayName()), UserUIContext.getMessage(dynaField.getContextHelp()), 0, rowIndex, 2);
                    if (j < section.getFieldCount() - 1) {
                        rowIndex++;
                    }
                    if (dynaField.isCustom()) {
                        fieldMappings.put("customfield." + dynaField.getFieldName(), dynaField);
                    } else {
                        fieldMappings.put(dynaField.getFieldName(), dynaField);
                    }
                }
            }
        } else if (section.getLayoutType() == LayoutType.TWO_COLUMN) {
            gridLayout = GridFormLayoutHelper.defaultFormLayoutHelper(section.getLayoutType());
            int columnIndex = 0;
            int rowIndex = 0;
            for (int j = 0; j < section.getFieldCount(); j++) {
                AbstractDynaField dynaField = section.getField(j);
                if (!excludeFields.contains(dynaField.getFieldName())) {
                    if (dynaField.isColSpan()) {
                        if (columnIndex > 0) {
                            rowIndex++;
                        }
                        gridLayout.buildCell(dynaField.getFieldName(), UserUIContext.getMessage(dynaField.getDisplayName()), UserUIContext.getMessage(dynaField.getContextHelp()), 0, rowIndex, 2);
                        columnIndex = 0;
                        if (j < section.getFieldCount() - 1) {
                            rowIndex++;
                        }
                    } else {
                        gridLayout.buildCell(dynaField.getFieldName(), UserUIContext.getMessage(dynaField.getDisplayName()), UserUIContext.getMessage(dynaField.getContextHelp()), columnIndex, rowIndex);
                        columnIndex++;
                        if (columnIndex == 2) {
                            columnIndex = 0;
                            if (j < section.getFieldCount() - 1) {
                                rowIndex++;
                            }
                        }
                    }
                    if (dynaField.isCustom()) {
                        fieldMappings.put("customfield." + dynaField.getFieldName(), dynaField);
                    } else {
                        fieldMappings.put(dynaField.getFieldName(), dynaField);
                    }
                }
            }
        } else {
            throw new MyCollabException("Does not support attachForm layout except 1 or 2 columns");
        }
        if (sectionContainer != null) {
            ((FormSection) sectionContainer).setContent(gridLayout.getLayout());
        } else {
            sectionContainer = gridLayout.getLayout();
        }
        layout.addComponent(sectionContainer);
        sectionMappings.put(section, gridLayout);
    }
    return layout;
}

15 View Complete Implementation : BillingPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    AccountModule accountContainer = (AccountModule) container;
    accountContainer.gotoSubView(SettingUIConstants.BILLING, view);
}

15 View Complete Implementation : IDGenerator.java
Copyright Apache License 2.0
Author : korpling
public static String replacedignID(Component c, String fieldName) {
    String id = null;
    if (c != null && fieldName != null && !fieldName.isEmpty()) {
        Preconditions.checkArgument(c.isAttached(), "Component " + c.getConnectorId() + " must be attached before it can get an automatic ID.");
        id = c.getId();
        if (id == null) {
            // try to get the parent ID
            HasComponents parent = c.getParent();
            if (parent == null || parent instanceof UI) {
                // use clreplaced name as ID
                id = fieldName;
            } else {
                String parentID = parent.getId();
                if (parentID == null) {
                    parentID = replacedignID(parent);
                }
                String idBase = parentID + ":" + fieldName;
                // check that no other child has the same ID
                int counter = 1;
                id = idBase;
                while (childHasID(parent, id)) {
                    id = idBase + "." + counter++;
                }
            }
            c.setId(id);
        }
    }
    return id;
}

15 View Complete Implementation : BugAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.BUGS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.TICKET_ENTRY, view);
        SimpleBug bug = (SimpleBug) data.getParams();
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (bug.getId() == null) {
            breadcrumb.gotoBugAdd();
            bug.setSaccountid(AppUI.getAccountId());
        } else {
            breadcrumb.gotoBugEdit(bug);
        }
        view.edireplacedem(bug);
    } else {
        throw new SecureAccessException();
    }
}

15 View Complete Implementation : BugReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.BUGS)) {
        SimpleBug bug = null;
        if (data.getParams() instanceof Integer) {
            BugService bugService = AppContextUtil.getSpringBean(BugService.clreplaced);
            bug = bugService.findById((Integer) data.getParams(), AppUI.getAccountId());
        } else if (data.getParams() instanceof SimpleBug) {
            bug = (SimpleBug) data.getParams();
        }
        if (bug != null) {
            ProjectView projectView = (ProjectView) container;
            projectView.gotoSubView(ProjectView.TICKET_ENTRY, view);
            view.previewItem(bug);
            ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
            breadcrumb.gotoBugRead(bug);
        } else {
            throw new ResourceNotFoundException();
        }
    } else {
        throw new SecureAccessException();
    }
}

15 View Complete Implementation : MilestoneReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.MILESTONES)) {
        ProjectView projectView = (ProjectView) container;
        if (data.getParams() instanceof Integer) {
            MilestoneService milestoneService = AppContextUtil.getSpringBean(MilestoneService.clreplaced);
            SimpleMilestone milestone = milestoneService.findById((Integer) data.getParams(), AppUI.getAccountId());
            if (milestone != null) {
                projectView.gotoSubView(ProjectView.MILESTONE_ENTRY, view);
                view.previewItem(milestone);
                ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
                breadcrumb.gotoMilestoneRead(milestone);
            } else {
                throw new ResourceNotFoundException();
            }
        } else {
            throw new MyCollabException("Unhandle this case yet");
        }
    } else {
        throw new SecureAccessException();
    }
}

15 View Complete Implementation : PageAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.PAGES)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.PAGE_ENTRY, view);
        Page page = (Page) data.getParams();
        view.edireplacedem(page);
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (page.getPath().equals("")) {
            breadcrumb.gotoPageAdd();
        } else {
            breadcrumb.gotoPageEdit(page);
        }
    } else {
        throw new SecureAccessException();
    }
}

15 View Complete Implementation : PageListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.PAGES)) {
        ProjectView pageContainer = (ProjectView) container;
        pageContainer.gotoSubView(ProjectView.PAGE_ENTRY, view);
        String path = (String) data.getParams();
        if (path == null) {
            path = CurrentProjectVariables.getCurrentPagePath();
        } else {
            CurrentProjectVariables.setCurrentPagePath(path);
        }
        List<PageResource> resources = pageService.getResources(path, UserUIContext.getUsername());
        if (!CollectionUtils.isEmpty(resources)) {
            view.displayDefaultPages(resources);
        } else {
            view.showNoItemView();
        }
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadcrumb.gotoPageList();
    } else {
        throw new SecureAccessException();
    }
}

14 View Complete Implementation : MessageReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.MESSAGES)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.MESSAGE_ENTRY, view);
        if (data.getParams() instanceof Integer) {
            MessageService messageService = AppContextUtil.getSpringBean(MessageService.clreplaced);
            SimpleMessage message = messageService.findById((Integer) data.getParams(), AppUI.getAccountId());
            if (message != null) {
                view.previewItem(message);
                ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
                breadCrumb.gotoMessage(message);
            }
        } else {
            throw new MyCollabException("Unhanddle this case yet");
        }
    } else {
        throw new SecureAccessException();
    }
}

14 View Complete Implementation : ProjectRoleAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.ROLES)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.ROLE_ENTRY, view);
        ProjectRole role = (ProjectRole) data.getParams();
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (role.getId() == null) {
            role.setSaccountid(AppUI.getAccountId());
            role.setProjectid(CurrentProjectVariables.getProject().getId());
            breadcrumb.gotoRoleAdd();
        } else {
            breadcrumb.gotoRoleEdit(role);
        }
        view.edireplacedem(role);
    } else {
        throw new SecureAccessException();
    }
}

14 View Complete Implementation : VersionAddPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.VERSIONS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.VERSION_ENTRY, view);
        Version version = (Version) data.getParams();
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        if (version.getId() == null) {
            version.setSaccountid(AppUI.getAccountId());
            version.setProjectid(CurrentProjectVariables.getProjectId());
            version.setStatus(StatusI18nEnum.Open.name());
            breadcrumb.gotoVersionAdd();
        } else {
            breadcrumb.gotoVersionEdit(version);
        }
        view.edireplacedem(version);
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

14 View Complete Implementation : VersionReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.VERSIONS)) {
        if (data.getParams() instanceof Integer) {
            VersionService componentService = AppContextUtil.getSpringBean(VersionService.clreplaced);
            Version version = componentService.findById((Integer) data.getParams(), AppUI.getAccountId());
            if (version != null) {
                ProjectView projectView = (ProjectView) container;
                projectView.gotoSubView(ProjectView.VERSION_ENTRY, view);
                view.previewItem(version);
                ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
                breadcrumb.gotoVersionRead(version);
            } else {
                NotificationUtil.showRecordNotExistNotification();
            }
        } else {
            throw new MyCollabException("Unhanddle this case yet");
        }
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

14 View Complete Implementation : TaskReadPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.TASKS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.TICKET_ENTRY, view);
        SimpleTask task = null;
        if (data.getParams() instanceof Integer) {
            TaskService taskService = AppContextUtil.getSpringBean(TaskService.clreplaced);
            task = taskService.findById((Integer) data.getParams(), AppUI.getAccountId());
        } else if (data.getParams() instanceof SimpleTask) {
            task = (SimpleTask) data.getParams();
        }
        if (task != null) {
            view.previewItem(task);
            ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
            breadCrumb.gotoTaskRead(task);
        } else {
            NotificationUtil.showRecordNotExistNotification();
        }
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}

14 View Complete Implementation : UserProjectDashboardPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData data) {
    BoardContainer boardContainer = (BoardContainer) container;
    boardContainer.gotoSubView("Dashboard", view);
    view.lazyLoadView();
    AppUI.addFragment("project/dashboard", UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_DASHBOARD));
}

14 View Complete Implementation : ProfilePresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    AccountModule accountContainer = (AccountModule) container;
    accountContainer.gotoSubView(SettingUIConstants.PROFILE, view);
    AbstractPresenter<?> presenter;
    if (data == null) {
        presenter = PresenterResolver.getPresenter(ProfileReadPresenter.clreplaced);
    } else {
        throw new MyCollabException("Do not support screen data");
    }
    presenter.go(view, data);
}

14 View Complete Implementation : ReportPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    BoardContainer boardContainer = (BoardContainer) container;
    boardContainer.gotoSubView("Reports", view);
    if (data instanceof StandupScreenData.Search) {
        StandupListPresenter presenter = PresenterResolver.getPresenter(StandupListPresenter.clreplaced);
        presenter.go(view, data);
    } else if (data instanceof ReportScreenData.GotoUserWorkload) {
        UserWorkloadReportPresenter userWorkloadReportPresenter = PresenterResolver.getPresenter(UserWorkloadReportPresenter.clreplaced);
        userWorkloadReportPresenter.go(view, data);
    } else {
        view.showDashboard();
        ReportBreadcrumb breadcrumb = ViewManager.getCacheComponent(ReportBreadcrumb.clreplaced);
        breadcrumb.gotoReportDashboard();
    }
}

13 View Complete Implementation : MilestoneListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.MILESTONES)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.MILESTONE_ENTRY, view);
        view.lazyLoadView();
        ProjectBreadcrumb breadcrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadcrumb.gotoMilestoneList();
    } else {
        throw new SecureAccessException();
    }
}

13 View Complete Implementation : ProjectListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    BoardContainer boardContainer = (BoardContainer) container;
    boardContainer.gotoSubView("Projects", view);
    ProjectSearchCriteria searchCriteria = new ProjectSearchCriteria();
    searchCriteria.setStatuses(new SetSearchField<>(StatusI18nEnum.Open.name()));
    doSearch(searchCriteria);
    AppUI.addFragment("project/list", UserUIContext.getMessage(ProjectI18nEnum.LIST));
}

13 View Complete Implementation : ProjectCustomPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    ProjectView projectView = (ProjectView) container;
    projectView.gotoSubView(ProjectView.CUSTOM_ENTRY, view);
    ProjectNotificationSettingService projectNotificationSettingService = AppContextUtil.getSpringBean(ProjectNotificationSettingService.clreplaced);
    ProjectNotificationSetting notification = projectNotificationSettingService.findNotification(UserUIContext.getUsername(), CurrentProjectVariables.getProjectId(), AppUI.getAccountId());
    ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
    breadCrumb.gotoProjectSetting();
    view.showNotificationSettings(notification);
}

13 View Complete Implementation : ProjectMemberListPresenter.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.USERS)) {
        ProjectView projectView = (ProjectView) container;
        projectView.gotoSubView(ProjectView.USERS_ENTRY, view);
        ProjectMemberSearchCriteria criteria;
        if (data.getParams() == null) {
            criteria = new ProjectMemberSearchCriteria();
            criteria.setProjectIds(new SetSearchField<>(CurrentProjectVariables.getProjectId()));
            criteria.setStatuses(new SetSearchField<>(ProjectMemberStatusConstants.ACTIVE, ProjectMemberStatusConstants.NOT_ACCESS_YET));
            criteria.setSaccountid(new NumberSearchField(AppUI.getAccountId()));
        } else {
            criteria = (ProjectMemberSearchCriteria) data.getParams();
        }
        view.setSearchCriteria(criteria);
        ProjectBreadcrumb breadCrumb = ViewManager.getCacheComponent(ProjectBreadcrumb.clreplaced);
        breadCrumb.gotoUserList();
    } else {
        NotificationUtil.showMessagePermissionAlert();
    }
}