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

Only short-circuit a non-faces request to render response if view metadata has no children #762

Closed
eclipse-faces-bot opened this issue Mar 6, 2010 · 13 comments

Comments

@eclipse-faces-bot
Copy link

Currently, on an non-faces request, the Restore View short-circuits to the
Render Response if the view metadata contains no UIViewParameter children. The
exclusive check in this logic breaks the whole extensibility of the view
metadata feature.

Consider that a component author creates a custom component to be used in the
view metadata. Now, the page author has to add add least one (perhaps arbitrary)
UIViewParameter in the view metadata in order for view metadata to go through
the full JSF lifecycle, and the custom component activated, on an initial
request.

Here is the correct logic for the Restore View phase:

viewRoot = metadata.createMetadataView(facesContext);
// Only skip to render response if there are no child components
UIComponent metadataFacet = viewRoot.getFacet(UIViewRoot.METADATA_FACET_NAME);
if (metadataFacet.getChildCount() == 0) {
facesContext.renderResponse();
}

As a workaround, a component author could decorate the createMetadataView call
and add a artificial UIViewParameter if other children are present (though
setting it up would require a lot of work).

Environment

Operating System: All
Platform: All

Affected Versions

[2.0]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by mojavelinux

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
blocks
JAVASERVERFACES_SPEC_PUBLIC-758
is related to
JAVASERVERFACES-3118

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Move to 2.1

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
sheetalv

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
rogerk said:
triage

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Bulk assign all of Sheetal's spec issues to me.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
File: changebundle.txt
Attached By: @edburns

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
File: JAVASERVERFACES_SPEC_PUBLIC-762.zip
Attached By: @edburns

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Committed to trunk.

Sending jsf-ri/src/main/java/com/sun/faces/lifecycle/RestoreViewPhase.java
Sending jsf-ri/systest/build-tests.xml
Adding jsf-test/#762
Adding jsf-test/#762/build.xml
Adding jsf-test/#762/i_spec_762_war
Adding jsf-test/#762/i_spec_762_war/pom.xml
Adding jsf-test/#762/i_spec_762_war/src
Adding jsf-test/#762/i_spec_762_war/src/main
Adding jsf-test/#762/i_spec_762_war/src/main/java
Adding jsf-test/#762/i_spec_762_war/src/main/java/com
Adding jsf-test/#762/i_spec_762_war/src/main/java/com/sun
Adding jsf-test/#762/i_spec_762_war/src/main/java/com/sun/faces
Adding jsf-test/#762/i_spec_762_war/src/main/java/com/sun/faces/regression
Adding jsf-test/#762/i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762
Adding jsf-test/#762/i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762/Issue762PhaseListener.java
Adding jsf-test/#762/i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762/UserBean.java
Adding jsf-test/#762/i_spec_762_war/src/main/webapp
Adding jsf-test/#762/i_spec_762_war/src/main/webapp/WEB-INF
Adding jsf-test/#762/i_spec_762_war/src/main/webapp/WEB-INF/faces-config.xml
Adding jsf-test/#762/i_spec_762_war/src/main/webapp/WEB-INF/web.xml
Adding jsf-test/#762/i_spec_762_war/src/main/webapp/main.xhtml
Sending jsf-test/build.xml
Transmitting file data ..........
Committed revision 9143.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Wednesday, June 8th 2011, 11:26:58 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Closing resolved issue out

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-762

@eclipse-faces-bot
Copy link
Author

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

No branches or pull requests

1 participant