jakartaee / faces

Jakarta Faces
Other
102 stars 54 forks source link

Ajax Response Handling - View State / Body #552

Open eclipse-faces-bot opened 15 years ago

eclipse-faces-bot commented 15 years ago

This request actually came in from the myfaces folks who are implemented a jsf 2 ajax solution (following spec):

When developing the AJAX part of MyFaces 2.0 we encountered 2 locations within the jsdoc part of the spec we'd propose for enhancement.

The first is about the hidden inputs for view state: The jsdocs for jsf.ajax.response imply that each hidden input receives the id "javax.faces.ViewState" which would result in multiple hidden inputs with this id in a multi form document. This is how Mojarra is currently working things out, but other implementations should get a chance to use a w3c conformant approach - the hidden inputs don't need ids at all, but only name=javax.faces.ViewState. A comment on this was already posted by Werner Punz.

The second is about replacing the body section of a document if the server sends the id javax.faces.ViewRoot: The jsdocs for jsf.ajax.response say that the impl should >>extract the contents of the element from the element's CDATA content and replace the document's section with this contents<<. According to this the attributes of the body element wouldn't be replaced with the new attributes, which probably isn't the intended behaviour. Preserving the attributes can either be achieved by copying them or by using contextualRagen/adjacentHTML instead of innerHTML.

Here is a proposal for changing the jsdocs for jsf.ajax.response to enable both enhancements mentioned above - please correct the jsdoc for jsf.ajax.response(request, context) like this:

If an update element is found in the response with the identifier javax.faces.ViewRoot:

Update the entire DOM as follows:

<<<<<<< (remove the following lines)

======= (add the following lines)

If an update element is found in the response with the identifier javax.faces.ViewState:

Include this state in the document as follows:

<<<<<< (remove the following lines)

======= (add the following lines)

Best Regards, Ganesh Jung

Environment

Operating System: All Platform: Macintosh

Affected Versions

[2.0]

eclipse-faces-bot commented 5 years ago
eclipse-faces-bot commented 15 years ago

@glassfishrobot Commented Reported by rogerk

eclipse-faces-bot commented 15 years ago

@glassfishrobot Commented rogerk said: Created an attachment (id=224) changes

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented @edburns said: Move to unscheduled target milestone

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented @edburns said: Prepare to delete "spec" subcomponent.

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented @edburns said: cat2

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented @edburns said: jsdoc

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented @edburns said: These are targeted at 2.1.

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented rogerk said: triage

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented rogerk said: 2.1_gf31_m5

eclipse-faces-bot commented 14 years ago

@glassfishrobot Commented rogerk said: For now re-target for 2.2. If time permits may revisit for 2.1.

eclipse-faces-bot commented 13 years ago

@glassfishrobot Commented rogerk said: triage

eclipse-faces-bot commented 10 years ago

@glassfishrobot Commented @edburns said: Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

eclipse-faces-bot commented 10 years ago

@glassfishrobot Commented @edburns said: Leave priority unchanged.

eclipse-faces-bot commented 15 years ago

@glassfishrobot Commented File: jsf.js.diffs.txt Attached By: rogerk

eclipse-faces-bot commented 15 years ago

@glassfishrobot Commented Issue-Links: is related to JAVASERVERFACES_SPEC_PUBLIC-1069

eclipse-faces-bot commented 7 years ago

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