Issue Details (XML | Word | Printable)

Key: SHALE-67
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Gary VanMatre
Reporter: Ryan Lubke
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

Clay examples from usecases demo output Sun's state field marker

Created: 15/Mar/06 07:13 AM   Updated: 23/Jan/07 04:40 PM
Return to search
Component/s: Clay
Affects Version/s: None
Fix Version/s: 1.0.4

Environment:
Operating System: All
Platform: All

Bugzilla Id: 38970


 Description  « Hide
When testing the following Clay examples from the shale-usecases example
application:
    Symbols - pages 1, 2, and 3
    Full HTML View
    Extreme HTML View
    Full XML View

I see, at the end of the page, 'com.sun.faces.saveState.FieldMarker'.
I don't see this when running the Clay JSP view.

To reproduce: Deploy the shale-usecases application to a nightly build of
GlassFish and run one of the examples mentioned above.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Gary VanMatre added a comment - 15/Mar/06 07:39 AM
(In reply to comment #0)
> When testing the following Clay examples from the shale-usecases example
> application:
> Symbols - pages 1, 2, and 3
> Full HTML View
> Extreme HTML View
> Full XML View
> I see, at the end of the page, 'com.sun.faces.saveState.FieldMarker'.
> I don't see this when running the Clay JSP view.
> To reproduce: Deploy the shale-usecases application to a nightly build of
> GlassFish and run one of the examples mentioned above.


Clay has not been refactored to support JSF 1.2.

In JSF 1.1, the JSP "ViewTag" tag handles searching through the rendered
response stream replacing the "com.sun.faces.saveStateFieldMarker" marker
within the HTML form tag with the serialized client state as a hidden input
field. The marker is not standardized under 1.1 and is called "<!--
@@JSF_FORM_STATE_MARKER@@-->" in myfaces.

When using Clay full HTML or XML views, the Clay View handler has this
responsibility since the page doesn't have a JSP "ViewTag" tag.

From what I understand, JSF 1.2 moves this responsibility to the ViewHandler
and the marker name is standardized. JSF 1.2 also handles the interweaving of
non-JSF jsp with JSF component rendered output differently too.

We will have to address this issue when committing to support JSF 1.2.

Thanks for the feedback.


   


Don Brown made changes - 23/Apr/06 04:52 AM
Field Original Value New Value
issue.field.bugzillaimportkey 38970 28087
Craig McClanahan made changes - 26/Apr/06 01:13 PM
Assignee Struts Developer Mailing List [ dev@struts.apache.org ]
Affects Version/s Nightly Build [ 21668 ]
Component/s Shale [ 21241 ]
Project Struts Action 1 [ 10121 ] Shale [ 10130 ]
Key STR-2796 SHALE-67
Don Brown made changes - 03/May/06 01:05 AM
Workflow jira [ 38079 ] Struts [ 38170 ]
sean schofield made changes - 06/Jul/06 10:12 AM
Bugzilla Id 38970
Component/s Clay [ 21251 ]
Summary [Shale] Clay examples from usecases demo output Sun's state field marker Clay examples from usecases demo output Sun's state field marker
Repository Revision Date User Message
ASF #464361 Mon Oct 16 02:16:20 UTC 2006 gvanmatre A few fixes to move Clay in the direction of JSF 1.2 support (SHALE-67).
Files Changed
ADD /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/utils/JSFRuntimeTracker.java
MODIFY /shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/java/org/apache/shale/usecases/rolodex/Rolodex.java
MODIFY /shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/faces/ClayViewHandler.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/TemplateConfigBean.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/VerbatimBuilder.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java

Repository Revision Date User Message
ASF #465411 Wed Oct 18 23:06:50 UTC 2006 gvanmatre Change the method of generating component id's to be more in line with the JSP 2.1 JspIdConsumer (SHALE-67). The JspIdConsumer is an interface implement by Tags. It forces a unique id that is the same - even for multiple requests to the page. I modified the base configuration bean to generate a unique id per object instance. These beans are used by clay to build the component instead of JSP tags. The clay jspid is now used to populate the component's id if not explicitly provided.
Files Changed
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/utils/JSFRuntimeTracker.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
MODIFY /shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jsprolodex.jsp
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/VerbatimBuilder.java
MODIFY /shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java

Gary VanMatre added a comment - 18/Oct/06 11:09 PM
I've uncovered several issues with JSF 1.2 support.


1) The view root computes the next unique id differently, createUniqueId(). In the 1.1 version, the last generated sequence was not saved. Each time the view was restored the counter was reinitialized to zero. Under 1.2, the internal counter is restored.

2) The view root's UNIQUE_ID_PREFIX changed from id to j_id. This is used when generating unique id's. There is logic wired in the renderers that keys off the component id to determine if span tags should wrap the rendered markup.

