From adffaces-issues-return-946-apmail-incubator-adffaces-issues-archive=incubator.apache.org@incubator.apache.org Thu Sep 14 17:06:55 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-issues-archive@locus.apache.org Received: (qmail 32465 invoked from network); 14 Sep 2006 17:06:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Sep 2006 17:06:55 -0000 Received: (qmail 13814 invoked by uid 500); 14 Sep 2006 17:06:55 -0000 Delivered-To: apmail-incubator-adffaces-issues-archive@incubator.apache.org Received: (qmail 13745 invoked by uid 500); 14 Sep 2006 17:06:54 -0000 Mailing-List: contact adffaces-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-issues@incubator.apache.org Delivered-To: mailing list adffaces-issues@incubator.apache.org Received: (qmail 13736 invoked by uid 99); 14 Sep 2006 17:06:54 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 10:06:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from ([209.237.227.198:41091] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 12/20-06457-B2C89054 for ; Thu, 14 Sep 2006 10:06:51 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6D8B1714358 for ; Thu, 14 Sep 2006 17:03:24 +0000 (GMT) Message-ID: <29706789.1158253404446.JavaMail.jira@brutus> Date: Thu, 14 Sep 2006 10:03:24 -0700 (PDT) From: "Adam Winer (JIRA)" To: adffaces-issues@incubator.apache.org Subject: [jira] Commented: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad In-Reply-To: <31228248.1158182962456.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/ADFFACES-176?page=comments#action_12434736 ] Adam Winer commented on ADFFACES-176: ------------------------------------- Max, can you create a patch - (svn diff) - and attach it to this issue? That process is needed to get IP rights properly assigned to Apache, especially necessary for a bug described as an internal Oracle bugfix... > UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad > ------------------------------------------------------------------------------------ > > Key: ADFFACES-176 > URL: http://issues.apache.org/jira/browse/ADFFACES-176 > Project: MyFaces ADF-Faces > Issue Type: Bug > Reporter: Max Starets > Priority: Critical > > In UIXCollection.java: > Replace the following code: > /** > * Clears all the currency strings. > */ > @Override > public final void encodeBegin(FacesContext context) throws IOException > { > _init(); > _getCurrencyCache().clear(); > _flushCachedModel(); > Object assertKey = null; > assert ((assertKey = getRowKey()) != null) || true; > __encodeBegin(context); > // make sure that the rendering code preserves the currency: > assert _assertKeyPreserved(assertKey) : "CurrencyKey not preserved"; > } > with: > /** > * Clear the rowKey-to-currencyString cache. > * The cache is not cleared immediately; instead it will be cleared > * when {@link #encodeBegin} is called. > */ > protected void clearCurrencyStringCache() > { > _getInternalState(true)._clearTokenCache = true; > } > /** > * Clears all the currency strings. > */ > @Override > public final void encodeBegin(FacesContext context) throws IOException > { > _init(); > InternalState istate = _getInternalState(true); > // we must not clear the currency cache everytime. only clear > // it in response to specific events: bug 4773659 > if (istate._clearTokenCache) > { > istate._clearTokenCache = false; > _getCurrencyCache().clear(); > } > _flushCachedModel(); > Object assertKey = null; > assert ((assertKey = getRowKey()) != null) || true; > __encodeBegin(context); > // make sure that the rendering code preserves the currency: > assert _assertKeyPreserved(assertKey) : "CurrencyKey not preserved"; > } > In the inner InternalState class add the following member variable: > private transient boolean _clearTokenCache = false; > In UIXTableTemplate.java replace the following method: > /** > * Delivers an event to the appropriate listeners. > * @param event > * @throws javax.faces.event.AbortProcessingException > */ > @Override > public void broadcast(FacesEvent event) > throws AbortProcessingException > { > // the order of processing is > // 1. do any default action handling > // 2. invoke any actionListener method binding > // 3. call all the registered ActionListener instances. > // Deliver to the default RangeChangeListener > if (event instanceof RangeChangeEvent) > { > RangeChangeEvent rEvent = (RangeChangeEvent) event; > int first = rEvent.getNewStart(); > setFirst(first); > //pu: Implicitly record a Change for 'first' attribute > addAttributeChange("first", new Integer(first)); > > if ((first == 0) && (rEvent.getNewEnd() == getRowCount())) > { > setShowAll(true); > //pu: Implicitly record a Change for 'showAll' attribute > addAttributeChange("showAll", Boolean.TRUE); > } > else if (isShowAll()) > { > setShowAll(false); > //pu: Implicitly record a Change for 'showAll' attribute > addAttributeChange("showAll", Boolean.FALSE); > } > __broadcast(event, getRangeChangeListener()); > } > else if (event instanceof RowDisclosureEvent) > { > RowDisclosureEvent eEvent = (RowDisclosureEvent) event; > RowKeySet set = getDisclosedRowKeys(); > set.addAll(eEvent.getAddedSet()); > set.removeAll(eEvent.getRemovedSet()); > __broadcast(event, getRowDisclosureListener()); > } > else if (event instanceof SortEvent) > { > SortEvent sEvent = (SortEvent) event; > setSortCriteria(sEvent.getSortCriteria()); > __broadcast(event, getSortListener()); > } > else if (event instanceof SelectionEvent) > { > //pu: Implicitly record a Change for 'selectionState' attribute > addAttributeChange("selectedRowKeys", > getSelectedRowKeys()); > __broadcast(event, getSelectionListener()); > } > super.broadcast(event); > } > with: > /** > * Delivers an event to the appropriate listeners. > * @param event > * @throws javax.faces.event.AbortProcessingException > */ > @Override > public void broadcast(FacesEvent event) > throws AbortProcessingException > { > // the order of processing is > // 1. do any default action handling > // 2. invoke any actionListener method binding > // 3. call all the registered ActionListener instances. > // Deliver to the default RangeChangeListener > if (event instanceof RangeChangeEvent) > { > RangeChangeEvent rEvent = (RangeChangeEvent) event; > int first = rEvent.getNewStart(); > setFirst(first); > //pu: Implicitly record a Change for 'first' attribute > addAttributeChange("first", new Integer(first)); > > if ((first == 0) && (rEvent.getNewEnd() == getRowCount())) > { > setShowAll(true); > //pu: Implicitly record a Change for 'showAll' attribute > addAttributeChange("showAll", Boolean.TRUE); > } > else if (isShowAll()) > { > setShowAll(false); > //pu: Implicitly record a Change for 'showAll' attribute > addAttributeChange("showAll", Boolean.FALSE); > } > // since the range is now different we can clear the currency cache: > clearCurrencyStringCache(); > __broadcast(event, getRangeChangeListener()); > } > else if (event instanceof RowDisclosureEvent) > { > RowDisclosureEvent eEvent = (RowDisclosureEvent) event; > RowKeySet set = getDisclosedRowKeys(); > set.addAll(eEvent.getAddedSet()); > set.removeAll(eEvent.getRemovedSet()); > __broadcast(event, getRowDisclosureListener()); > } > else if (event instanceof SortEvent) > { > SortEvent sEvent = (SortEvent) event; > setSortCriteria(sEvent.getSortCriteria()); > __broadcast(event, getSortListener()); > } > else if (event instanceof SelectionEvent) > { > //pu: Implicitly record a Change for 'selectionState' attribute > addAttributeChange("selectedRowKeys", > getSelectedRowKeys()); > __broadcast(event, getSelectionListener()); > } > super.broadcast(event); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira