You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Val Blant <va...@yahoo.ca> on 2006/05/25 00:35:41 UTC

s:valueChangeNotifier and dataTables

I tried to use the s:valueChangeNotifier tag from the sandbox and I noticed a
problem with it. It doesn't work from dataTables. The listener method does
get called, but the row number on the data model is not set.

Can anyone recommend a way to fix this?

The reason for this behavior is that in the validate stage HtmlDataTable
queues its events by wrapping them in FacesEventWrapper(), which contains
the correct rowIndex.

When this event is broadcast after the VALIDATE phase, the event is
unwrapped, the data model is updated with the correct row index and the
unwrapped event is passed on to the component.

In case of valueChangeNotifier, the registered listener is
ValueChangeCollector, which doesn't process the event, but rather queues it
in ValueChangeManager for processing after the UPDATE_MODEL phase.

The listener method is called from ValueChangeManager.fireEvents(), which
doesn't set up the row index in the data model.

Although it is clear to me why it doesn't work, I can't think of a good way
to fix it. Does anyone have any ideas? 

Also, is there another way to make sure that by the time I end up in my
valueChangeListener, my model has been updated?

Thanks.
--
View this message in context: http://www.nabble.com/s%3AvalueChangeNotifier+and+dataTables-t1678106.html#a4550580
Sent from the MyFaces - Users forum at Nabble.com.