Examples of PropertyBean


Examples of com.sun.faces.config.beans.PropertyBean

        // Generate from component properties
        //
        PropertyBean[] properties = component.getProperties();
        for (int i = 0, len = properties.length; i < len; i++) {
            PropertyBean property = properties[i];
            if (property == null) {
                continue;
            }

            if (!property.isTagAttribute()) {
                continue;
            }

            String propertyName = property.getPropertyName();
            String propertyType = property.getPropertyClass();

            // SPECIAL - Don't generate these properties
            if ("binding".equals(propertyName)
                || "id".equals(propertyName)
                || "rendered".equals(propertyName)) {
                continue;
            }

            String ivar = mangle(propertyName);
            writer.fwrite("this." + ivar + " = ");
            if (primitive(propertyType) && !(property.isValueExpressionEnabled()
                || property.isMethodExpressionEnabled())) {
                writer.write(TYPE_DEFAULTS.get(propertyType));
            } else {
                writer.write("null");
            }
            writer.write(";\n");

Examples of com.sun.faces.config.beans.PropertyBean

        // Generate from component properties
        //
        PropertyBean[] properties = component.getProperties();

        for (int i = 0, len = properties.length; i < len; i++) {
            PropertyBean property = properties[i];

            if (property == null) {
                continue;
            }
            if (!property.isTagAttribute()) {
                continue;
            }

            String propertyName = property.getPropertyName();
            String propertyType = property.getPropertyClass();

            // SPECIAL - Don't generate these properties
            if ("binding".equals(propertyName)
                || "id".equals(propertyName)
                || "rendered".equals(propertyName)) {
                continue;
            }

            if (property.isValueExpressionEnabled() ||
                property.isMethodExpressionEnabled()) {
                writer.writeWriteOnlyProperty(propertyName, "java.lang.String");
            } else {
                writer.writeWriteOnlyProperty(propertyName, propertyType);
            }
        }

Examples of com.sun.faces.config.beans.PropertyBean

        // Generate "setProperties" method contents from component properties
        //
        PropertyBean[] properties = component.getProperties();
        for (int i = 0, len = properties.length; i < len; i++) {
            PropertyBean property = properties[i];

            if (property == null) {
                continue;
            }
            if (!property.isTagAttribute()) {
                continue;
            }

            String propertyName = property.getPropertyName();
            String propertyType = property.getPropertyClass();

            // SPECIAL - Don't generate these properties
            if ("binding".equals(propertyName) ||
                "id".equals(propertyName) ||
                "rendered".equals(propertyName) ||
                "converter".equals(propertyName)) {
                continue;
            }
            String ivar = mangle(propertyName);
            String vbKey = ivar;
            String comp =
                GeneratorUtil.stripJavaxFacesPrefix(componentType).toLowerCase();
            String capPropName = capitalize(propertyName);

            if (property.isValueExpressionEnabled()) {
                writer.fwrite("if (" + ivar + " != null) {\n");
                writer.indent();
                writer.fwrite("if (isValueReference(" + ivar + ")) {\n");
                writer.indent();
                writer.fwrite("ValueBinding vb = Util.getValueBinding(" +
                    ivar + ");\n");

                writer.fwrite(comp + ".setValueBinding(\"" + vbKey + "\", vb);\n");
                writer.outdent();
                writer.fwrite("} else {\n");
                writer.indent();
                if (primitive(propertyType)) {
                    writer.fwrite(comp + ".set" + capPropName +
                        "(" + GeneratorUtil.convertToPrimitive(propertyType) +
                        ".valueOf(" + ivar + ")." + propertyType +
                        "Value());\n");
                } else {
                    writer.fwrite(comp + ".set" + capPropName + '(' + ivar +
                        ");\n");
                }
                writer.outdent();
                writer.fwrite("}\n");
                writer.outdent();
                writer.fwrite("}\n\n");
            } else if (property.isMethodExpressionEnabled()) {
                if ("action".equals(ivar)) {
                    writer.fwrite("if (" + ivar + " != null) {\n");
                    writer.indent();
                    writer.fwrite("if (isValueReference(" + ivar + ")) {\n");
                    writer.indent();

Examples of com.sun.faces.config.beans.PropertyBean

                // Component Properties first...
                //
                ComponentBean component = componentsByComponentFamily.get(componentFamily);

                PropertyBean[] properties = component.getProperties();
                PropertyBean property;

                for (int i = 0, len = properties.length; i < len; i++) {
                    if (null == (property = properties[i])) {
                        continue;
                    }
                    if (!property.isTagAttribute()) {
                        continue;
                    }

                    writer.startElement("attribute");

                    description = property.getDescription("");
                    if (description != null) {
                        String descriptionText =
                        description.getDescription().trim();

                        if (descriptionText != null) {
                            writer.startElement("description");
                            StringBuffer sb = new StringBuffer();
                            sb.append("<![CDATA[");
                            sb.append(descriptionText);
                            sb.append("]]>\n");
                            writer.writeText(sb.toString());
                            writer.closeElement();
                        }
                    }

                    String propertyName = property.getPropertyName();

                    writer.startElement("name");
                    writer.writeText(propertyName);
                    writer.closeElement();

                    writer.startElement("required");
                    writer.writeText(property.isRequired() ?
                                     Boolean.TRUE.toString() :
                                     Boolean.FALSE.toString());
                    writer.closeElement();

                    if (!"id".equals(propertyName)) {

                        if (property.isMethodExpressionEnabled()) {
                            writer.startElement("deferred-method");
                            writer.startElement("method-signature");
                            writer.writeText(
                                property.getMethodSignature());
                            writer.closeElement(2);
                        } else if (property.isValueExpressionEnabled()) {
                            // PENDING FIX ME
                            String type = property.getPropertyClass();
//                            String wrapperType = (String)
//                                GeneratorUtil.convertToPrimitive(type);
//                            if (wrapperType != null) {
//                                type = wrapperType;
//                            }

Examples of com.sun.faces.config.beans.PropertyBean

                // Component Properties first...
                //
                ComponentBean component = componentsByComponentFamily.get(componentFamily);

                PropertyBean[] properties = component.getProperties();
                PropertyBean property;

                for (int i = 0, len = properties.length; i < len; i++) {
                    if (null == (property = properties[i])) {
                        continue;
                    }
                    if (!property.isTagAttribute()) {
                        continue;
                    }

                    writer.startElement("attribute");


                    writer.startElement("name");
                    writer.writeText(property.getPropertyName());
                    writer.closeElement();

                    writer.startElement("required");
                    writer.writeText(property.isRequired() ?
                                     Boolean.TRUE.toString() :
                                     Boolean.FALSE.toString());
                    writer.closeElement();

                    writer.startElement("rtexprvalue");
                    writer.writeText(getRtexprvalue(tagName,
                        property.getPropertyName()));
                    writer.closeElement();

                    description = property.getDescription("");
                    if (description != null) {
                        String descriptionText =
                        description.getDescription().trim();

                        if (descriptionText != null) {

Examples of com.sun.faces.config.beans.PropertyBean

        // Generate from component properties
        //
        PropertyBean[] properties = component.getProperties();

        for (int i = 0, len = properties.length; i < len; i++) {
            PropertyBean property = properties[i];

            if (property == null) {
                continue;
            }
            if (!property.isTagAttribute()) {
                continue;
            }

            String propertyName = property.getPropertyName();
            String propertyType = property.getPropertyClass();

            // SPECIAL - Don't generate these properties
            if ("binding".equals(propertyName)
                || "id".equals(propertyName)
                || "rendered".equals(propertyName)) {
                continue;
            }

            if (property.isMethodExpressionEnabled()) {
                writer.writeWriteOnlyProperty(propertyName, "javax.el.MethodExpression");
            } else if (property.isValueExpressionEnabled()) {
                writer.writeWriteOnlyProperty(propertyName, "javax.el.ValueExpression");
            } else {
                writer.writeWriteOnlyProperty(propertyName, propertyType);
            }
        }

Examples of org.ajax4jsf.builder.config.PropertyBean

          context.put("renderer", component.getRenderer());
          context.put("package", component.getPackageName());
          Set<String> importClasses = new HashSet<String>();
          for (Iterator it = component.getProperties().iterator(); it
              .hasNext();) {
            PropertyBean property = (PropertyBean) it.next();
            // For non-primitive types, add import declaration.
            if (!property.isSimpleType() && !property.isExist()) {
              importClasses.add(property.getClassname());
            }
          }
          importClasses.add(component.getTest().getSuperclassname());
          context.put("imports", importClasses);
          String resultPath = component.getTest().getClassname().replace('.', '/')

Examples of org.ajax4jsf.builder.config.PropertyBean

        context.put("validator", validator);
        context.put("package", validator.getPackageName());
        Set<String> importClasses = new HashSet<String>();
        for (Iterator it = validator.getProperties().iterator(); it
            .hasNext();) {
          PropertyBean property = (PropertyBean) it.next();
          // For non-primitive types, add import declaration.
          if (!property.isSimpleType() && !property.isExist()) {
            importClasses.add(property.getClassname());
          }
        }
        importClasses.add(validator.getSuperclass());
        context.put("imports", importClasses);
        String resultPath = validator.getClassname().replace('.', '/')

Examples of org.ajax4jsf.builder.config.PropertyBean

        context.put("tag", tagHandler);
        context.put("package", tagHandler.getPackageName());
        Set<String> importClasses = new HashSet<String>();
        for (Iterator it = component.getProperties().iterator(); it
            .hasNext();) {
          PropertyBean property = (PropertyBean) it.next();
          // For non-primitive types, add import declaration.
          if (!property.isSimpleType() && !property.isHidden()) {
            importClasses.add(property.getClassname());
          }
        }
        importClasses.add(tagHandler.getSuperclass());
        context.put("imports", importClasses);
        String resultPath = tagHandler.getClassname().replace('.', '/')

Examples of org.ajax4jsf.builder.config.PropertyBean

        context.put("renderer", component.getRenderer());
        context.put("package", component.getPackageName());
        Set<String> importClasses = new HashSet<String>();
        for (Iterator it = component.getProperties().iterator(); it
            .hasNext();) {
          PropertyBean property = (PropertyBean) it.next();
          // For non-primitive types, add import declaration.
          if (!property.isSimpleType() && !property.isExist()) {
            importClasses.add(property.getClassname());
          }
        }
        importClasses.add(component.getSuperclass());
        context.put("imports", importClasses);
        String resultPath = component.getClassname().replace('.', '/')
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.