Package org.zkoss.zul

Examples of org.zkoss.zul.Listitem$ExtraCtrl


    private void initializeProgressTypeList() {
        lbTypeProgress.addEventListener(Events.ON_SELECT, new EventListener() {

            @Override
            public void onEvent(Event event) {
                Listitem selectedItem = getSelectedItem((SelectEvent) event);
                if (selectedItem != null) {
                    ProgressType progressType = (ProgressType) selectedItem
                            .getValue();
                    configurationModel.setProgressType(progressType);
                }
            }
View Full Code Here


        currentAllocationType.doTheSelectionOn(allocationTypeSelector);
    }

    private void selectWorkers(Collection<? extends Resource> selectedWorkers) {
        for (Resource each : selectedWorkers) {
            Listitem listItem = findListItemFor(each);
            if (listItem != null) {
                listItem.setSelected(true);
            }
        }
    }
View Full Code Here

        if (filterFinishDate.getValue() != null) {
            finishDate = LocalDate.fromDateFields(filterFinishDate
                .getValue());
        }

        final Listitem item = filterLimitingResource.getSelectedItem();
        Boolean isLimitingResource = (item != null) ? LimitingResourceEnum
                .valueOf((LimitingResourceEnum) item.getValue()) : null;

        if (listFilters.isEmpty()
                && (personalFilter == null || personalFilter.isEmpty())
                && startDate == null && finishDate == null
                && isLimitingResource == null) {
View Full Code Here

    }

    private void setupFilterLimitingResourceListbox() {
        for(LimitingResourceEnum resourceEnum :
            LimitingResourceEnum.getLimitingResourceFilterOptionList()) {
            Listitem item = new Listitem();
            item.setParent(filterLimitingResource);
            item.setValue(resourceEnum);
            item.appendChild(new Listcell(resourceEnum.toString()));
            filterLimitingResource.appendChild(item);
        }
        filterLimitingResource.setSelectedIndex(0);
    }
View Full Code Here

        // Using 12 instead of months.length because of the array has 13
        // positions.
        // The reason to return 13 positions is because of some lunar calendars
        // would have 13 months instead of 12.
        for (int i = 0; i < 12; i++) {
            Listitem month = new Listitem();
            month.setLabel(months[i]);
            month.setValue("" + (i + 1));
            if (Calendar.getInstance().get(Calendar.MONTH) == i)
                month.setSelected(true);
            else
                month.setSelected(false);
            lbMonths.appendChild(month);
        }
    }
View Full Code Here

        int beginYear = hoursWorkedPerWorkerInAMonthModel
                .getBeginDisplayYears();
        int endYear = hoursWorkedPerWorkerInAMonthModel.getEndDisplayYears();
        if (beginYear != 0 && endYear != 0) {
            for (int i = beginYear; i <= endYear; i++) {
                Listitem year = new Listitem();
                year.setLabel("" + i);
                year.setValue("" + i);
                if (Calendar.getInstance().get(Calendar.YEAR) == i)
                    year.setSelected(true);
                else
                    year.setSelected(false);
                lbYears.appendChild(year);
            }
        } else {
            int year = Calendar.getInstance().get(Calendar.YEAR);
            Listitem itemYear = new Listitem();
            itemYear.setLabel("" + year);
            itemYear.setValue("" + year);
            lbYears.appendChild(itemYear);
        }
    }
View Full Code Here

    private String getSelectedMonth() {
        return getSelectedValue(lbMonths);
    }

    private String getSelectedValue(Listbox listbox) {
        Listitem item = listbox.getSelectedItem();
        return (item != null) ? (String) item.getValue() : getFirst(listbox);
    }
View Full Code Here

        Listitem item = listbox.getSelectedItem();
        return (item != null) ? (String) item.getValue() : getFirst(listbox);
    }

    private String getFirst(Listbox listbox) {
        final Listitem item = (Listitem) listbox.getItems().iterator().next();
        return (String) item.getValue();
    }
View Full Code Here

            bandboxSearch.setListboxWidth("450px");

            EventListener eventListenerUpdateResource = new EventListener() {
                @Override
                public void onEvent(Event event) {
                    Listitem selectedItem = bandboxSearch.getSelectedItem();
                    setResourceInESL(selectedItem, expenseSheetLine);
                }
            };
            bandboxSearch.setListboxEventListener(Events.ON_SELECT, eventListenerUpdateResource);
            bandboxSearch.setListboxEventListener(Events.ON_OK, eventListenerUpdateResource);
View Full Code Here

        }

        // First time is rendered, select first item
        TypeOfWorkHours type = hourCost.getType();
        if (hourCost.isNewObject() && type == null) {
            Listitem item = lbHoursType.getItemAtIndex(0);
            item.setSelected(true);
            setHoursType(hourCost, item);
        } else {
            // If hoursCost has a type, select item with that type
            Listitem item = ComponentsFinder.findItemByValue(lbHoursType, type);
            if (item != null) {
                lbHoursType.selectItem(item);
            }
        }

        lbHoursType.addEventListener(Events.ON_SELECT, new EventListener() {

            @Override
            public void onEvent(Event event) {
                Listitem item = lbHoursType.getSelectedItem();
                if (item != null) {
                    setHoursType((HourCost) row.getValue(), item);
                }
            }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listitem$ExtraCtrl

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.