Package org.zkoss.zul

Examples of org.zkoss.zul.Listitem$ExtraCtrl


            bandboxSearch.setListboxWidth("450px");

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


        return result;
    }

    private AdvanceTypeDTO getSelectedAdvanceType() {
        final Listitem item = lbAdvanceType.getSelectedItem();
        return (AdvanceTypeDTO) item.getValue();
    }
View Full Code Here

    public List<UnitType> getUnitTypes() {
        return materialsModel.getUnitTypes();
    }

    public void selectUnitType(Component self) {
        Listitem selectedItem = ((Listbox) self).getSelectedItem();
            UnitType unitType = (UnitType) selectedItem.getValue();
            Material material = (Material) ((Row) self.getParent()).getValue();
            material.setUnitType(unitType);
    }
View Full Code Here

    public void validateCalendarExceptionCodes(){
        Listbox listbox = (Listbox) window.getFellow("exceptionsList");
        if (listbox != null) {
            for (int i = 0; i < listbox.getItemCount(); i++) {
                Listitem item = (Listitem) listbox.getItems().get(i);
                if (item.getChildren().size() == 5) {
                    Textbox code = (Textbox) ((Listcell) item.getChildren()
                            .get(3)).getFirstChild();
                    if (code != null && !code.isDisabled()
                            && code.getValue().isEmpty()) {
                        throw new WrongValueException(code,
                                _("It cannot be empty"));
View Full Code Here

        reloadActivationPeriods();
    }

    public void onSelectException(Event event) {
        Listbox listBox = (Listbox) event.getTarget();
        Listitem item = (Listitem) listBox.getSelectedItem();
        if (item != null) {
            CalendarException calendarException = (CalendarException) item
                .getValue();
            setSelectedDay(calendarException.getDate());
            reloadDayInformation();
        }
    }
View Full Code Here

    private void updateAssignmentFunctionListbox() {
        initializeAndAppendFlatFunction(assignmentFunctionListbox);

        AssignmentFunction function = getAssignmentFunction();
        if (function != null) {
            Listitem listitem = new Listitem(_(function.getName()));
            listitem.setDisabled(true);
            assignmentFunctionListbox.appendChild(listitem);
            assignmentFunctionListbox.setSelectedItem(listitem);
        }
    }
View Full Code Here

        }
    }

    private void initializeAndAppendFlatFunction(
            Listbox assignmentFunctionListbox2) {
        Listitem listitem = new Listitem(
                _(AssignmentFunctionName.FLAT.toString()));
        assignmentFunctionListbox.getChildren().clear();
        assignmentFunctionListbox.appendChild(listitem);
        assignmentFunctionListbox.setSelectedItem(listitem);
    }
View Full Code Here

        private void addEventListener(Listitem item) {
            item.addEventListener(Events.ON_CLICK, new EventListener() {
                @Override
                public void onEvent(Event event) {
                    Listitem item = (Listitem) event.getTarget();
                    CalendarData calendarData = (CalendarData) item.getValue();

                    LocalDate dateValidFrom = baseCalendarModel
                            .getValidFrom(calendarData);
                    LocalDate expiringDate = calendarData.getExpiringDate();
View Full Code Here

    private Constraint checkMaxValue() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                Listitem item = (Listitem) comp.getParent().getParent();
                DirectAdvanceAssignment advance = (DirectAdvanceAssignment) item
                        .getValue();
                if (!manageOrderElementAdvancesModel
                        .hasConsolidatedAdvances(advance)) {
                    if (value == null
                            || (BigDecimal.ZERO.compareTo((BigDecimal) value) >= 0)) {
View Full Code Here

    }

    private void setPercentage(){
        if ((this.indexSelectedItem < editAdvances.getItemCount())
                && (this.indexSelectedItem >= 0)) {
            Listitem selectedItem = editAdvances.getItemAtIndex(indexSelectedItem);
            AdvanceAssignment advanceAssignment = (AdvanceAssignment) selectedItem
                    .getValue();

            DirectAdvanceAssignment directAdvanceAssignment;
            if (advanceAssignment instanceof IndirectAdvanceAssignment) {
                directAdvanceAssignment = manageOrderElementAdvancesModel
                        .calculateFakeDirectAdvanceAssignment((IndirectAdvanceAssignment) advanceAssignment);
            } else {
                directAdvanceAssignment = (DirectAdvanceAssignment) advanceAssignment;
            }
            final AdvanceMeasurement greatAdvanceMeasurement = this.manageOrderElementAdvancesModel
                    .getLastAdvanceMeasurement(directAdvanceAssignment);
            if (greatAdvanceMeasurement != null) {
                Listcell percentage = (Listcell) selectedItem.getChildren()
                        .get(3);
                ((Label) percentage.getFirstChild())
                        .setValue(this.manageOrderElementAdvancesModel
                                .getPercentageAdvanceMeasurement(
                                        greatAdvanceMeasurement).toString()
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.