1

Is it possible to have t:datascroller work with f:ajax ?

When I put a f:ajax tag inside a datascroller, the datascroller doesn't work anymore.

Maybe it is because I set the actionListener of the datascroller (not "action")... but when I set action, I get an exception saying "action can't be set".

boblemar
  • 1,143
  • 1
  • 10
  • 24

1 Answers1

2

Look this example from MyFaces Tomahawk svn. These are the important lines:

                <t:dataScroller id="scroll_1"
                    for="data"
                    fastStep="10"
                    pageCountVar="pageCount"
                    pageIndexVar="pageIndex"
                    styleClass="scroller"
                    paginator="true"
                    paginatorMaxPages="9"
                    paginatorTableClass="paginator"
                    paginatorActiveColumnStyle="font-weight:bold;"
                    immediate="true"
                    actionListener="#{scrollerList.scrollerAction}"
                    >
                <f:ajax execute="scroll_1 scroll_2 data" render="scroll_1 scroll_2 data"/>

That should work for most cases. If you need something more complex, adding some effects there is an example HERE that uses some sandbox components and client behaviors.

lu4242
  • 2,318
  • 1
  • 15
  • 15
  • OK ! I don't know why it didn't work. I've been changing "execute" and "render" for ours. My ugly last bet was @form for all... but it didn't work. With the scroller and the data ids like you suggest in your sample, it works. – boblemar Oct 28 '11 at 09:39