Package org.zkoss.zul

Examples of org.zkoss.zul.Comboitem


        List<UserRole> roles = new ArrayList<UserRole>(Arrays.asList(UserRole
                .values()));
        roles.remove(UserRole.ROLE_BOUND_USER);

        for (UserRole role : roles) {
            Comboitem item = combo.appendItem(_(role.getDisplayName()));
            item.setValue(role);
        }
    }
View Full Code Here


    public Profile getProfile() {
        return profileModel.getProfile();
    }

    public void addSelectedRole() {
        Comboitem comboItem = userRolesCombo.getSelectedItem();
        if(comboItem != null) {
            addRole((UserRole)comboItem.getValue());
        }
    }
View Full Code Here

            if (filterByNameCombo == null) {
                return;
            }
            filterByNameCombo.getChildren().clear();

            Comboitem lastItem = new Comboitem();
            lastItem.setLabel(_("All"));
            lastItem.setDescription(_("Show all elements"));
            lastItem.setValue(ALL);
            pages.add(lastItem);

            for (Comboitem each : pages) {
                filterByNameCombo.appendChild(each);
            }
View Full Code Here

            for (int startPos = 0; startPos < elements.size(); startPos += pageSize) {
                int endPos = Math.min(startPos + pageSize - 1,
                        elements.size() - 1);
                String first = nameExtractor.getNameOf(elements.get(startPos));
                String end = nameExtractor.getNameOf(elements.get(endPos));
                Comboitem item = buildPageCombo(startPos, first, end);
                result.add(item);
            }
            return result;
        }
View Full Code Here

            return result;
        }

        private Comboitem buildPageCombo(int startPosition, String first,
                String end) {
            Comboitem result = new Comboitem();
            result.setLabel(first.substring(0, 1) + " - " + end.substring(0, 1));
            result.setDescription(first + " - " + end);
            result.setValue(startPosition);
            return result;
        }
View Full Code Here

        // Setter, set type selected to HourCost.type
        autocomplete.addEventListener("onSelect", new EventListener() {

            @Override
            public void onEvent(Event event) {
                final Comboitem comboitem = autocomplete.getSelectedItem();

                if(comboitem != null) {
                    // Update resourcesCostCategoryAssignment
                    ResourcesCostCategoryAssignment assignment =
                        (ResourcesCostCategoryAssignment) row.getValue();
                    assignment.setCostCategory((CostCategory) comboitem.getValue());
                    row.setValue(assignment);
                }
            }
        });
        row.appendChild(autocomplete);
View Full Code Here

        hoursWorkedPerWorkerModel.removeSelectedResource(resource);
        Util.reloadBindings(lbResources);
    }

    private Resource getSelectedCurrentResource() {
        Comboitem itemSelected = filterResource.getSelectedItem();
        if ((itemSelected != null)
                && (((Resource) itemSelected.getValue()) != null)) {
            return (Resource) itemSelected.getValue();
        }
        return null;
    }
View Full Code Here

    private IBaseCalendarModel resourceCalendarModel;

    private void createCalendar() {
        Combobox combobox = (Combobox) editWindow
                .getFellow("createDerivedCalendar");
        Comboitem selectedItem = combobox.getSelectedItem();
        if (selectedItem == null) {
            throw new WrongValueException(combobox,
                    _("Please, select a calendar"));
        }
View Full Code Here

    }

    private void appendComboboxLabels(final Row row) {
        final WorkReportLabelTypeAssigment workReportLabelTypeAssigment = (WorkReportLabelTypeAssigment) row
                .getValue();
        Comboitem selectedItemType = ((Autocomplete) row.getFirstChild())
                .getSelectedItem();

        LabelType selectedLabelType = null;
        if (selectedItemType != null) {
            selectedLabelType = (LabelType) selectedItemType.getValue();
        }

        final Combobox comboLabels = createComboboxLabels(selectedLabelType,
                workReportLabelTypeAssigment);
        comboLabels.setParent(row);
View Full Code Here

        Autocomplete comboLabelTypes = new Autocomplete();
        comboLabelTypes.setButtonVisible(true);

        final Set<LabelType> listLabelType = getMapLabelTypes().keySet();
        for (LabelType labelType : listLabelType) {
            Comboitem comboItem = new Comboitem();
            comboItem.setValue(labelType);
            comboItem.setLabel(labelType.getName());
            comboItem.setParent(comboLabelTypes);

            if ((workReportLabelTypeAssigment.getLabelType() != null)
                    && (workReportLabelTypeAssigment.getLabelType()
                            .equals(labelType))) {
                comboLabelTypes.setSelectedItem(comboItem);
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Comboitem

Copyright © 2018 www.massapicom. 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.