Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.Metadata


    ruleset.addRule(new MetaRule() {

      @Override
      public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget metadataTarget) {
        if (FILTER_METHOD.equals(name)) {
          return new Metadata() {

                        @Override
                        public void applyMetadata(FaceletContext context, Object object) {
              FacesContext facesContext = context.getFacesContext();
             
View Full Code Here


          public Metadata applyRule(final String name,
              final TagAttribute attribute, MetadataTarget meta) {
            if (ColumnsAttributes.FILTER_ATTRIBUTES.indexOf(name) != -1 ||
              ColumnsAttributes.SORT_ATTRIBUTES.indexOf(name) != -1) {

              return new Metadata() {

                @Override
                public void applyMetadata(FaceletContext ctx, Object instance) {
                  if (!attribute.isLiteral()) {
                    String expr = attribute.getValue();
View Full Code Here

    ruleset.addRule(new MetaRule() {

      @Override
      public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget metadataTarget) {
        if (FILTER_METHOD.equals(name)) {
          return new Metadata() {
            public void applyMetadata(FaceletContext context, Object object) {
              FacesContext facesContext = context.getFacesContext();
             
              MethodExpression expression = facesContext.getApplication().getExpressionFactory().
                createMethodExpression(facesContext.getELContext(), attribute.getValue(), boolean.class, new Class[]{Object.class});
View Full Code Here

          @Override
          public Metadata applyRule(final String name,
              final TagAttribute attribute, MetadataTarget meta) {
            if (ColumnsAttributes.FILTER_ATTRIBUTES.indexOf(name) != -1) {
              return new Metadata() {

                @Override
                public void applyMetadata(FaceletContext ctx,
                    Object instance) {
                  if (!attribute.isLiteral()) {
View Full Code Here

    public AbstractTag getTag() {
        return tag;
    }

    public Metadata applyRule(String string, final TagAttribute tagAttribute, MetadataTarget metadataTarget) {
        return new Metadata() {
            public void applyMetadata(FaceletContext faceletContext, Object object) {
                String attributeName = tagAttribute.getLocalName();
                String value = tagAttribute.getValue();
                tag.setPropertyValue(attributeName, value);
            }
View Full Code Here

      public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget meta) {
        if (meta.isTargetInstanceOf(UIDialogWindow.class)) {
         
          if ("closeWindowActionListener".equals(name)) {
            return new Metadata() {

              public void applyMetadata(FaceletContext context, Object instance) {
                      ((UIDialogWindow) instance).setCloseWindowActionListener(new LegacyMethodBinding(
                              attribute.getMethodExpression(context, null,
                                      new Class[] { ActionEvent.class })));
              }
             
            };
          } else if ("closeWindowAction".equals(name)) {
              return new Metadata() {

                public void applyMetadata(FaceletContext context, Object instance) {
                        ((UIDialogWindow) instance).setCloseWindowAction(new LegacyMethodBinding(
                                attribute.getMethodExpression(context, String.class,
                                        new Class[] { })));
View Full Code Here

   
    ruleset.addRule(new MetaRule() {

      public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget metadataTarget) {
        if (COLLAPSED_EXPANDED_LISTENER.equals(name)) {
          return new Metadata() {
            public void applyMetadata(FaceletContext context, Object object) {
              MethodBinding binding = context.getFacesContext().getApplication().createMethodBinding(attribute.getValue(), new Class[] {SimpleToggleEvent.class});
              ((UIComponent) object).getAttributes().put(COLLAPSED_EXPANDED_LISTENER, binding);
            }
          };
View Full Code Here

  ruleset.addRule(new MetaRule() {

      public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget metadataTarget) {
    if (SLIDER_LISTENER.equals(name)) {
        return new Metadata() {
      public void applyMetadata(FaceletContext context, Object object) {
          MethodBinding binding = context.getFacesContext().getApplication().createMethodBinding(
            attribute.getValue(), new Class[] { DataFilterSliderEvent.class });
          ((UIComponent) object).getAttributes().put(SLIDER_LISTENER, binding);
      }
View Full Code Here

   
    ruleset.addRule(new MetaRule() {

      public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget metadataTarget) {
        if (CHANGE_EXPAND_LISTENER.equals(name)) {
          return new Metadata() {
            public void applyMetadata(FaceletContext context, Object object) {
              MethodBinding binding = context.getFacesContext().getApplication().createMethodBinding(attribute.getValue(), new Class[] {NodeExpandedEvent.class});
              ((UIComponent) object).getAttributes().put(CHANGE_EXPAND_LISTENER, binding);
            }
          };
        } else if (NODE_SELECT_LISTENER.equals(name)) {
          return new Metadata() {
            public void applyMetadata(FaceletContext context, Object object) {
              MethodBinding binding = context.getFacesContext().getApplication().createMethodBinding(attribute.getValue(), new Class[] {NodeSelectedEvent.class});
              ((UIComponent) object).getAttributes().put(NODE_SELECT_LISTENER, binding);
            }
          };
View Full Code Here

          public Metadata applyRule(final String name,
              final TagAttribute attribute, MetadataTarget meta) {
            if (ColumnsAttributes.FILTER_ATTRIBUTES.indexOf(name) != -1 ||
              ColumnsAttributes.SORT_ATTRIBUTES.indexOf(name) != -1) {
             
              return new Metadata() {

                @Override
                public void applyMetadata(FaceletContext ctx,
                    Object instance) {
                  if (!attribute.isLiteral()) {
View Full Code Here

TOP

Related Classes of com.sun.facelets.tag.Metadata

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.