You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Max Starets (JIRA)" <ad...@incubator.apache.org> on 2006/09/13 21:29:22 UTC

[jira] Created: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

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

        

[jira] Commented: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Max Starets (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-176?page=comments#action_12434750 ] 
            
Max Starets commented on ADFFACES-176:
--------------------------------------

SVN patch is attached. Thanks!

> 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
>         Attachments: patch.176
>
>
> 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

        

[jira] Updated: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/ADFFACES-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf updated ADFFACES-176:
----------------------------------------

        Fix Version/s: 1.0.0-incubating-core
    Affects Version/s: 1.0.0-incubating-core

> UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad
> ------------------------------------------------------------------------------------
>
>                 Key: ADFFACES-176
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-176
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>    Affects Versions: 1.0.0-incubating-core
>            Reporter: Max Starets
>         Assigned To: Adam Winer
>            Priority: Critical
>             Fix For: 1.0.0-incubating-core
>
>         Attachments: patch.176
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Max Starets (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-176?page=all ]

Max Starets updated ADFFACES-176:
---------------------------------

    Status: Patch Available  (was: Open)

> 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

        

[jira] Updated: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Max Starets (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-176?page=all ]

Max Starets updated ADFFACES-176:
---------------------------------

    Attachment: patch.176

> 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
>         Attachments: patch.176
>
>
> 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

        

[jira] Updated: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Max Starets (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-176?page=all ]

Max Starets updated ADFFACES-176:
---------------------------------

    Status: Open  (was: Patch Available)

> 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
>         Attachments: patch.176
>
>
> 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

        

[jira] Commented: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
    [ 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

        

[jira] Updated: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Max Starets (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-176?page=all ]

Max Starets updated ADFFACES-176:
---------------------------------

    Status: Open  (was: Patch Available)

> 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

        

[jira] Updated: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Max Starets (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-176?page=all ]

Max Starets updated ADFFACES-176:
---------------------------------

    Status: Patch Available  (was: Open)

> 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
>         Attachments: patch.176
>
>
> 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

        

[jira] Resolved: (ADFFACES-176) UIXCollection token cache - Intenal Oracle Bugfix Needs to be backported to Trinidad

Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-176?page=all ]

Adam Winer resolved ADFFACES-176.
---------------------------------

    Resolution: Fixed
      Assignee: Adam Winer

Checked in the patch.  Thanks!

FYI, the bug would show itself if you had a PPR request that updated something *other* than the table, but then model state changed out from under you.  So the token cache is blown away, but the content of the table is still using IDs pointing to the old token cache.  The fix will only result in the token cache being cleared when a RowChangeEvent is delivered in part of a request.  Not perfect, but much better.

> 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
>         Assigned To: Adam Winer
>            Priority: Critical
>         Attachments: patch.176
>
>
> 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