dev@javaserverfaces.java.net

Re: Seeking Review: nested-datatable bug: part 1 of 2.

From: Craig R. McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Wed, 28 Jul 2004 08:54:52 -0700

Ed Burns wrote:

>I'd like to check this in independently of part 2, which is still in
>progress.
>
>Craig, Can you please take a look at this? I want to know if you're ok
>with this change. All the existing UIData tests run ok with this change.
>
>
>

Seems reasonable to me.

>Ed
>
>

Craig

>Issue: 6041276 part 1 of 2
>
>SECTION: API Changes
>
>M jsf-api/src/javax/faces/component/UIData.java
>
>- I observed that the inner UIData's model wasn't getting positioned
> properly for all phases but processDecodes(). This is because
> processDecodes() is the only phase that sets the model to null before
> processing. I have introduced a new method: isNestedWithinUIData()
> that I call from the process{Validators,Updates}() methods. If it
> returns true, I clear out the model before that phase.
>
>SECTION: API Diffs
>
>Index: jsf-api/src/javax/faces/component/UIData.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/component/UIData.java,v
>retrieving revision 1.54
>diff -u -r1.54 UIData.java
>--- jsf-api/src/javax/faces/component/UIData.java 17 Jun 2004 16:50:35 -0000 1.54
>+++ jsf-api/src/javax/faces/component/UIData.java 27 Jul 2004 17:48:33 -0000
>@@ -780,6 +780,9 @@
> if (!isRendered()) {
> return;
> }
>+ if (isNestedWithinUIData()) {
>+ model = null;
>+ }
> iterate(context, PhaseId.PROCESS_VALIDATIONS);
> // This is not a EditableValueHolder, so no further processing is required
>
>@@ -826,6 +829,9 @@
> if (!isRendered()) {
> return;
> }
>+ if (isNestedWithinUIData()) {
>+ model = null;
>+ }
> iterate(context, PhaseId.UPDATE_MODEL_VALUES);
> // This is not a EditableValueHolder, so no further processing is required
>
>@@ -1016,6 +1022,11 @@
> }
> }
> }
>+ return (isNestedWithinUIData());
>+
>+ }
>+
>+ private boolean isNestedWithinUIData() {
> UIComponent parent = this;
> while (null != (parent = parent.getParent())) {
> if (parent instanceof UIData) {
>@@ -1023,7 +1034,6 @@
> }
> }
> return (false);
>-
> }
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net