1

I try to add action listener into my custom component.

I have custom datatable which wrapping tomahawk datatable. I have custom dataScroller which wrapping tomahawk datascroller. I need to pass into dataScroller method defined in datatable.

<custom:dataScroller actionListener="#{someBean['someMethod']}"...

or

 <custom:dataScroller actionListener="#{someBean.someMethod}"...

In taglib file:

    <tag>
        <name>dataScroller</name>
        <tag-class>java.lang.Object</tag-class>
        <body-content>scriptless</body-content>
     ...
        <attribute>
            <name>actionListener</name>
            <deferred-method>
                <method-signature>
                    void myMethod(javax.faces.event.ActionEvent )
                </method-signature>
            </deferred-method>
        </attribute>
     ...
    </tag>

in dataScroller.xhtml

<t:dataScroller id="scroller_#{for}" for="#{for}" 
                fastStep="#{fastStep}"   
                paginatorRenderLinkForActive="false"
                paginator="true" 
                paginatorMaxPages="10" 
                paginatorActiveColumnStyle="font-weight:bold;"
                renderFacetsIfSinglePage="#{allwaysRender}"
                binding="#{applicationBean.scroll}"
                actionListener="#{actionListener}"// HERE is the actionListener
                immediate="false">

this gaves me javax.faces.el.EvaluationException: ... Property 'someMethod' not found on type ...

It marks t he method as property but it should be marked as method

public void someMethod(ActionEvent sae) {
    LOGGER.info("Event: #0" + sae.getClass().toString());
}

Where should be the problem?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Milkmaid
  • 1,659
  • 4
  • 26
  • 39

0 Answers0