3) JSP 1.2 has added a JspidComsumer that creates a unique id passed on to the component. JSP tags that implement this interfaces will always return the same id. The id is used to identify the corresponding component within the JSF component tree. This was added to allow dynamic changes to the structure of the component tree.

4) There are several component attributes that have been added. The view root and the label are a couple.

5) The dispatching logic from-view-id, to-view-id on a forward doesn't insist that the suffix of the request uri is changed to the javax.faces.DEFAULT_SUFFIX. So, if your target ends with ".faces", you end up in a infinite loop. You can argue that this is a stupid user trick anyway. It just behaves differently than 1.1.
 


I've made a few changes addressing 1, 2, 3 and 5. The new clay configuration definitions need to be addressed. I'd like to find a way to generate these from the TLD. It sounded like Hermod Opstvedt had interest in created a maven mojo to handle this.

I'm going to leave this ticket open to report on JSF 1.2 support as it progresses. BTW, Ryan, Glassfish rocks!





Ryan Lubke added a comment - 18/Oct/06 11:28 PM
Gary - glad to hear you like GlassFish. Let us know if you run into any snags with the JSF impl as your progress.

Repository Revision Date User Message
ASF #465962 Fri Oct 20 03:29:04 UTC 2006 gvanmatre The previous attempt at supporting something similar to the JSP 2.1 jspid's didn't work out (SHALE-67). I overlooked all the reuse of the config beans. The same config bean might be pulled in to the same page composition several times thus creating duplicate component id's. The config beans's jspid is now stored as a component's attribute and used to find its location in a restored tree. The view root is used to generate unique component ids.
Files Changed
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/Globals.java
DEL /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java

Repository Revision Date User Message
ASF #465970 Fri Oct 20 03:56:48 UTC 2006 gvanmatre Removed an unused constant (SHALE-67).
Files Changed
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/Globals.java

Repository Revision Date User Message
ASF #471910 Mon Nov 06 22:44:56 UTC 2006 gvanmatre Provided "binding" attribute support for Converters, Validators, ActionListeners and ValueChangeListeners as part of the JSF 1.2 spec enhancements (SHALE-67).
Files Changed
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyActionCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateValidatorCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/Clay.java
ADD /shale/framework/trunk/shale-clay/src/test/java/org/apache/shale/clay/config/BindingTestCase.java
MODIFY /shale/framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/component/chain/shale-clay-config.xml
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateValueChangeListenerCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValidatorCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueChangeListenerCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyActionListenerCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateConverterCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/AbstractCommand.java
ADD /shale/framework/trunk/shale-clay/src/test/resources/org/apache/shale/clay/config/binding.html
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateActionListenerCommand.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ElementBuilder.java
MODIFY /shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyConverterCommand.java

Repository Revision Date User Message
ASF #471932 Mon Nov 06 23:44:34 UTC 2006 gvanmatre A small cosmetic fix that uses the explicit form namespace mapping instead of the implicit mapping (SHALE-67).
Files Changed
MODIFY /shale/framework/trunk/shale-clay/src/test/resources/org/apache/shale/clay/config/binding.html

Gary VanMatre added a comment - 06/Nov/06 11:55 PM
6) Added attribute "binding" support for Converters, Validators and Listeners - new feature added to 1.2 spec.

7) Under the new RI JSF version, the form state marker has changed. Added logic to look for yet another state marker?
      "com.sun.faces.saveStateFieldMarker" - RI 1.1
      "<!--@@JSF_FORM_STATE_MARKER@@-->" - myfaces 1.1.x
      "~com.sun.faces.saveStateFieldMarker~" - RI 1.2

Gary VanMatre added a comment - 11/Nov/06 05:01 AM
I'm going to close this ticket. I don't believe that we have solved all the JSF 1.2 integration issues but we have made a huge step in that direction. We will create new tickets going forward.

Thanks again Ryan.

Gary VanMatre made changes - 11/Nov/06 05:01 AM
Fix Version/s 1.0.4-SNAPSHOT [ 21740 ]
Assignee Gary VanMatre [ gvanmatre@comcast.net ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Rahul Akolkar made changes - 23/Jan/07 04:40 PM
Fix Version/s 1.0.4-SNAPSHOT [ 21740 ]
Fix Version/s 1.0.4 [ 21790 ]
Jeff Turner made changes - 09/Aug/07 07:17 AM
Workflow Struts [ 38170 ] Struts - editable closed status [ 42370 ]
Antonio Petrelli made changes - 08/Jan/09 08:57 AM
Workflow Struts - editable closed status [ 42370 ] Struts - editable closed status (temporary) [ 46291 ]
Antonio Petrelli made changes - 08/Jan/09 09:08 AM
Workflow Struts - editable closed status (temporary) [ 46291 ] Struts - editable closed status [ 52926 ]