Package at.reppeitsolutions.formbuilder.components

Examples of at.reppeitsolutions.formbuilder.components.FormDataResultPieChart


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

    @Override
    public void encodeBegin(FacesContext ctx, UIComponent component) throws IOException {
        ResponseWriter writer = ctx.getResponseWriter();
        FormDataResultPieChart pieChartComponent = (FormDataResultPieChart) component;
        FormDataPieChartResult pieChart = pieChartComponent.getPieChart();
        if (pieChart != null && pieChart.getValues() != null && !pieChart.getValues().isEmpty()) {
            String pieChartId = "pieChart" + UUID.randomUUID().toString();
            String json = "[";
            for (Map.Entry pairs : pieChart.getValues().entrySet()) {
                json += "{label:\"" + pairs.getKey() + "\",data:" + pairs.getValue() + "},";
View Full Code Here


            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);
View Full Code Here

TOP

Related Classes of at.reppeitsolutions.formbuilder.components.FormDataResultPieChart

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.