Examples of JSONLiteral


Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.validation.isEmailAddress,false,true]"));
       
        accumulateProfileProperty(field, profile,
                ValidationConstants.CONSTRAINTS, buildMessage(context, field));
    }
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.validation.isValidPattern,\""
                        + _quotedPattern + "\"]"));
       
        accumulateProfileProperty(field, profile,
                ValidationConstants.CONSTRAINTS, buildMessage(context, field));
    }
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

        String func = (_matchType == MATCH) ?
                "tapestry.form.validation.isEqual" :
                "tapestry.form.validation.isNotEqual";

        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[" + func + ",\""
                                + referent.getClientId() + "\"]"));
        // could define and use a new ValidationConstants.CONFIRM here to apply to
        // the profile, but it doesn't support differ.
        accumulateProfileProperty(field, profile,
                ValidationConstants.CONSTRAINTS, buildIdentityMessage(context, field, referent));
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.validation.isText,{"
                        + "maxlength:" + _maxLength + "}]"));
       
        accumulateProfileProperty(field, profile,
                ValidationConstants.CONSTRAINTS, buildMessage(context, field));
    }
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

       
        // now create widget parms

        JSONObject json = new JSONObject();
        json.put("inputNodeId", getClientId());
        json.put("optionValues", new JSONLiteral(optStr.toString()));

        if (selectedIndex > -1)
        {
            json.put("selectedIndex", selectedIndex);
        }
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.datetime.isValidDate,{"
                        + "min:"
                        + JSONObject.quote(translator.format(field, context.getLocale(), _minDate))
                        + ","
                        + "datePattern:"
                        + JSONObject.quote(translator.getPattern())
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.datetime.isValidDate,{"
                        + "max:"
                        + JSONObject.quote(translator.format(field, context.getLocale(), _maxDate))
                        + ","
                        + "datePattern:"
                        + JSONObject.quote(translator.getPattern())
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.validation.isText,{"
                        + "minlength:" + _minLength + "}]"));
       
        accumulateProfileProperty(field, profile,
                ValidationConstants.CONSTRAINTS, buildMessage(context, field));
    }
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            String js = "tapestry.form." + type + "('" + form.getClientId() + "', '" + getName() + "'";
           
            if (isAsync)
            {
                JSONObject json = new JSONObject();
                json.put(new JSONLiteral("async"), Boolean.TRUE);
                json.put(new JSONLiteral("json"), isJson());

                DirectServiceParameter dsp = new DirectServiceParameter(form, null, this);
                json.put(new JSONLiteral("url"), new JSONLiteral("this.href"));

                writer.attribute("href", getDirectService().getLink(true, dsp).getURL());
                writer.attribute("onClick", js + "," + json.toString() + "); return false;");                       
            }
            else
View Full Code Here

Examples of org.apache.tapestry.json.JSONLiteral

            profile.put(ValidationConstants.CONSTRAINTS, new JSONObject());
        }
        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
       
        required.accumulateProperty(cons, getClientId(),
                new JSONLiteral("[tapestry.form.validation.isPalleteSelected]"));
       
        required.accumulateProfileProperty(this, profile,
                ValidationConstants.CONSTRAINTS, required.buildMessage(context, this));
    }
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.