Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlPanelGrid



    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlPanelGrid();
    }
View Full Code Here


            constraintEditorDiv.setStyle("text-align:center;font-size:10pt;" + hideStyle);
            output = new HtmlOutputText();
            output.setEscape(false);
            output.setValue(Messages.getStringJSF("constraint.info.new") + "<br />");
            constraintEditorDiv.getChildren().add(output);
            HtmlPanelGrid panel = new HtmlPanelGrid();
            panel.setStyle("font-size:10pt;text-align:left;");
            panel.setColumns(2);
            if (workflowStates != null) {
                HtmlOutputText outputWorkflowState = new HtmlOutputText();
                outputWorkflowState.setValue(Messages.getStringJSF("constraint.info.workflowState"));
                panel.getChildren().add(outputWorkflowState);
                HtmlSelectOneMenu select = new HtmlSelectOneMenu();
                UISelectItem item = new UISelectItem();
                item.setItemValue(null);
                item.setItemLabel(Messages.getStringJSF("constraint.workflowstate.all"));
                select.getChildren().add(item);
                select.setId("workflowState" + getItemUuid());
                for (WorkflowState workflowState : workflowStates) {
                    item = new UISelectItem();
                    item.setItemValue(workflowState.getUuid());
                    item.setItemLabel(workflowState.getDisplayName());
                    select.getChildren().add(item);
                }
                panel.getChildren().add(select);
            }
            HtmlOutputText outputConstraintType = new HtmlOutputText();
            outputConstraintType.setValue(Messages.getStringJSF("constraint.info.constraintType"));
            panel.getChildren().add(outputConstraintType);
            HtmlSelectOneMenu select = new HtmlSelectOneMenu();
            select.setId("constraintType" + getItemUuid());
            for (ConstraintType constraintType : ConstraintType.values()) {
                if (constraintType != ConstraintType.DEFAULT) {
                    UISelectItem item = new UISelectItem();
                    item.setItemValue(constraintType);
                    item.setItemLabel(Messages.getStringJSF("ConstraintType." + constraintType.name()));
                    select.getChildren().add(item);
                }
            }
            panel.getChildren().add(select);
            if (constraintClients != null) {
                HtmlOutputText outputConstraintClient = new HtmlOutputText();
                outputConstraintClient.setValue(Messages.getStringJSF("constraint.info.constraintClient"));
                panel.getChildren().add(outputConstraintClient);
                select = new HtmlSelectOneMenu();
                select.setId("constraintClient" + getItemUuid());
                UISelectItem item = new UISelectItem();
                item.setItemValue(null);
                item.setItemLabel(Messages.getStringJSF("constraint.constraintclient.all"));
                select.getChildren().add(item);
                for (ConstraintClient constraintClient : constraintClients) {
                    item = new UISelectItem();
                    item.setItemValue(constraintClient.getUuid());
                    item.setItemLabel(constraintClient.getDisplayName());
                    select.getChildren().add(item);
                }
                panel.getChildren().add(select);
            }
            HtmlOutputText empty = new HtmlOutputText();
            panel.getChildren().add(empty);
            HtmlOutputText save = new HtmlOutputText();
            save.setEscape(false);
            save.setValue("<button href=\"#\" onclick=\"addConstraint('" + getItemUuid() + "','" + getItemUuid() + "');\">"
                    + Messages.getStringJSF("constraint.button.add")
                    + "</button>");
            panel.getChildren().add(save);
            constraintEditorDiv.getChildren().add(panel);
            HtmlPanelGrid listPanel = new HtmlPanelGrid();
            listPanel.setStyle("font-size:10pt;text-align:left;");
            int columns = 7;
            if (workflowStates == null) {
                columns = columns - 2;
            }
            if (constraintClients == null) {
                columns = columns - 2;
            }
            listPanel.setColumns(columns);
            if (constraints != null) {
                if (!constraints.isEmpty()) {
                    output = new HtmlOutputText();
                    output.setEscape(false);
                    output.setValue("<br />" + Messages.getStringJSF("constraint.info.current") + "<br />");
                    constraintEditorDiv.getChildren().add(output);
                }
                for (Constraint constraint : constraints) {
                    if (workflowStates != null) {
                        HtmlOutputText tmpOutput = new HtmlOutputText();
                        if (constraint.getWorkflowState() != null) {
                            tmpOutput.setValue(constraint.getWorkflowState().getDisplayName() + ",");
                        } else {
                            tmpOutput.setValue(Messages.getStringJSF("constraint.workflowstate.all") + ",");
                        }
                        HtmlOutputText outputWorkflowState = new HtmlOutputText();
                        outputWorkflowState.setValue(Messages.getStringJSF("constraint.info.workflowState"));
                        listPanel.getChildren().add(outputWorkflowState);
                        listPanel.getChildren().add(tmpOutput);
                    }
                    HtmlOutputText tmpOutput = new HtmlOutputText();
                    String comma = ",";
                    if (constraintClients == null) {
                        comma = "";
                    }
                    tmpOutput.setValue(Messages.getStringJSF("ConstraintType." + constraint.getConstraintType().name()) + comma);
                    outputConstraintType = new HtmlOutputText();
                    outputConstraintType.setValue(Messages.getStringJSF("constraint.info.constraintType"));
                    listPanel.getChildren().add(outputConstraintType);
                    listPanel.getChildren().add(tmpOutput);
                    if (constraintClients != null) {
                        tmpOutput = new HtmlOutputText();
                        if (constraint.getConstraintClient() != null) {
                            tmpOutput.setValue(constraint.getConstraintClient().getDisplayName());
                        } else {
                            tmpOutput.setValue(Messages.getStringJSF("constraint.constraintclient.all"));
                        }
                        HtmlOutputText outputConstraintClient = new HtmlOutputText();
                        outputConstraintClient.setValue(Messages.getStringJSF("constraint.info.constraintClient"));
                        listPanel.getChildren().add(outputConstraintClient);
                        listPanel.getChildren().add(tmpOutput);
                    }
                    tmpOutput = new HtmlOutputText();
                    tmpOutput.setEscape(false);
                    tmpOutput.setValue("<div class=\"deleteConstraint\" onclick=\"deleteConstraint('" + constraint.hashCode() + "','" + getItemUuid() + "');\"></div>");
                    listPanel.getChildren().add(tmpOutput);
                }
            }
            constraintEditorDiv.getChildren().add(listPanel);
            getChildren().add(constraintEditorDiv);
        }
