Re: commandLink not working inside dataList? (TOMAHAWK-272)
Hi Christopher, I've got the same problem, and I couldn't solve it even session-scopin my backing bean. I even tried to create the HTMLDataTable - Bean binding in the bean itself, as suggested elsewhere, but I didn't manage to have my commandlink working; so I'd like to have your workaround, if possible. Thanks in Advance, Niccolò Francini. Christopher Cudennec wrote: Hi Mike and thanks for the suggestions. Indeed you are right that my bean is request scoped. I talked to some more people today and got the proper understanding of how it works. I also got a workaround for my problem. Thanks, Christopher Mike Kienenberger schrieb: A lot of times this is caused because the developer made the backing list for the t:dataTable request-scoped, or made the rendered attribute value for the commandList request-scoped. On 8/9/07, Christopher Cudennec [EMAIL PROTECTED] wrote: Hi everybody, I can't get the commandLink to work inside the dataList. The event is not processed and therefore the actionListener never gets called. This sounds like the above bug ticket that is supposed to be solved. I use MyFaces 1.1.5 and Tomahawk 1.1.6. Can anybody confirm or comment about this? Thanks, Christopher -- View this message in context: http://www.nabble.com/commandLink-not-working-inside-dataList--%28TOMAHAWK-272%29-tf4242725.html#a12195637 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: commandLink not working inside dataList? (TOMAHAWK-272)
Hi Niccolo! The main problem when using a request scoped bean is that it is recreated with each request (simple truth but the main problem ;)). So is the result of your list that you probably created in your backing bean. This is where the problem starts. When looking for events to be created and called the getter of you list is invoked and is supposed to return a number of items. (In my case the getter returned an empty list because it was created when calling a search action). If the list that is returned is empty, no event is created and therefore not action is called. To solve the problem you could either: - use t:saveState (http://myfaces.apache.org/tomahawk/uiSaveState.html) - use a session scoped bean (as you did... I'm puzzled that it does not work) - make a lazy implementation of the getter of the list, so create the list when the getter is invoked for the first time - recreate the result list yourself (that's my workaround, because we are not sure that the elements returned by our search query is the same each time the search method is called - another user could have inserted a new object) I think you should try the first three options before I start to explain the workaround in detail ;). Hope this helps resolving your problem. Christopher [EMAIL PROTECTED] schrieb: Hi Christopher, I've got the same problem, and I couldn't solve it even session-scopin my backing bean. I even tried to create the HTMLDataTable - Bean binding in the bean itself, as suggested elsewhere, but I didn't manage to have my commandlink working; so I'd like to have your workaround, if possible. Thanks in Advance, Niccolò Francini. Christopher Cudennec wrote: Hi Mike and thanks for the suggestions. Indeed you are right that my bean is request scoped. I talked to some more people today and got the proper understanding of how it works. I also got a workaround for my problem. Thanks, Christopher Mike Kienenberger schrieb: A lot of times this is caused because the developer made the backing list for the t:dataTable request-scoped, or made the rendered attribute value for the commandList request-scoped. On 8/9/07, Christopher Cudennec [EMAIL PROTECTED] wrote: Hi everybody, I can't get the commandLink to work inside the dataList. The event is not processed and therefore the actionListener never gets called. This sounds like the above bug ticket that is supposed to be solved. I use MyFaces 1.1.5 and Tomahawk 1.1.6. Can anybody confirm or comment about this? Thanks, Christopher
Re: commandLink not working inside dataList? (TOMAHAWK-272)
Thank you for your quick answer, I already tried with the t:saveState tag and with the session bean. I'm going to try with a lazy getter, but I'm afraid it won't work as I should solve the empty list problem with the htmlDataTable inside the bean (it's smart a solution, I really thought it would work). Anyway I'm going to try, and then I will let you have news about the question. Thank you again -- View this message in context: http://www.nabble.com/commandLink-not-working-inside-dataList--%28TOMAHAWK-272%29-tf4242725.html#a12196102 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: commandLink not working inside dataList? (TOMAHAWK-272)
Note that there's other reasons why command-links won't work beyond having request-scoped backing beans. For instance, maybe validation is failing and you don't realize it -- try putting a t:messages component on your page.Posting more details and a simplified version of your page/code is helpful. On 8/17/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Christopher, I've got the same problem, and I couldn't solve it even session-scopin my backing bean. I even tried to create the HTMLDataTable - Bean binding in the bean itself, as suggested elsewhere, but I didn't manage to have my commandlink working; so I'd like to have your workaround, if possible. Thanks in Advance, Niccolò Francini. Christopher Cudennec wrote: Hi Mike and thanks for the suggestions. Indeed you are right that my bean is request scoped. I talked to some more people today and got the proper understanding of how it works. I also got a workaround for my problem. Thanks, Christopher Mike Kienenberger schrieb: A lot of times this is caused because the developer made the backing list for the t:dataTable request-scoped, or made the rendered attribute value for the commandList request-scoped. On 8/9/07, Christopher Cudennec [EMAIL PROTECTED] wrote: Hi everybody, I can't get the commandLink to work inside the dataList. The event is not processed and therefore the actionListener never gets called. This sounds like the above bug ticket that is supposed to be solved. I use MyFaces 1.1.5 and Tomahawk 1.1.6. Can anybody confirm or comment about this? Thanks, Christopher -- View this message in context: http://www.nabble.com/commandLink-not-working-inside-dataList--%28TOMAHAWK-272%29-tf4242725.html#a12195637 Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: commandLink not working inside dataList? (TOMAHAWK-272)
A lot of times this is caused because the developer made the backing list for the t:dataTable request-scoped, or made the rendered attribute value for the commandList request-scoped. On 8/9/07, Christopher Cudennec [EMAIL PROTECTED] wrote: Hi everybody, I can't get the commandLink to work inside the dataList. The event is not processed and therefore the actionListener never gets called. This sounds like the above bug ticket that is supposed to be solved. I use MyFaces 1.1.5 and Tomahawk 1.1.6. Can anybody confirm or comment about this? Thanks, Christopher