JSF MethodExpression javax.el.PropertyNotFoundException

前端 未结 1 1445
星月不相逢
星月不相逢 2021-01-20 08:55

I\'m trying to develop a custom component that will need to call a method from the backingbean to get some data from the bb (this will be called in the decode phase after a

1条回答
  •  被撕碎了的回忆
    2021-01-20 09:49

    I found the solution for this, as it turns out you also need to define a "Handler"to define the Method Signature, so I created the handler and added to the taglib and everything started to work fine..just for reference.. here is the handler..

    Regards

    public class AutocompleteHandler extends ComponentHandler {
    
        public AutocompleteHandler(ComponentConfig config) {
            super(config);
        }
    
        protected MetaRuleset createMetaRuleset(Class type) {
            MetaRuleset metaRuleset = super.createMetaRuleset(type);
            metaRuleset.addRule(new MethodRule("dataSource", List.class, new Class[] { String.class }));
            return metaRuleset;
        }
    
    }
    

    0 讨论(0)
提交回复
热议问题