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