Examples of IODescriptor


Examples of com.sun.jsftemplating.layout.descriptors.handler.IODescriptor

  }
  Object def = attributes.get(DEFAULT_ATTRIBUTE);
  String req = attributes.get(REQUIRED_ATTRIBUTE);

  // Create the IODescriptor
  IODescriptor ioDesc = new IODescriptor(name, type);
  ioDesc.setDefault(def);
  if (req != null) {
      ioDesc.setRequired(Boolean.valueOf(req).booleanValue());
  }
// ioDesc.setDescription(attributes.get(DESCRIPTION_ATTRIBUTE))

  // Return the new IODescriptor
  return ioDesc;
View Full Code Here

Examples of com.sun.jsftemplating.layout.descriptors.handler.IODescriptor

     */
    private static Map<String, IODescriptor> readIODefs(Map<String, String> map, String key, boolean input) {
        String type;
        String inOrOut = input ? "input" : "output";
        int count = 0;
        IODescriptor desc = null;
        Map<String, IODescriptor> defs = new HashMap<String, IODescriptor>(5);
        String value = map.get(key + "." + inOrOut + "[" + count + "].name");
        while (value != null) {
            // Get the type
            type = map.get(key + "." + inOrOut + "[" + count + "].type");
            if (type == null) {
                type = DEFAULT_TYPE;
            }

            // Create an IODescriptor
            desc = new IODescriptor(value, type);
            defs.put(value, desc);

            // If this is an output, we're done... for input we need to do more
            if (input) {
                // required?
                value = map.get(key + "." + inOrOut + "[" + count + "].required");
                if ((value != null) && Boolean.valueOf(value).booleanValue()) {
                    desc.setRequired(true);
                }

                // default?
                value = map.get(key + "." + inOrOut + "[" + count + "].defaultValue");
                if ((value != null) && !value.equals(HandlerInput.DEFAULT_DEFAULT_VALUE)) {
                    desc.setDefault(value);
                }
            }

            // Look for next IO declaration
            value = map.get(key + "." + inOrOut + "[" + (++count) + "].name");
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.