On 9/19/06, Jason Vincent <[EMAIL PROTECTED]> wrote:
Hi all,

I've ran into a documented JSF bug and I was hoping there was an easy
way to work around it.
Here is the URL to the issue:
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=153

The problem is that UIData will drop entered data if no validation
takes place within the entered fields inside the dataTable.  The
result is that if validation fails on some other component outside the
dataTable, the entered data within the dataTable is lost.

My first attempt was to extend the faces UIData compent and override
the encodeBegin method which has the flawed logic.  I registered the
component in my faces config file and it worked fine for renderers
that were defined in my config file.  However, it didn't override the
config for the components within JSF.

How can I get JSF to use my UIData class instead of
javax.faces.component.UIData?

You can't do this in any trivial fashion.   UIData is a java
(super)class.    You would have to provide your own jsf-api jar in
order to override it.

The MyFaces UIData subclasses (t:dataTable, t:dataList) have a
preserveRowStates attribute which can set to true.   I'm fairly
certain that this will solve the issue that you are seeing, although
then the trick becomes when to clear the row state.

Reply via email to