Open glassfishrobot opened 16 years ago
@glassfishrobot Commented Reported by sjoglesby
@glassfishrobot Commented sjoglesby said: I am going to have a play around and see if I can get something working. Will add stuff here if I get anywhere.
I think that handling to fix issue 82 is also related to this (since it is to do with the value that is sent based on the type of component that is the source of the event) so I have put that as a dependency.
@glassfishrobot Commented sjoglesby said: In fact on further investigation this really is quite closely related to issue 82. The prototype library is used to get hold of the value for the input and for a checkbox this does return the correct value based on the checked attribute (see Form.Element.Serializers).
However, we then hit the 'For good measure' bit which then puts the value of the checkbox into the view state rather than its checked-ness. This results in checkboxes always returning 'on' if they are the source of the ajax transaction.
@glassfishrobot Commented sjoglesby said: Even with a bit of hacking to stop the value being added into the view state by the 'For good measure' piece of code there is still a problem. You then find that if the input has not been added into the view state that the toQueryString method looks for the input by id and adds its value (if you pass in inputs in your options). A checkbox will not have been added to the view state if it is false because the Prototype Form.Element.Serializers implementation returns the checkbox value if it is checked and nothing if it is not checked.
@glassfishrobot Commented sjoglesby said: Created an attachment (id=22) Uncompressed version with changes to fix issues 82 and 84
@glassfishrobot Commented sjoglesby said: I have attached a version of the com_sun_faces_ajax.js with changes in it to fix issues 82 and 84. How does this get reviewed and committed into the mainline?
@glassfishrobot Commented File: com_sun_faces_ajax.js Attached By: sjoglesby
@glassfishrobot Commented Issue-Links: depends on JSF_EXTENSIONS-82
@glassfishrobot Commented Was assigned to jsf-extensions-issues
@glassfishrobot Commented This issue was imported from java.net JIRA JSF_EXTENSIONS-84
I am attempting to use fireAjaxTransaction wired into the onchange event of a selectBooleanCheckbox component. This is rendered out as an html input type=checkbox. fireAjaxTransaction obtains the inputs value via the value attribute. For a input type=checkbox it should look at the checked attribute.
N.B. There appears to be handling for this written into the javascript to support ajaxZones that could possibly be re-used to handle the support at this level as well.
Environment
Operating System: All Platform: PC
Affected Versions
[current]