Package org.apache.isis.viewer.scimpi.dispatcher.view.form

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.form.HiddenInputField


        final String errorView = context.fullFilePath(parameterObject.forwardErrorTo == null ? context.getResourceFile() : parameterObject.forwardErrorTo);
        final String voidView = context.fullFilePath(parameterObject.forwardVoidTo == null ? context.getResourceFile() : parameterObject.forwardVoidTo);
        if (false /* action.isContributed() && !action.hasReturn() && parameterObject.resultOverride == null */) {
            parameterObject.resultOverride = objectId;
        }
        final HiddenInputField[] hiddenFields = new HiddenInputField[] { new HiddenInputField("_" + OBJECT, objectId), new HiddenInputField("_" + VERSION, version), new HiddenInputField("_" + FORM_ID, parameterObject.formId), new HiddenInputField("_" + METHOD, parameterObject.methodName),
                parameterObject.forwardResultTo == null ? null : new HiddenInputField("_" + VIEW, context.fullFilePath(parameterObject.forwardResultTo)), new HiddenInputField("_" + VOID, voidView), new HiddenInputField("_" + ERROR, errorView),
                parameterObject.completionMessage == null ? null : new HiddenInputField("_" + MESSAGE, parameterObject.completionMessage), parameterObject.scope == null ? null : new HiddenInputField("_" + SCOPE, parameterObject.scope),
                parameterObject.resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE, parameterObject.resultOverride), parameterObject.resultName == null ? null : new HiddenInputField("_" + RESULT_NAME, parameterObject.resultName),
                parameterObject.resultName == null ? null : new HiddenInputField(RequestContext.RESULT, (String) request.getContext().getVariable(RequestContext.RESULT)) };

        // TODO when the block contains a selector tag it doesn't disable it if
        // the field cannot be edited!!!
        final FormFieldBlock containedBlock = new FormFieldBlock() {
            @Override
View Full Code Here


            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));
        if (view != null) {
            hiddenFields.add(new HiddenInputField(VIEW, view));
        }
        hiddenFields.add(new HiddenInputField("_" + FORM_ID, formId));

        final FormState entryState = (FormState) request.getContext().getVariable(ENTRY_FIELDS);
        boolean isforThisForm = entryState != null && entryState.isForForm(formId);
        if (entryState != null && entryState.isForForm(formId)) {
        }
