Package org.zkoss.zul

Examples of org.zkoss.zul.Listbox$ExtraCtrl


        initializeResourcesPerDayInput();
        effortInput.setSclass("assigned-hours-input");
        effortInput.setConstraint(constraintForHoursInput());
        loadEffort();

        assignmentFunctionListbox = new Listbox();
        assignmentFunctionListbox.setMold("select");
        assignmentFunctionListbox.setStyle("font-size: 10px");

        updateAssignmentFunctionListbox();
    }
View Full Code Here


                if (synchronizationInfo.isSuccessful()) {
                    groupbox.appendChild(new Label(_("Completed")));
                } else {

                    Listbox listbox = new Listbox();

                    listbox.setModel(new SimpleListModel(synchronizationInfo
                            .getFailedReasons()));
                    groupbox.appendChild(listbox);
                }
            }
        };
View Full Code Here

            return false;
        }

        if (workReportLine.getTypeOfWorkHours() == null) {
            // Locate TextboxOrder
            Listbox autoTypeOfHours = getTypeOfHours(row);
            if (autoTypeOfHours != null) {
                String message = autoTypeOfHours.getItems().isEmpty() ? _("Hours types are empty. Please, create some hours types before proceeding")
                        : _("cannot be empty");
                showInvalidMessage(autoTypeOfHours, message);
            }
            return false;
        }
View Full Code Here

     *
     * @param row
     */
    private void appendHoursType(final Row row) {
        final WorkReportLine workReportLine = (WorkReportLine) row.getValue();
        final Listbox lbHoursType = new Listbox();
        lbHoursType.setMold("select");
        lbHoursType.setModel(allHoursType);
        lbHoursType.renderAll();
        lbHoursType.applyProperties();

        if (lbHoursType.getItems().isEmpty()) {
            row.appendChild(lbHoursType);
            return;
        }

        // First time is rendered, select first item
        TypeOfWorkHours type = workReportLine.getTypeOfWorkHours();
        if (workReportLine.isNewObject() && type == null) {
            Listitem item = lbHoursType.getItemAtIndex(0);
            item.setSelected(true);
            setHoursType(workReportLine, item);
        } else {
            // If workReportLine 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((WorkReportLine) row.getValue(), item);
                }
            }

View Full Code Here

                    data.getIntendedResourcesPerDayInput());
            Label realResourcesPerDay = append(resourcesPerDayContainer,
                    data.getRealResourcesPerDay());
            realResourcesPerDay.setStyle("float: right; padding-right: 1em;");

            Listbox assignmentFunctionListbox = data.getAssignmentFunctionListbox();
            append(row, assignmentFunctionListbox);
            assignmentFunctionListbox.addEventListener(Events.ON_SELECT,
                    new EventListener() {
                        @Override
                        public void onEvent(Event arg0) throws Exception {
                            data.resetAssignmentFunction();
                        }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Listbox$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.