Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.7DR#3
-
Component/s: Framework
-
Labels:None
-
Environment:JSP (not Facelets)
-
Support Case References:
-
Affects:Compatibility/Configuration
Description
When using ICE-2419's test application, I found that com.icesoft.faces.webapp.parser.ComponentRuleSet.addRuleInstances(Digester) has a special case for <f:view>, where it doesn't actually save what was parsed into a TagWire. This is because com.icesoft.faces.webapp.parser.Parser.parse(Reader,FacesContext) just makes a new TagWire for the <f:view>, and forces it to be the root TagWire. This means that any attributes on the <f:view> tag are discarded, including the locale attribute.
We have to add a rule to the Digester, to get it to save the attributes somewhere, where they can be put into the made root TagWire. Then, I believe that ViewTag will have its locale attribute, and be able to set it on the UIViewRoot.
We have to add a rule to the Digester, to get it to save the attributes somewhere, where they can be put into the made root TagWire. Then, I believe that ViewTag will have its locale attribute, and be able to set it on the UIViewRoot.
Issue Links
Activity
Mark Collette
created issue -
Mark Collette
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.7 [ 10080 ] | |
Assignee Priority | P1 | |
Assignee | Mark Collette [ mark.collette ] |
Ken Fyten
made changes -
Assignee Priority | P1 | |
Assignee | Mark Collette [ mark.collette ] | Greg Dick [ greg.dick ] |
Michael Thiem
made changes -
Support Case References | https://www.icesoft.ca:4443/supportilla/show_bug.cgi?id=4500 |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #15698 | Thu Jan 31 13:25:52 MST 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/StubPageContext.java
ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/StubHttpServletRequest.java MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ComponentRuleSet.java MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/Parser.java MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ELSetPropertiesRule.java MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/JsfJspDigester.java MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/TagWire.java |
Greg Dick
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 1.7Beta1 [ 10121 ] | |
Fix Version/s | 1.7 [ 10080 ] | |
Resolution | Fixed [ 1 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #15706 | Fri Feb 01 14:53:42 MST 2008 | ted.goddard | added fallback case for pages without view tag ( |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ComponentRuleSet.java
MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/Parser.java |
Ken Fyten
made changes -
Summary | Our JSP parser discards <f:view> attributes | JSP parser discards <f:view> attributes |
Issue Type | Bug [ 1 ] | Improvement [ 4 ] |
Affects | [Compatibility/Configuration] |
Ken Fyten
made changes -
Fix Version/s | 1.7 [ 10080 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Greg Dick [ greg.dick ] |
The way this was working is as follows.
The code manually creates a fake root Tag. We have this TagWire class designed to represent the relationship between a tag and its children because the Tag itself knows nothing of this.
The original code skipped over setting up a digester rule for the ViewTag, and manually create a fake ViewTag after parsing was done, and re-parented the Tag hierarchy on this ViewTag. This worked, but it obviously ignored any attributes on the original page ViewTag.
I added a custom tagRule for the ViewTag, as well as used the ELSetPropertiesRule to set the locale on the UIViewRoot tag. Currently there is no way to know where the ViewRoot is located in the document, so I had to re-engineer the tag hierarchy after parsing to move the parsed Tag up to the parent, and to replace it in the tree with its children. I would have preferred to simply capture the attributes from the ViewTag, and set these in a manually-generated viewTag at the root as before, but if the ViewTag is not digested, then the attributes can't be captured, and if they are digested, I got an IllegalState Exception when I tried to execute the JSP lifecycle.
So for now, we parse the Tags, and move them around afterward. Normally, in a pure JSF realm, there are no tags outside the <f:view> tag, only static text (from a jsp point of view). However, in ICEfaces, any/all xhtml tags are also treated as Tags, which necessitates our having to do anything at all to 'put' the ViewTag at the top of the tree in the first place.
The ViewTag class (JSF) does some weird stuff to the JSTL core library with the locale, hence the need to create a stubRequestObject and modifying the StubPageContext to support the new StubRequest.