Package org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext

Examples of org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope


        final String sourceObjectId = objectOrResult(request);
        final Class<?> cls = forClass(request);
        final String variableName = request.getRequiredProperty(NAME);
        final String defaultObjectId = request.getOptionalProperty(DEFAULT);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);

        final RequestContext context = request.getContext();
        final ObjectAdapter sourceObject = context.getMappedObject(sourceObjectId);
        final boolean isSourceSet = sourceObject != null;
        final boolean isSourceAssignable = isSourceSet && (cls == null || cls.isAssignableFrom(sourceObject.getObject().getClass()));
View Full Code Here


    public void process(final Request request) {
        // String sourceObjectId = objectOrResult(request);
        final String variableName = request.getRequiredProperty(NAME);
        final String defaultValue = request.getOptionalProperty(VALUE);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);

        final RequestContext context = request.getContext();
        final Object currentValue = context.getVariable(variableName);
        if (currentValue == null) {
            request.appendDebug("     " + variableName + " set to " + defaultValue + " (" + scope + ")");
View Full Code Here

    @Override
    public void process(final Request request) {
        final String name = request.getRequiredProperty(NAME);
        final String scopeName = request.getRequiredProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName);
        request.processUtilCloseTag();
        changeScope(request, name, scope);
    }
View Full Code Here

        final RequestContext context = request.getContext();
        if (context.getVariable(name) != null) {
            request.skipUntilClose();
        } else {
            final String scopeName = request.getOptionalProperty(SCOPE);
            final Scope scope = RequestContext.scope(scopeName, Scope.SESSION);

            final String cookieName = request.getOptionalProperty("cookie", name);
            final String cookieValue = context.getCookie(cookieName);
            boolean hasObject;
            if (cookieValue != null) {
View Full Code Here

        final String name = request.getOptionalProperty(NAME);
        final String value = request.getOptionalProperty(VALUE);
        final String defaultTo = request.getOptionalProperty(DEFAULT);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final boolean isClear = request.getOptionalProperty("action", "set").equals("clear");
        final Scope scope = RequestContext.scope(scopeName, isClear ? Scope.SESSION : Scope.REQUEST);
        process(request, name, value, defaultTo, isClear, scope);
    }
View Full Code Here

        while (iterator.hasNext()) {
            final ObjectAdapter element = iterator.next();

            request.appendHtml("<li>");
            if (linkRow != null) {
                final Scope scope = linkRow == null ? Scope.INTERACTION : RequestContext.scope(linkRow.getScope());
                RequestContext context = request.getContext();
                final String rowId = context.mapObject(element, scope);
                request.appendHtml("<a class=\"item-select\" href=\"" + linkRow.getForwardView() + "?" + linkRow.getVariable()
                        + "=" + rowId + context.encodedInteractionParameters() + "\">");
            }
View Full Code Here

    @Override
    public void process(final Request request) {
        String name = request.getRequiredProperty(NAME);
        String resultName = request.getOptionalProperty(RESULT_NAME, name);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);
       
        String cookieString = request.getContext().getCookie(name);
       
        request.appendDebug("    " + resultName + " (" + scope + ") set to " + cookieString + " from cookie " + name);
        request.getContext().addVariable(resultName, cookieString, scope);
View Full Code Here

                        }
                    }
                    //String domainRoleName = role == null ? "" : role.titleString();
                   
                   
                    Scope scope2 = scope == null ? Scope.SESSION : RequestContext.scope(scope);
                    final String resultId = context.mapObject(result, scope2);
                    context.addVariable(resultName, resultId, scope);
                    context.addVariable("_username", username, Scope.SESSION);
                   
                    context.clearVariable(LOGON_OBJECT, Scope.SESSION);
View Full Code Here

        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("[,|/]");
        }
View Full Code Here

            format = new SimpleDateFormat(pattern);
        }

        final String name = request.getOptionalProperty(RESULT_NAME, fieldName);
        final String scopeName = request.getOptionalProperty(SCOPE);
        final Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);

        process(request, object, field, format, name, scope);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope

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.