Package org.richfaces.component

Examples of org.richfaces.component.UIRepeat


    public boolean getRendersChildren() {
        return true;
    }

    public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
        final UIRepeat repeater = (UIRepeat) component;
        try {
            DataVisitor visitor = new DataVisitor() {
                public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                    repeater.setRowKey(context, rowKey);

                    if (repeater.isRowAvailable()) {
                        if (repeater.getChildCount() > 0) {
                            try {
                                for (UIComponent child : repeater.getChildren()) {
                                    child.encodeAll(context);
                                }
                            } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                            }
                        }
                    }

                    return DataVisitResult.CONTINUE;
                }
            };

            repeater.walk(context, visitor, null);
        } finally {
            repeater.setRowKey(context, null);
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.component.UIRepeat

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.