Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.0-alpha
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      browser independent Javascript

      Description

      I'll attach a set of Javascripts to this issue to be tucked into MyFaces 2.0 to make up it's AJAX components. It's the modified J4Fry JSF AJAX and it's tested to replace RI 2.0's AJAX scripts.

      This is what we still need to do:

      • translate comments
        Currently many comments are german
      • repackage (j4fry -> javax)
        Currently we've put the classes into package org.j4fry.script, probably org.apache.myfaces.script would be a good choice. Also, the AJAX API is implemented according to the spec with
        <h:outputScript name="ajax.js" library="javax.faces" target="head"/> and javax.faces.Ajax.ajaxRequest, but the RI 2.0.0.9 I tested uses
        <h:outputScript name="jsf.js" library="javax.faces" target="head"/> and jsf.ajax.request, so this might be the way the final spec will put it, when it's final.
      • support multiple execute parameters
        Currently only one component can be triggered for action execution. This is a little hard to test at this time, because the RI 2.0.0.9 doesn't react to the execute parameter at all - even when using the RI's own javascripts.
      • set default queue size to unlimited
        Default queue size ist currently set to 1, because for most applications this is the better choice. As soon as we've made the queue size configurable (see separate mail for API exensio nproposal) we'll need to set the default to unlimited as specified in the specs.
      • define maven build to form one single script
        Werner is already working on this: The comply with the specs resource handling the entire AJAX scripts must come in one single javscript file called jsf.js. As this is an ugly beast to handle with over 1000 lines we prefer having one file per Javascript class. The maven build should then compile the 8 scripts we currently have into one.
      • implement additional attributes
        The J4Fry scripts support a lot of parameters that aren't part of the spec. They are vital for a good AJAX experience, so we would like to extend the API beyond the spec on these.
      1. TestBean.java
        0.3 kB
        Ganesh Jung
      2. JSF20AJAX.zip
        15 kB
        Ganesh Jung
      3. index.xhtml
        2 kB
        Ganesh Jung

        Activity

        Ganesh Jung created issue -
        Ganesh Jung made changes -
        Field Original Value New Value
        Description I'll attach set of Javascripts to this issue to be tucked into MyFaces 2.0 to make up it's AJAX components. It's the modified J4Fry JSF AJAX and it's tested to replace RI 2.0's AJAX scripts.

        This is what we still need to do:

        - translate comments
        Currently many comments are german

        - repackage (j4fry -> javax)
        Currently we've put the classes into package org.j4fry.script, probably org.apache.myfaces.script would be a good choice. Also, the AJAX API is implemented according to the spec with
        <h:outputScript name="ajax.js" library="javax.faces" target="head"/> and javax.faces.Ajax.ajaxRequest, but the RI 2.0.0.9 I tested uses
        <h:outputScript name="jsf.js" library="javax.faces" target="head"/> and jsf.ajax.request, so this might be the way the final spec will put it, when it's final.

        - support multiple execute parameters
        Currently only one component can be triggered for action execution. This is a little hard to test at this time, because the RI 2.0.0.9 doesn't react to the execute parameter at all - even when using the RI's own javascripts.

        - set default queue size to unlimited
        Default queue size ist currently set to 1, because for most applications this is the better choice. As soon as we've made the queue size configurable (see separate mail for API exensio nproposal) we'll need to set the default to unlimited as specified in the specs.

        - define maven build to form one single script
        Werner is already working on this: The comply with the specs resource handling the entire AJAX scripts must come in one single javscript file called jsf.js. As this is an ugly beast to handle with over 1000 lines we prefer having one file per Javascript class. The maven build should then compile the 8 scripts we currently have into one.

        - implement additional attributes
        The J4Fry scripts support a lot of parameters that aren't part of the spec. They are vital for a good AJAX experience, so we would like to extend the API beyond the spec on these.
        I'll attach a set of Javascripts to this issue to be tucked into MyFaces 2.0 to make up it's AJAX components. It's the modified J4Fry JSF AJAX and it's tested to replace RI 2.0's AJAX scripts.

        This is what we still need to do:

        - translate comments
        Currently many comments are german

        - repackage (j4fry -> javax)
        Currently we've put the classes into package org.j4fry.script, probably org.apache.myfaces.script would be a good choice. Also, the AJAX API is implemented according to the spec with
        <h:outputScript name="ajax.js" library="javax.faces" target="head"/> and javax.faces.Ajax.ajaxRequest, but the RI 2.0.0.9 I tested uses
        <h:outputScript name="jsf.js" library="javax.faces" target="head"/> and jsf.ajax.request, so this might be the way the final spec will put it, when it's final.

        - support multiple execute parameters
        Currently only one component can be triggered for action execution. This is a little hard to test at this time, because the RI 2.0.0.9 doesn't react to the execute parameter at all - even when using the RI's own javascripts.

        - set default queue size to unlimited
        Default queue size ist currently set to 1, because for most applications this is the better choice. As soon as we've made the queue size configurable (see separate mail for API exensio nproposal) we'll need to set the default to unlimited as specified in the specs.

        - define maven build to form one single script
        Werner is already working on this: The comply with the specs resource handling the entire AJAX scripts must come in one single javscript file called jsf.js. As this is an ugly beast to handle with over 1000 lines we prefer having one file per Javascript class. The maven build should then compile the 8 scripts we currently have into one.

        - implement additional attributes
        The J4Fry scripts support a lot of parameters that aren't part of the spec. They are vital for a good AJAX experience, so we would like to extend the API beyond the spec on these.
        Hide
        Ganesh Jung added a comment -

        These are the Javascript files for JSF 2.0 AJAX together with a test page and a java class to test the Javascript on glassfish v3 with JSF 2.0.0.9.

        Please maintain the order of the javascript files as shown is the test page - they depend on each other.

        Show
        Ganesh Jung added a comment - These are the Javascript files for JSF 2.0 AJAX together with a test page and a java class to test the Javascript on glassfish v3 with JSF 2.0.0.9. Please maintain the order of the javascript files as shown is the test page - they depend on each other.
        Ganesh Jung made changes -
        Attachment JSF20AJAX.zip [ 12404323 ]
        Attachment index.xhtml [ 12404324 ]
        Attachment TestBean.java [ 12404325 ]
        Hide
        Werner Punz added a comment -

        Hia just a short comment, a repackaging into the myfaces namespace is preferrable to avoid future namespace clashes...

        Show
        Werner Punz added a comment - Hia just a short comment, a repackaging into the myfaces namespace is preferrable to avoid future namespace clashes...
        Hide
        Ganesh Jung added a comment -

        Here's an example AJAX request as it is issued by the attached example:

        form1=form1&javax.faces.ViewState=j_id1%3Aj_id2&button1=Increment%20with%20J4Fry&javax.faces.partial.source=button1&javax.faces.partial.execute=button1%20undefined&javax.faces.partial.render=out1&javax.faces.partial.ajax=true

        and this is the XML response the RI issues:

        <?xml version="1.0" encoding="utf-8"?>
        <partial-response><changes><update id="out1"><Unable to render embedded object: File ([CDATA[<span id="out1">2</span>]]></update><update id="javax.faces.ViewState"><) not found.[CDATA[j_id1:j_id3]]></update></changes></partial-response>

        Show
        Ganesh Jung added a comment - Here's an example AJAX request as it is issued by the attached example: form1=form1&javax.faces.ViewState=j_id1%3Aj_id2&button1=Increment%20with%20J4Fry&javax.faces.partial.source=button1&javax.faces.partial.execute=button1%20undefined&javax.faces.partial.render=out1&javax.faces.partial.ajax=true and this is the XML response the RI issues: <?xml version="1.0" encoding="utf-8"?> <partial-response><changes><update id="out1">< Unable to render embedded object: File ([CDATA[<span id="out1">2</span>]]></update><update id="javax.faces.ViewState"><) not found. [CDATA [j_id1:j_id3] ]></update></changes></partial-response>
        Ganesh Jung made changes -
        Attachment JSF20AJAX.zip [ 12404323 ]
        Hide
        Ganesh Jung added a comment -

        Added the AJAX API extensions described in MYFACES-2174

        Show
        Ganesh Jung added a comment - Added the AJAX API extensions described in MYFACES-2174
        Ganesh Jung made changes -
        Attachment JSF20AJAX.zip [ 12404382 ]
        Ganesh Jung made changes -
        Attachment JSF20AJAX.zip [ 12404382 ]
        Hide
        Ganesh Jung added a comment -

        removed view options that are covered by the event listeners (disable, loadingbar, pre-, postJSFunction)

        Show
        Ganesh Jung added a comment - removed view options that are covered by the event listeners (disable, loadingbar, pre-, postJSFunction)
        Ganesh Jung made changes -
        Attachment JSF20AJAX.zip [ 12404503 ]
        Hide
        Ganesh Jung added a comment -

        The atteched files have been integrated with the apache repository.

        Show
        Ganesh Jung added a comment - The atteched files have been integrated with the apache repository.
        Ganesh Jung made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0-alpha [ 12313389 ]
        Resolution Fixed [ 1 ]
        Hide
        Werner Punz added a comment -

        I did a cleanup of the regular expressions we are now back to our old stripping res...
        they work now

        Show
        Werner Punz added a comment - I did a cleanup of the regular expressions we are now back to our old stripping res... they work now
        Werner Punz made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Werner Punz made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        9d 8h 35m 1 Ganesh Jung 10/Apr/09 20:34
        Resolved Resolved Reopened Reopened
        13d 17h 44m 1 Werner Punz 24/Apr/09 14:18
        Reopened Reopened Resolved Resolved
        1m 3s 1 Werner Punz 24/Apr/09 14:19
        Resolved Resolved Closed Closed
        377d 11h 38m 1 Leonardo Uribe 07/May/10 01:58

          People

          • Assignee:
            Unassigned
            Reporter:
            Ganesh Jung
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 418h
              418h
              Remaining:
              Remaining Estimate - 418h
              418h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development