View Full Code Here

    public static final String FAMILY = "at.rits.formbuilder";

    @Override
    public void encodeBegin(FacesContext ctx, UIComponent component) throws IOException {
        FormDataResultInternal formDatasResult = (FormDataResultInternal)component;
        HtmlPanelGrid panelGrid = new HtmlPanelGrid();
        panelGrid.setColumns(2);
        Collection<FormDataResult> formDataResults = FormDataResultFactory.getFormDataResults(formDatasResult.getFormDatas());
        for(FormDataResult formDataResult : formDataResults) {
            String description = formDataResult.getFormBuilderItem().getProperties().getLabel();
            HtmlOutputText descriptionHtmlOutputText = new HtmlOutputText();
            descriptionHtmlOutputText.setValue(description);
            panelGrid.getChildren().add(descriptionHtmlOutputText);
            if(formDataResult instanceof FormDataPieChartResult) {
                FormDataResultPieChart pieChartComponent = new FormDataResultPieChart();
                pieChartComponent.setPieChart((FormDataPieChartResult)formDataResult);
                panelGrid.getChildren().add(pieChartComponent);
            } else if(formDataResult instanceof FormDataStringResult) {
                FormDataResultString stringFormDatasResultComponent = new FormDataResultString();
                stringFormDatasResultComponent.setStringFormDataResult((FormDataStringResult)formDataResult);
                panelGrid.getChildren().add(stringFormDatasResultComponent);
            } else if(formDataResult instanceof FormDataFloatResult) {
                FormDataResultFloat floatFormDatasResultComponent = new FormDataResultFloat();
                floatFormDatasResultComponent.setFloatFormDataResult((FormDataFloatResult)formDataResult);
                panelGrid.getChildren().add(floatFormDatasResultComponent);
            }
        }
        component.getChildren().add(panelGrid);
    }
View Full Code Here

        }
        String captionClass;
        String captionStyle;
        if (component instanceof HtmlPanelGrid)
        {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        }
        else if (component instanceof HtmlDataTable)
        {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
View Full Code Here

        }
        String captionClass;
        String captionStyle;
        if (component instanceof HtmlPanelGrid)
        {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        }
        else if (component instanceof HtmlDataTable)
        {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
View Full Code Here

        }
        String captionClass;
        String captionStyle;
        if (component instanceof HtmlPanelGrid)
        {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        }
        else if (component instanceof HtmlDataTable)
        {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
View Full Code Here

        String captionClass;
        String captionStyle;

        if (component instanceof HtmlPanelGrid)
        {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        }
        else if (component instanceof HtmlDataTable)
        {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
View Full Code Here

        }
        String captionClass;
        String captionStyle;
        if (component instanceof HtmlPanelGrid)
        {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        }
        else if (component instanceof HtmlDataTable)
        {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
View Full Code Here

        }
        String captionClass;
        String captionStyle;
        if (component instanceof HtmlPanelGrid)
        {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        }
        else if (component instanceof HtmlDataTable)
        {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
View Full Code Here

        String captionClass;
        String captionStyle;

        if (component instanceof HtmlPanelGrid) {
            HtmlPanelGrid panelGrid = (HtmlPanelGrid) component;
            captionClass = panelGrid.getCaptionClass();
            captionStyle = panelGrid.getCaptionStyle();
        } else if (component instanceof HtmlDataTable) {
            HtmlDataTable dataTable = (HtmlDataTable) component;
            captionClass = dataTable.getCaptionClass();
            captionStyle = dataTable.getCaptionStyle();
        } else {
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlPanelGrid

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.