Changeset 14031
- Timestamp:
- 03/16/07 16:28:17 (1 year ago)
- Files:
-
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/binding/MetaMethodBinding.java (modified) (2 diffs)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/binding/MethodValueExpression.java (added)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/handler/GenericHtmlComponentHandler.java (added)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/handler/MetaActionSourceRule.java (modified) (2 diffs)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/handler/MethodResultTagHandler.java (modified) (2 diffs)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/jsf/GenericValueHolderRule.java (added)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/jsf/html/HtmlLibrary.java (modified) (2 diffs)
- org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/util/ComponentTagUtils.java (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/binding/MetaMethodBinding.java
r10869 r14031 21 21 import javax.faces.context.FacesContext; 22 22 import javax.faces.el.MethodBinding; 23 import javax.faces.webapp.UIComponentTag;24 23 25 24 import org.apache.commons.logging.Log; 26 25 import org.apache.commons.logging.LogFactory; 26 import org.nuxeo.ecm.platform.ui.web.util.ComponentTagUtils; 27 27 28 28 /** … … 74 74 MethodBinding newMeth; 75 75 String expression = (String) res; 76 if ( UIComponentTag.isValueReference(expression)) {76 if (ComponentTagUtils.isValueReference(expression)) { 77 77 Application app = context.getApplication(); 78 78 newMeth = app.createMethodBinding(expression, null); org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/handler/MetaActionSourceRule.java
r13022 r14031 30 30 31 31 /** 32 * Meta rule set that wires a method binding to a {@link MetaMethodBinding} 33 * wheninvoking the method.32 * Meta rule set that wires a method binding to a {@link MetaMethodBinding} when 33 * invoking the method. 34 34 * 35 35 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> … … 53 53 public void applyMetadata(FaceletContext ctx, Object instance) { 54 54 ActionSource as = (ActionSource) instance; 55 // XXX AT: cannot use app.createMethodBinding as JBoss wil return a 56 // org.jboss.seam.actionparam.ActionParamMethodBinding which is not 57 // Serialiazable... 58 MethodBinding originalBinding = new LegacyMethodBinding(this.attr 59 .getMethodExpression(ctx, String.class, ACTION_SIG)); 60 // Application app = ctx.getFacesContext().getApplication(); 61 // MethodBinding originalBinding = app.createMethodBinding(attr 62 // .getValue(), null); 55 MethodBinding originalBinding = new LegacyMethodBinding( 56 this.attr.getMethodExpression(ctx, String.class, ACTION_SIG)); 63 57 as.setAction(new MetaMethodBinding(originalBinding)); 64 58 } org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/handler/MethodResultTagHandler.java
r13022 r14031 23 23 import javax.faces.component.UIComponent; 24 24 25 import org.nuxeo.ecm.platform.ui.web.binding.MethodValueExpression; 26 25 27 import com.sun.facelets.FaceletContext; 26 28 import com.sun.facelets.FaceletException; 29 import com.sun.facelets.el.LegacyValueBinding; 27 30 import com.sun.facelets.tag.MetaTagHandler; 28 31 import com.sun.facelets.tag.TagAttribute; … … 64 67 MethodExpression meth = value.getMethodExpression(ctx, Object.class, 65 68 paramTypesClasses); 66 // XXX AT: may throw "attempt to redirect during render response 67 // phase..." 68 Object result = meth.invoke(ctx, paramTypesClasses); 69 ValueExpression ve = ctx.getExpressionFactory().createValueExpression( 70 result, Object.class); 69 ValueExpression ve = new MethodValueExpression(meth, paramTypesClasses); 71 70 ctx.getVariableMapper().setVariable(nameStr, ve); 72 71 this.nextHandler.apply(ctx, parent); org.nuxeo.ecm.platform.ui.web/trunk/src/org/nuxeo/ecm/platform/ui/web/tag/jsf/html/HtmlLibrary.java
r13022 r14031 20 20 package org.nuxeo.ecm.platform.ui.web.tag.jsf.html; 21 21 22 import org.nuxeo.ecm.platform.ui.web.tag.handler.GenericHtmlComponentHandler; 22 23 import org.nuxeo.ecm.platform.ui.web.tag.handler.MetaActionSourceTagHandler; 23 24 … … 114 115 } 115 116 117 @Override 118 public void addHtmlComponent(String name, String componentType, 119 String rendererType) { 120 super.addComponent(name, componentType, rendererType, 121 GenericHtmlComponentHandler.class); 122 } 123 116 124 }
