Examples of StaticHtmlMetawidget


Examples of org.metawidget.statically.faces.component.html.StaticHtmlMetawidget

               return null;
            }

            // Create nestedMetawidget with conditional 'rendered' attribute

            StaticHtmlMetawidget nestedMetawidget = new StaticHtmlMetawidget();
            metawidget.initNestedMetawidget(nestedMetawidget, attributes);
            String unwrappedExpression = StaticFacesUtils.unwrapExpression(nestedMetawidget.getValue());
            nestedMetawidget.putAttribute("rendered",
                        StaticFacesUtils.wrapExpression("!empty " + unwrappedExpression));

            // If read-only we're done

            if (WidgetBuilderUtils.isReadOnly(attributes))
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.StaticHtmlMetawidget

            // If it's an inverse relationship, we really should have been able to determine sub-properties, so we
            // should never be at 'entity' level *unless* componentType couldn't resolve to an actual type

            if (!ENTITY.equals(elementName))
            {
               StaticHtmlMetawidget footerMetawidget = new StaticHtmlMetawidget();
               Map<String, String> footerAttributes = CollectionUtils.newHashMap();
               metawidget.initNestedMetawidget(footerMetawidget, footerAttributes);
               footerMetawidget.setValue(StaticFacesUtils.wrapExpression(controllerName + "Bean.add." + columnName));
               footerMetawidget.setPath(componentType + StringUtils.SEPARATOR_FORWARD_SLASH_CHAR + columnName);
               footerMetawidget.setLayout(new SimpleLayout());

               Facet footerFacet = new Facet();
               footerFacet.putAttribute("name", "footer");
               footerFacet.getChildren().add(footerMetawidget);

               ReadableIdProcessor readableIdProcessor = metawidget.getWidgetProcessor(ReadableIdProcessor.class);

               if (readableIdProcessor != null)
               {
                  readableIdProcessor.processWidget(footerMetawidget, elementName, columnAttributes, metawidget);
               }

               HtmlMessage message = new HtmlMessage();
               message.putAttribute("for", footerMetawidget.getAttribute("id"));
               message.putAttribute("styleClass", "error");
               footerFacet.getChildren().add(message);
               column.getChildren().add(footerFacet);
            }
         }
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.