Examples of UIRepeat


Examples of org.apache.myfaces.view.facelets.component.UIRepeat

        facesContext.getExternalContext().getRequestMap().put("repeatValues", repeatValues);
       
        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root, "ui_repeat_offset2.xhtml");
       
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat");
        Assert.assertNotNull(repeat);
       
        FastWriter fw = new FastWriter();
        ResponseWriter rw = facesContext.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        facesContext.setResponseWriter(rw);
       
        repeat.encodeAll(facesContext);
       
        String content = fw.toString();

        int itemIndex1 = content.indexOf("B1");
        Assert.assertEquals(-1, itemIndex1);
View Full Code Here

Examples of org.apache.myfaces.view.facelets.component.UIRepeat

                                break;
                            }
                        }
                        else if (parent instanceof UIRepeat)
                        {
                            UIRepeat uirepeat = (UIRepeat) parent;
                            if (uirepeat.getIndex() + uirepeat.getStep() < uirepeat.getRowCount())
                            {
                                // only continue if we're in the last row
                                break;
                            }
                        }
View Full Code Here

Examples of org.apache.myfaces.view.facelets.component.UIRepeat

        // build testUIRepeat.xhtml
        UIViewRoot root = facesContext.getViewRoot();
        vdl.buildView(facesContext, root, "testUIRepeat.xhtml");
       
        // get the component instances
        UIRepeat repeat = (UIRepeat) root.findComponent("form:repeat");
        UIComponent outputText = repeat.getChildren().get(0);
       
        // create the ContextCallback
        TestContextCallback callback = new TestContextCallback(facesContext);
       
        // save some values in #{row} and #{status} and test the
View Full Code Here

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
Copyright © 2018 www.massapi.com. 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.