Hi Ed,
There is no change in the logic related to invoking setProperties,
its same as in old version. We call setProperties() only once, only if
if (null == parentComponent.getAttributes().get(CURRENT_VIEW_ROOT)) evaluates to true.
The only change we are making to fix the portlet issue, is to not use the request scope to look up UIViewRoot. Hope this answers your question.
Thanks
-Jayashri
Ed Burns wrote:
>Hello Visvan,
>
>Comments below. Please reply.
>
>Thanks,
>
>Ed
>
>
>
>>>>>>On Tue, 12 Oct 2004 11:36:59 -0700, Jayashri Visvanathan <Jayashri.Visvanathan_at_Sun.COM> said:
>>>>>>
>>>>>>
>
>JV> Index: src/javax/faces/webapp/UIComponentTag.java
>JV> ===================================================================
>JV> RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentTag.java,v
>JV> retrieving revision 1.51
>JV> diff -u -r1.51 UIComponentTag.java
>JV> --- src/javax/faces/webapp/UIComponentTag.java 31 Aug 2004 19:50:19 -0000 1.51
>JV> +++ src/javax/faces/webapp/UIComponentTag.java 12 Oct 2004 18:01:01 -0000
>JV> @@ -692,39 +692,30 @@
>JV> if (parentTag != null) {
>JV> parentComponent = parentTag.getComponentInstance();
>JV> } else {
>JV> - //
>JV> // Special case. The component to be found is the
>JV> // UIViewRoot.
>JV> - //
>JV> -
>JV> // see if this is the first time this tag instance is trying
>JV> // to be bound to the UIViewRoot
>JV> - if (null == (parentComponent = (UIComponent)
>JV> - pageContext.getAttribute(CURRENT_VIEW_ROOT,
>JV> - PageContext.REQUEST_SCOPE))){
>JV> - parentComponent = context.getViewRoot();
>JV> - pageContext.setAttribute(CURRENT_VIEW_ROOT, parentComponent,
>JV> - PageContext.REQUEST_SCOPE);
>JV> - // Has this UIViewRoot instance had a tag bound to it
>JV> - // before?
>JV> - if (null ==
>JV> - parentComponent.getAttributes().get(CURRENT_VIEW_ROOT)) {
>JV> - // No it hasn't.
>JV> -
>JV> - // make sure setProperties() and setId() are called
>JV> - // once per UIViewRoot instance.
>2
>JV> - if (null != this.id) {
>JV> - parentComponent.setId(this.id);
>JV> - }
>JV> - parentComponent.getAttributes().put(CURRENT_VIEW_ROOT,
>JV> - CURRENT_VIEW_ROOT);
>JV> - }
>JV> - else if (binding == null) {
>JV> - setProperties(parentComponent);
>JV> - }
>JV> + parentComponent = context.getViewRoot();
>JV> + // Has this UIViewRoot instance had a tag bound to it
>JV> + // before?
>JV> + if (null ==
>JV> + parentComponent.getAttributes().get(CURRENT_VIEW_ROOT)) {
>JV> + // No it hasn't.
>JV> +
>JV> + // make sure setProperties() and setId() are called
>JV> + // once per UIViewRoot instance.
>JV> + setProperties(parentComponent);
>
>Why are we calling setProperties unconditionally here? The old version
>didn't do this. Why must we do it now? This looks like a bugfix that
>is orthogonal to the portlet problem, is it not?
>
>JV> + if (null != this.id) {
>JV> + parentComponent.setId(this.id);
>JV> + }
>JV> + parentComponent.getAttributes().put(CURRENT_VIEW_ROOT,
>JV> + CURRENT_VIEW_ROOT);
>JV> + }
>JV> + else if (binding == null) {
>JV> + setProperties(parentComponent);
>JV> + }
>
>JV> - }
>JV> // this is not the first time this tag instance is trying to
>JV> // be bound to this UIViewRoot, take no extra action.
>
>
>JV> ---------------------------------------------------------------------
>JV> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>JV> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net