Package org.apache.isis.viewer.scimpi.dispatcher.processor.Request

Examples of org.apache.isis.viewer.scimpi.dispatcher.processor.Request.RepeatMarker


            }

            @Override
            public void writeElement(final Request request, final RequestContext context, final ObjectAdapter element) {
                context.addVariable(variable, context.mapObject(element, Scope.REQUEST), Scope.REQUEST);
                final RepeatMarker end = request.createMarker();
                final RepeatMarker marker = block.getMarker();
                marker.repeat();
                request.processUtilCloseTag();
                end.repeat();
            }
        };
    }
View Full Code Here


    @Override
    public void process(final Request request) {
        final String name = request.getOptionalProperty(NAME, "unamed");
        request.closeEmpty();
        final RepeatMarker end = request.createMarker();

        final RepeatMarker marker = (RepeatMarker) request.getContext().getVariable("_block-" + name);
        marker.repeat();

        request.processUtilCloseTag();
        end.repeat();
    }
View Full Code Here

    }

    @Override
    public void process(final Request request) {
        final String name = request.getOptionalProperty(NAME, "unamed");
        final RepeatMarker start = request.createMarker();
        request.skipUntilClose();
        request.getContext().addVariable("_block-" + name, start, Scope.REQUEST);
    }
View Full Code Here

        } else {
            final String id = request.getOptionalProperty(COLLECTION);
            collection = context.getMappedObjectOrResult(id);
        }

        final RepeatMarker marker = request.createMarker();

        final String variable = request.getOptionalProperty(ELEMENT_NAME);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);
        final String rowClassesList = request.getOptionalProperty(ROW_CLASSES, ODD_ROW_CLASS + "|" + EVEN_ROW_CLASS);
        String[] rowClasses = new String[0];
        if (rowClassesList != null) {
            rowClasses = rowClassesList.split("[,|/]");
        }

        final CollectionFacet facet = collection.getSpecification().getFacet(CollectionFacet.class);
        if (facet.size(collection) == 0) {
            request.skipUntilClose();
        } else {
            final Iterator<ObjectAdapter> iterator = facet.iterator(collection);
            int row = 0;
            while (iterator.hasNext()) {
                final ObjectAdapter element = iterator.next();
                context.addVariable("row", "" + (row + 1), Scope.REQUEST);
                if (rowClassesList != null) {
                    context.addVariable("row-class", rowClasses[row % rowClasses.length], Scope.REQUEST);
                }
                context.addVariable(variable, context.mapObject(element, scope), scope);
                marker.repeat();
                request.processUtilCloseTag();
                row++;
            }
        }
    }
View Full Code Here

    @Override
    public void process(final Request request) {
        final TableBlock block = (TableBlock) request.getBlockContent();
       
        final RepeatMarker start = request.createMarker();
        block.setMarker(start);
       
        final String linkView = request.getOptionalProperty(LINK_VIEW);
        if (linkView != null) {
            block.setlinkView(linkView);
View Full Code Here

        } else {
            final String id = request.getOptionalProperty(COLLECTION);
            collection = context.getMappedObjectOrResult(id);
        }

        final RepeatMarker marker = request.createMarker();

        final String variable = request.getOptionalProperty(ELEMENT_NAME);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);
        final String rowClassesList = request.getOptionalProperty(ROW_CLASSES, ODD_ROW_CLASS + "|" + EVEN_ROW_CLASS);
        String[] rowClasses = new String[0];
        if (rowClassesList != null) {
            rowClasses = rowClassesList.split("[,|/]");
        }

        final CollectionFacet facet = collection.getSpecification().getFacet(CollectionFacet.class);
        if (facet.size(collection) == 0) {
            request.skipUntilClose();
        } else {
            final Iterator<ObjectAdapter> iterator = facet.iterator(collection);
            int row = 0;
            while (iterator.hasNext()) {
                final ObjectAdapter element = iterator.next();
                context.addVariable("row", "" + (row + 1), Scope.REQUEST);
                if (rowClassesList != null) {
                    context.addVariable("row-class", rowClasses[row % rowClasses.length], Scope.REQUEST);
                }
                context.addVariable(variable, context.mapObject(element, scope), scope);
                marker.repeat();
                request.processUtilCloseTag();
                row++;
            }
        }
    }
View Full Code Here

            }

            @Override
            public void writeElement(final Request request, final RequestContext context, final ObjectAdapter element) {
                context.addVariable(variable, context.mapObject(element, Scope.REQUEST), Scope.REQUEST);
                final RepeatMarker end = request.createMarker();
                final RepeatMarker marker = block.getMarker();
                marker.repeat();
                request.processUtilCloseTag();
                end.repeat();
            }
        };
    }
View Full Code Here

    }

    @Override
    public void process(final Request request) {
        final TableBlock block = (TableBlock) request.getBlockContent();
        final RepeatMarker start = request.createMarker();
        block.setMarker(start);
        request.skipUntilClose();
    }
View Full Code Here

            }

            @Override
            public void writeElement(final Request request, final RequestContext context, final ObjectAdapter element) {
                context.addVariable(variable, context.mapObject(element, Scope.REQUEST), Scope.REQUEST);
                final RepeatMarker end = request.createMarker();
                final RepeatMarker marker = block.getMarker();
                marker.repeat();
                request.processUtilCloseTag();
                end.repeat();
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.scimpi.dispatcher.processor.Request.RepeatMarker

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.