-
1. Re: actionListener doesnt work after datascrolling
sergeysmirnov Jan 4, 2008 8:15 PM (in response to baudorama)try to define the id for a4j:commandLink explicitly. Like id="id"
-
2. Re: actionListener doesnt work after datascrolling
baudorama Jan 4, 2008 8:35 PM (in response to baudorama)Did it, doesnt work.
More info from <a4j:log>: warn[2:28:12,015]: No information in response about elements to replace -
3. Re: actionListener doesnt work after datascrolling
sergeysmirnov Jan 4, 2008 8:38 PM (in response to baudorama)try the same for h:outputText
-
4. Re: actionListener doesnt work after datascrolling
baudorama Jan 4, 2008 8:50 PM (in response to baudorama)did for everything (also columns) and doesnt work.
-
5. Re: actionListener doesnt work after datascrolling
baudorama Jan 4, 2008 9:13 PM (in response to baudorama)Just found with 3.1.1 it works
-
6. Re: actionListener doesnt work after datascrolling
sergeysmirnov Jan 4, 2008 9:21 PM (in response to baudorama)http://jira.jboss.com/jira/browse/RF-1835 has been created.
-
7. Re: actionListener doesnt work after datascrolling
richuserone Jan 19, 2008 11:17 AM (in response to baudorama)I am working with 3.2.0 snapshot.
This issue still exists.
Command link in col header works fine. Once the scroller moves, the col header command link fires but does not find method in backing bean. Will work on next click of command link.
Pretty strange.....
To replicate, put any command link in the header column of a table. Move scroller and watch behavior. If you add a command link to the column header in the demo of the scroller, it should happen. -
8. Re: actionListener doesnt work after datascrolling
richuserone Jan 22, 2008 11:19 AM (in response to baudorama)Anyone?
-
9. Re: actionListener doesnt work after datascrolling
morgan_david Feb 22, 2008 11:43 AM (in response to baudorama)For anyone else who has this problem, there is a workaround: instead of calling the backing bean method directly from the actionListener, call a JS function that calls the backing bean method.
For example:<a4j:jsFunction name="sortOnField" action="#{bean.doSort}"> <a4j:actionParam name="param1" assignTo="#{bean.sortField}" /> </a4j:jsFunction> ... <a4j:commandLink onclick="sortOnField('whatever')" ... />
A little roundabout, but it does work. -
10. Re: actionListener doesnt work after datascrolling
rajshake Feb 22, 2008 12:19 PM (in response to baudorama)Thanks for sharing, morgan_david. Could you please post some detailed code, especially the JavaScript function ?
It will be of help to me. -
11. Re: actionListener doesnt work after datascrolling
morgan_david Feb 25, 2008 9:41 AM (in response to baudorama)What you see in my previous post is all that is needed. By using the jsFunction component there is no need to write any JavaScript in this case. We simply need a JS function that calls a backing bean method.
<a4j:jsFunction name="someName" action="#{bean.doSomething}">
For my case I needed to also assign some variable to the backing bean before the sort method was called. actionparam takes care of this nicely.<a4j:actionparam name="param1" assignTo="#{bean.someField}" /> param1 is the first parameter passed to the "someName" JS function defined by the jsFunction component. If you wanted parameter 2 you'd specify param2 in the actionparam component. Finally we close off the jsFunction component: </jsFunction> Easy-peasie, lemon-squeezie. Now that you've got the JS function to call your backing bean method, you can then call that function with the onclick event in an commandLink or commandButton. <a4j:actionLink onclick="someName('whatever') ... /> Basically we've delegated the method calling to a JS function instead of having the commandLink call that method directly. If you need more specific help it's no problem. Just describe what your solution needs to do and I'll see what I can do.
-
12. Re: actionListener doesnt work after datascrolling
morgan_david Feb 25, 2008 9:42 AM (in response to baudorama)Hmm... I must've forgotten a closing