View Full Code Here

            errors = entryState.getError();
        }

        final String errorView = context.fullFilePath(forwardErrorTo == null ? context.getResourceFile() : forwardErrorTo);
        final List<HiddenInputField> hiddenFields = new ArrayList<HiddenInputField>();
        hiddenFields.add(new HiddenInputField("_" + OBJECT, actualObjectId));
        hiddenFields.add(new HiddenInputField("_" + VERSION, version));
        hiddenFields.add(new HiddenInputField("_" + FORM_ID, formId));
        hiddenFields.add(completionMessage == null ? null : new HiddenInputField("_" + MESSAGE, completionMessage));
        hiddenFields.add(forwardEditedTo == null ? null : new HiddenInputField("_" + VIEW, context.fullFilePath(forwardEditedTo)));
        hiddenFields.add(new HiddenInputField("_" + ERROR, errorView));
        hiddenFields.add(variable == null ? null : new HiddenInputField("_" + RESULT_NAME, variable));
        hiddenFields.add(resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE, resultOverride));
        hiddenFields.add(scope == null ? null : new HiddenInputField("_" + SCOPE, scope));

        if (!object.isTransient()) {
            // ensure all booleans are included so the pass back TRUE if set.
            final List<ObjectAssociation> fields2 = object.getSpecification().getAssociations(Contributed.EXCLUDED);
            for (int i = 0; i < fields2.size(); i++) {
                final ObjectAssociation field = fields2.get(i);
                if (!viewFields.contains(field) && field.getSpecification().containsFacet(BooleanValueFacet.class)) {
                    final String fieldId = field.getId();
                    final String value = getValue(context, field.get(object));
                    hiddenFields.add(new HiddenInputField(fieldId, value));
                }
            }
        }

        if (formTitle == null) {
View Full Code Here

            errors = entryState.getError();
        }

        final String errorView = context.fullFilePath(forwardErrorTo == null ? context.getResourceFile() : forwardErrorTo);
        final List<HiddenInputField> hiddenFields = new ArrayList<HiddenInputField>();
        hiddenFields.add(new HiddenInputField("_" + OBJECT, actualObjectId));
        hiddenFields.add(new HiddenInputField("_" + VERSION, version));
        hiddenFields.add(new HiddenInputField("_" + FORM_ID, formId));
        hiddenFields.add(completionMessage == null ? null : new HiddenInputField("_" + MESSAGE, completionMessage));
        hiddenFields.add(forwardEditedTo == null ? null : new HiddenInputField("_" + VIEW, context.fullFilePath(forwardEditedTo)));
        hiddenFields.add(new HiddenInputField("_" + ERROR, errorView));
        hiddenFields.add(variable == null ? null : new HiddenInputField("_" + RESULT_NAME, variable));
        hiddenFields.add(resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE, resultOverride));
        hiddenFields.add(scope == null ? null : new HiddenInputField("_" + SCOPE, scope));

        if (!object.isTransient()) {
            // ensure all booleans are included so the pass back TRUE if set.
            final List<ObjectAssociation> fields2 = object.getSpecification().getAssociations();
            for (int i = 0; i < fields2.size(); i++) {
                final ObjectAssociation field = fields2.get(i);
                if (!viewFields.contains(field) && field.getSpecification().containsFacet(BooleanValueFacet.class)) {
                    final String fieldId = field.getId();
                    final String value = getValue(context, field.get(object));
                    hiddenFields.add(new HiddenInputField(fieldId, value));
                }
            }
        }

        if (formTitle == null) {
View Full Code Here

        // String message = (String)
        // request.getContext().examplegetVariable("login-failure");

        final String error = request.getOptionalProperty(ERROR, request.getContext().getRequestedFile());
        final List<HiddenInputField> hiddenFields = new ArrayList<HiddenInputField>();
        hiddenFields.add(new HiddenInputField(ERROR, error));
        if (view != null) {
            hiddenFields.add(new HiddenInputField(VIEW, view));
        }

        final FormState entryState = (FormState) request.getContext().getVariable(ENTRY_FIELDS);
        final InputField nameField = createdField("username", "User Name", InputField.TEXT, entryState);
        final String width = request.getOptionalProperty("width");
View Full Code Here

            return;
        }
        final String objectId = context.mapObject(object, Scope.INTERACTION);
        final String errorView = context.fullFilePath(parameterObject.forwardErrorTo == null ? context.getResourceFile() : parameterObject.forwardErrorTo);
        final String voidView = context.fullFilePath(parameterObject.forwardVoidTo == null ? context.getResourceFile() : parameterObject.forwardVoidTo);
        final HiddenInputField[] hiddenFields = new HiddenInputField[] { new HiddenInputField("_" + OBJECT, objectId), new HiddenInputField("_" + VERSION, version), new HiddenInputField("_" + FORM_ID, parameterObject.formId), new HiddenInputField("_" + METHOD, parameterObject.methodName),
                parameterObject.forwardResultTo == null ? null : new HiddenInputField("_" + VIEW, context.fullFilePath(parameterObject.forwardResultTo)), new HiddenInputField("_" + VOID, voidView), new HiddenInputField("_" + ERROR, errorView),
                parameterObject.completionMessage == null ? null : new HiddenInputField("_" + MESSAGE, parameterObject.completionMessage), parameterObject.scope == null ? null : new HiddenInputField("_" + SCOPE, parameterObject.scope),
                parameterObject.resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE, parameterObject.resultOverride), parameterObject.resultName == null ? null : new HiddenInputField("_" + RESULT_NAME, parameterObject.resultName),
                parameterObject.resultName == null ? null : new HiddenInputField(RequestContext.RESULT, (String) request.getContext().getVariable(RequestContext.RESULT)) };

        // TODO when the block contains a selector tag it doesn't disable it if
        // the field cannot be edited!!!
        final FormFieldBlock containedBlock = new FormFieldBlock() {
            @Override
View Full Code Here

        final String voidView =
            context.fullFilePath(parameterObject.forwardVoidTo == null ? context.getResourceFile()
                : parameterObject.forwardVoidTo);
        final HiddenInputField[] hiddenFields =
            new HiddenInputField[] {
                new HiddenInputField("_" + OBJECT, objectId),
                new HiddenInputField("_" + VERSION, version),
                new HiddenInputField("_" + FORM_ID, parameterObject.formId),
                new HiddenInputField("_" + METHOD, parameterObject.methodName),
                parameterObject.forwardResultTo == null ? null : new HiddenInputField("_" + VIEW,
                    context.fullFilePath(parameterObject.forwardResultTo)),
                new HiddenInputField("_" + VOID, voidView),
                new HiddenInputField("_" + ERRORS, errorView),
                parameterObject.completionMessage == null ? null : new HiddenInputField("_" + MESSAGE,
                    parameterObject.completionMessage),
                parameterObject.scope == null ? null : new HiddenInputField("_" + SCOPE, parameterObject.scope),
                parameterObject.resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE,
                    parameterObject.resultOverride),
                parameterObject.resultName == null ? null : new HiddenInputField("_" + RESULT_NAME,
                    parameterObject.resultName),
                parameterObject.resultName == null ? null : new HiddenInputField(RequestContext.RESULT,
                    (String) request.getContext().getVariable(RequestContext.RESULT)) };

        // TODO when the block contains a selector tag it doesn't disable it if the field cannot be edited!!!
        final FormFieldBlock containedBlock = new FormFieldBlock() {
            @Override
View Full Code Here

        }

        final String errorView =
            context.fullFilePath(forwardErrorTo == null ? context.getResourceFile() : forwardErrorTo);
        final List<HiddenInputField> hiddenFields = new ArrayList<HiddenInputField>();
        hiddenFields.add(new HiddenInputField("_" + OBJECT, actualObjectId));
        hiddenFields.add(new HiddenInputField("_" + VERSION, version));
        hiddenFields.add(new HiddenInputField("_" + FORM_ID, formId));
        hiddenFields.add(completionMessage == null ? null : new HiddenInputField("_" + MESSAGE, completionMessage));
        hiddenFields.add(forwardEditedTo == null ? null : new HiddenInputField("_" + VIEW, context
            .fullFilePath(forwardEditedTo)));
        hiddenFields.add(new HiddenInputField("_" + ERRORS, errorView));
        hiddenFields.add(variable == null ? null : new HiddenInputField("_" + RESULT_NAME, variable));
        hiddenFields.add(resultOverride == null ? null : new HiddenInputField("_" + RESULT_OVERRIDE, resultOverride));
        hiddenFields.add(scope == null ? null : new HiddenInputField("_" + SCOPE, scope));

        if (!object.isTransient()) {
            // ensure all booleans are included so the pass back TRUE if set.
            final List<ObjectAssociation> fields2 = object.getSpecification().getAssociations();
            for (int i = 0; i < fields2.size(); i++) {
                final ObjectAssociation field = fields2.get(i);
                if (!viewFields.contains(field) && field.getSpecification().containsFacet(BooleanValueFacet.class)) {
                    final String fieldId = field.getId();
                    final String value = getValue(context, field.get(object));
                    hiddenFields.add(new HiddenInputField(fieldId, value));
                }
            }
        }

        if (formTitle == null) {
View Full Code Here

    public static void loginForm(final Request request, final String view) {
        // String message = (String) request.getContext().examplegetVariable("login-failure");

        final String error = request.getOptionalProperty(ERRORS, request.getContext().getRequestedFile());
        final List<HiddenInputField> hiddenFields = new ArrayList<HiddenInputField>();
        hiddenFields.add(new HiddenInputField(ERRORS, error));
        if (view != null) {
            hiddenFields.add(new HiddenInputField(VIEW, view));
        }

        final FormState entryState = (FormState) request.getContext().getVariable(ENTRY_FIELDS);
        final InputField nameField = createdField("username", "User Name", InputField.TEXT, entryState);
        final String width = request.getOptionalProperty("width");
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.scimpi.dispatcher.view.form.HiddenInputField

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.