Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for CURRENT_COMPONENT CURRENT_COMPOSITE_COMPONENT in FacesContext attrs map #1627

Closed
ren-zhijun-oracle opened this issue Apr 12, 2010 · 16 comments

Comments

@ren-zhijun-oracle
Copy link
Contributor

The JSF specification contains the following:

/**

  • The key to which the

  • UIComponent currently being processed will be

  • associated with within the {@link FacesContext} attributes map.


    *

    • @see javax.faces.context.FacesContext#getAttributes()
    • @SInCE 2.0
      */
      public static final String CURRENT_COMPONENT =
      "javax.faces.component.CURRENT_COMPONENT";

    /**

    • The key to which the

    • composite UIComponent currently being
    • processed will be associated with within the {@link FacesContext}
  • attributes map.


    *

  • @see javax.faces.context.FacesContext#getAttributes()
    *

  • @SInCE 2.0
    */
    public static final String CURRENT_COMPOSITE_COMPONENT =
    "javax.faces.component.CURRENT_COMPOSITE_COMPONENT";

The guarantee that the current and current composite components are
available through FacesContext.getAttributes() doesn't seem right for
several reasons:

  1. It isn't useful. The static methods
    UIComponent.getCurrentComponent() and
    UIComponent.getCurrentCompositeComponent() are more convenient and typesafe.
  2. It is dangerous. If the values of these attributes is set, the
    current stack will be messed up
  3. When we aren't using the particular space-inefficient implementation
    the JSF RI currently uses, maintaining these attributes just in case a
    developer tries to request them is a waste

Environment

Operating System: All
Platform: All

Affected Versions

[2.0.2]

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
Reported by @edburns

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
performance

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
enhancement, not defect

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
add adf keyword

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
triage

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
Take these.

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
target 2.1

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
These will all be done for GF 3.1 M6 at the latest!

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
adf issues targeted for GlassFish 3.1 M5

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
Target these for M3

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@edburns said:
Target M4

@ren-zhijun-oracle
Copy link
Contributor Author

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
Marked as incomplete on Monday, July 19th 2010, 9:13:12 am

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
@manfredriem said:
Closing out resolved issue

@ren-zhijun-oracle
Copy link
Contributor Author

@javaserverfaces Commented
This issue was imported from java.net JIRA JAVASERVERFACES-1623

@ren-zhijun-oracle
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant