Package org.richfaces.model

Examples of org.richfaces.model.DataVisitor


        writeTopTabFirstSpacer(w, comp);


        if (tabPanel.getValue() != null) {
            try {
                DataVisitor visitor = new AbstractTogglePanelItemVisitor(tabPanel, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                    @Override
                    public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                    {
                        AbstractTab tab = (AbstractTab) item;
                        try {
View Full Code Here


            writeTabsLineSeparator(writer, component);
            writeTabsLine(writer, context, component);
        }
        if (tabPanel.getValue() != null) {
            try {
                final DataVisitor visitor = new AbstractTogglePanelItemVisitor(tabPanel, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                    @Override
                    public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                    {
                        AbstractTab tab = (AbstractTab) item;
                        TabRenderer renderer = (TabRenderer) tab.getRenderer(context);
View Full Code Here

        }

        if (item == null || !((UIComponent) item).isRendered()) {
            if (getValue() != null) {
                try {
                    DataVisitor visitor = new AbstractTogglePanelItemVisitor(this, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                        @Override
                        public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                        {
                                setActiveItem(item.getName());
                                return DataVisitResult.STOP;
View Full Code Here

//        TODO rewrite this method
        if(getValue() != null) {
//            TODO find out smarter way to calculate number of tabs
            final Map<Integer,Object> index2rowKey = new HashMap<Integer,Object>();
            final int[] sizeHolder = new int[1];
            DataVisitor visitor = new AbstractTogglePanelItemVisitor(this, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                @Override
                public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                {
                    index2rowKey.put(sizeHolder[0],getRowKey());
                    sizeHolder[0]++;
View Full Code Here

        }
//        TODO rewrite this
        if(getValue()!=null) {
            final int[] indexHodler = new int[] {Integer.MIN_VALUE};
            final int[] iHodler = new int[1];
            DataVisitor visitor = new AbstractTogglePanelItemVisitor(this, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                @Override
                public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                {
                        if (name.equals(item.getName())) {
                            indexHodler[0] = iHodler[0];
View Full Code Here

    @Override
    protected void doEncodeChildren(final ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
        final AbstractCarousel repeater = (AbstractCarousel) component;
        if (repeater.getValue() != null) {
            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) {
View Full Code Here

        final AbstractTogglePanel abstractTogglePanel = (AbstractTogglePanel) component;
        if (abstractTogglePanel.getValue() != null) {
                    try {
                        writer.startElement(HtmlConstants.DIV_ELEM, null);
                        writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-crl-sl", "class");
                        DataVisitor visitor = new AbstractTogglePanelItemVisitor(abstractTogglePanel, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                            @Override
                            public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                            {
                                try {
                                    ((UIComponent) item).encodeAll(context);
View Full Code Here

         */
        DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.US);
        format.setLenient(false);
        DataModel dataModel = getDataModel();
        if (dataModel instanceof ExtendedDataModel) {
            DataVisitor visitor = new DataVisitor() {
                //TODO Is this fine? or should we stack rowKeys and not use dataModel later on. I'don't know business rules of extendedDataModel, just used it once to do pagination with underlying EntityQuery from Seam

                public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                    return null;
                }
View Full Code Here

TOP

Related Classes of org.richfaces.model.DataVisitor

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.