Package org.richfaces.component

Examples of org.richfaces.component.AbstractChart


     */
    @Override
    public void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component)
            throws IOException {

        AbstractChart chart = (AbstractChart) component;

        VisitChart visitCallback = new VisitChart(chart);
        // copy attributes to parent tag and process data
        chart.visitTree(VisitContext.createVisitContext(FacesContext
                .getCurrentInstance()), visitCallback);

        // store data to parent tag
        component.getAttributes().put("chartData", visitCallback.getData());

        if (!visitCallback.isDataEmpty()) {
            component.getAttributes().put("charttype",
                    visitCallback.getChartType());
            component.getAttributes().put("xtype",
                    axisDataTypeToString(visitCallback.getKeyType()));
            component.getAttributes().put("ytype",
                    axisDataTypeToString(visitCallback.getValType()));
        }

        //set flag whether request to server should be sent
        boolean anyServerSideListener = chart.getPlotClickListener()!=null?true:false;
        if(!anyServerSideListener){
            //check if there is particular series listener
            List<MethodExpression> listeners = visitCallback.getParticularSeriesListeners();
            for (MethodExpression methodExpression : listeners) {
                if(methodExpression!=null){
View Full Code Here

TOP

Related Classes of org.richfaces.component.AbstractChart

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.