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

Examples of org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.addVariable()


        // TODO error if all values are not set (not if use type is not set and all others are still defaults);

        if (object != null) {
            RequestContext context = request.getContext();
            context.addVariable(LOGON_OBJECT, object, Scope.SESSION);
            context.addVariable(LOGON_METHOD, method, Scope.SESSION);
            context.addVariable(LOGON_RESULT_NAME, result, Scope.SESSION);
            context.addVariable(LOGON_SCOPE, resultScope, Scope.SESSION);
            context.addVariable(PREFIX + "roles-field", role, Scope.SESSION);
//            context.addVariable(PREFIX + "isis-user", isisUser, Scope.SESSION);
View Full Code Here


        // TODO error if all values are not set (not if use type is not set and all others are still defaults);

        if (object != null) {
            RequestContext context = request.getContext();
            context.addVariable(LOGON_OBJECT, object, Scope.SESSION);
            context.addVariable(LOGON_METHOD, method, Scope.SESSION);
            context.addVariable(LOGON_RESULT_NAME, result, Scope.SESSION);
            context.addVariable(LOGON_SCOPE, resultScope, Scope.SESSION);
            context.addVariable(PREFIX + "roles-field", role, Scope.SESSION);
//            context.addVariable(PREFIX + "isis-user", isisUser, Scope.SESSION);
            context.addVariable(LOGON_FORM_ID, formId, Scope.SESSION);
View Full Code Here

        if (object != null) {
            RequestContext context = request.getContext();
            context.addVariable(LOGON_OBJECT, object, Scope.SESSION);
            context.addVariable(LOGON_METHOD, method, Scope.SESSION);
            context.addVariable(LOGON_RESULT_NAME, result, Scope.SESSION);
            context.addVariable(LOGON_SCOPE, resultScope, Scope.SESSION);
            context.addVariable(PREFIX + "roles-field", role, Scope.SESSION);
//            context.addVariable(PREFIX + "isis-user", isisUser, Scope.SESSION);
            context.addVariable(LOGON_FORM_ID, formId, Scope.SESSION);
        }
View Full Code Here

        if (object != null) {
            RequestContext context = request.getContext();
            context.addVariable(LOGON_OBJECT, object, Scope.SESSION);
            context.addVariable(LOGON_METHOD, method, Scope.SESSION);
            context.addVariable(LOGON_RESULT_NAME, result, Scope.SESSION);
            context.addVariable(LOGON_SCOPE, resultScope, Scope.SESSION);
            context.addVariable(PREFIX + "roles-field", role, Scope.SESSION);
//            context.addVariable(PREFIX + "isis-user", isisUser, Scope.SESSION);
            context.addVariable(LOGON_FORM_ID, formId, Scope.SESSION);
        }
       
View Full Code Here

            RequestContext context = request.getContext();
            context.addVariable(LOGON_OBJECT, object, Scope.SESSION);
            context.addVariable(LOGON_METHOD, method, Scope.SESSION);
            context.addVariable(LOGON_RESULT_NAME, result, Scope.SESSION);
            context.addVariable(LOGON_SCOPE, resultScope, Scope.SESSION);
            context.addVariable(PREFIX + "roles-field", role, Scope.SESSION);
//            context.addVariable(PREFIX + "isis-user", isisUser, Scope.SESSION);
            context.addVariable(LOGON_FORM_ID, formId, Scope.SESSION);
        }
       
        final String error = request.getOptionalProperty(ERROR, request.getContext().getRequestedFile());
View Full Code Here

            context.addVariable(LOGON_METHOD, method, Scope.SESSION);
            context.addVariable(LOGON_RESULT_NAME, result, Scope.SESSION);
            context.addVariable(LOGON_SCOPE, resultScope, Scope.SESSION);
            context.addVariable(PREFIX + "roles-field", role, Scope.SESSION);
//            context.addVariable(PREFIX + "isis-user", isisUser, Scope.SESSION);
            context.addVariable(LOGON_FORM_ID, formId, Scope.SESSION);
        }
       
        final String error = request.getOptionalProperty(ERROR, request.getContext().getRequestedFile());
        final List<HiddenInputField> hiddenFields = new ArrayList<HiddenInputField>();
        hiddenFields.add(new HiddenInputField(ERROR, error));
View Full Code Here

        final Iterator<ObjectAdapter> iterator = facet.iterator(collection);
        int row = 1;
        while (iterator.hasNext()) {
            final ObjectAdapter element = iterator.next();

            context.addVariable("row", "" + (row), Scope.REQUEST);
            String cls = "";
            if (rowClasses != null) {
                cls = " class=\"" + rowClasses[row % rowClasses.length] + "\"";
            }
            request.appendHtml("<tr" + cls + ">");
View Full Code Here

        request.appendHtml("<td" + className + ">");
        if (field.isVisible(IsisContext.getAuthenticationSession(), object, where).isAllowed()) {
            final ObjectAdapter fieldReference = field.get(object);
            final String source = fieldReference == null ? "" : context.mapObject(fieldReference, Scope.REQUEST);
            final String name = request.getOptionalProperty(RESULT_NAME, fieldName);
            context.addVariable(name, Request.getEncoder().encoder(source), Scope.REQUEST);

            if (linkView != null) {
                final String linkId = context.mapObject(object, Scope.REQUEST);
                final String linkName = request.getOptionalProperty(LINK_NAME, RequestContext.RESULT);
                final String linkObject = request.getOptionalProperty(LINK_OBJECT, linkId);
View Full Code Here

    private Crumbs getCrumbs(final Request request) {
        final RequestContext context = request.getContext();
        Crumbs crumbs = (Crumbs) context.getVariable(_HISTORY);
        if (crumbs == null) {
            crumbs = new Crumbs();
            context.addVariable(_HISTORY, crumbs, Scope.SESSION);
        }
        return crumbs;
    }

}
View Full Code Here

        } 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();
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.