Community
Participate
Working Groups
Build Identifier: wtp 3.2 JSF 2.0 - new Implicit Objects defined for use in EL expressions Reproducible: Always Steps to Reproduce: In JSF 2.0, there defined several new keywords. Need to update the variable/property resolvers to handle them for the content assist/validation. The keywords are: resource cc.attrs. cc.clientId viewScope flash
It appears that "component" is also new in 2.0: resource -- the current resource handler from facesContext.getApplication().getResourceHandler(). component -- the last component pushed on the component stack using UIComponent.pushComponentToEL() cc -- the component returned from UIComponent.getCurrentCompositeComponent() viewScope -- scope map for the new "View Scope". facesContext.getViewRoot().getViewMap() flash -- scope map for the new "Flash Scope". getExternalContext.getFlash()
> component -- the last component pushed on the component stack using > UIComponent.pushComponentToEL() > > cc -- the component returned from > UIComponent.getCurrentCompositeComponent() Does anyone know if component and cc are exposed to the JSP PDL? It seems like they exist only for Facelets and the spec is confusing as to which resolver exposes them. They seem to come back null in my testing. > flash -- scope map for the new "Flash Scope". This is actually not a map but a Flash object that has a map and redirect flag. Does anyone know if there is a way for a JSFDeveloper to put a variable into this scope except programmatically? Managed beans can't be declared with these scopes either in faces-config or by annotation. Nor can I find any tags in the basic runtime that allow it. Does it makes sense to provide design time support for this beyond declaring an IObjectSymbol of type javax.faces.context.Flash?
The spirit of JSF2 is that everything new is available in Facelets only. JSP layer is maintained for backwards compatibility w/o any improvements.
My understanding is that Flash scope can be accessed programmatically (using ExternalContext.getFlash() API) or via EL expressions (using #{flash} implicit object).
Sorry, I do not mean to be a pest but where does this stand for making it into 3.2. Could it be targeted to particular milestone?
(In reply to comment #5) > Sorry, I do not mean to be a pest but where does this stand for making it into > 3.2. Could it be targeted to particular milestone? It will be in 3.2. It remains to be seen if we can make it for M6. We are looking to integrate basic Facelet stuff, the 2.0 facet and anything we have existing code (including IBM patches) for M6.
We will need to short list for RC1. I think it's fairly straight-forward, low risk change that is purely additive and won't impact UI or API.
Created attachment 167775 [details] Proposed solution Adds JSF 2.0 symbols to the default symbol provider, and variable resolver ensuring that they are not present in a JSF1.x context. JUnits included.
Created attachment 168284 [details] Updated solution
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. Without the fix, the user will see incorrect validation warnings when using the new implicit symbols introduced in JSF 2.0 in an EL. Also, content assist will not list these symbols. * Is there a work-around? If so, why do you believe the work-around is insufficient? No workaround for Content Assist. Validation markers can be suppressed using preference setting, but this turns off other useful validations too. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Patch includes JUnit tests * Give a brief technical overview. Who has reviewed this fix? See description and comment 8. Cameron has reviewed the fix. * What is the risk associated with this fix? low.
Patch released to HEAD
New Gerrit change created: https://git.eclipse.org/r/114217
Gerrit change https://git.eclipse.org/r/114217 was merged to [master]. Commit: http://git.eclipse.org/c/jsf/webtools.jsf.git/commit/?id=928ef20bd24650a69b1a4d0b321db2443d2c3fbd