You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org> on 2005/08/24 21:21:08 UTC

[jira] Created: (TAPESTRY-593) PropertySelect onChange javascript error

PropertySelect onChange javascript error
----------------------------------------

         Key: TAPESTRY-593
         URL: http://issues.apache.org/jira/browse/TAPESTRY-593
     Project: Tapestry
        Type: Bug
  Components: Framework  
 Environment: Firefox (Deer Park Alpha 2)
    Reporter: Jesse Kuhnert


The onchange attribute that PropertySelection ~seems~ to incorrectly specify "this.form.events.submit()" as the method to call, when it should actually be "this.form.submit()". This should work because the FormEventManagers already created for each form should have extended the form elements to call your handler listeners.  I have a patch for PropertySelection, don't know how many other form components this affects. 

You guys may want to look into using something like this to test all of your new javascript functionality: http://wiki.script.aculo.us/scriptaculous/show/UnitTesting.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-593) PropertySelect onChange javascript error

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-593?page=all ]

Jesse Kuhnert updated TAPESTRY-593:
-----------------------------------

    Attachment: patch.txt

This is a patch against PropertySelection made against the latest cvs head as of 8/24/05 at about 3:00pm est.

> PropertySelect onChange javascript error
> ----------------------------------------
>
>          Key: TAPESTRY-593
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-593
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>  Environment: Firefox (Deer Park Alpha 2)
>     Reporter: Jesse Kuhnert
>  Attachments: patch.txt
>
> The onchange attribute that PropertySelection ~seems~ to incorrectly specify "this.form.events.submit()" as the method to call, when it should actually be "this.form.submit()". This should work because the FormEventManagers already created for each form should have extended the form elements to call your handler listeners.  I have a patch for PropertySelection, don't know how many other form components this affects. 
> You guys may want to look into using something like this to test all of your new javascript functionality: http://wiki.script.aculo.us/scriptaculous/show/UnitTesting.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-593) PropertySelect onChange javascript error

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-593?page=comments#action_12320122 ] 

Howard M. Lewis Ship commented on TAPESTRY-593:
-----------------------------------------------

Are you sure about this?  In my experience (which I may be remembering wrong), some browsers bypass their onsubmit event handlers when submit() is invoked upon them.

> PropertySelect onChange javascript error
> ----------------------------------------
>
>          Key: TAPESTRY-593
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-593
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>  Environment: Firefox (Deer Park Alpha 2)
>     Reporter: Jesse Kuhnert
>  Attachments: patch.txt
>
> The onchange attribute that PropertySelection ~seems~ to incorrectly specify "this.form.events.submit()" as the method to call, when it should actually be "this.form.submit()". This should work because the FormEventManagers already created for each form should have extended the form elements to call your handler listeners.  I have a patch for PropertySelection, don't know how many other form components this affects. 
> You guys may want to look into using something like this to test all of your new javascript functionality: http://wiki.script.aculo.us/scriptaculous/show/UnitTesting.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-593) PropertySelect onChange javascript error

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-593?page=comments#action_12320124 ] 

Jesse Kuhnert commented on TAPESTRY-593:
----------------------------------------

Not sure at all. It seemed to be the case on IE as well as firefox (I forgot to mention that), but I could be mis-stating my assertions...Maybe I can try using the thing I mentioned and attempt a "test case" attachment for people to run. It could be that it only happens with onchange events of <option> elements. 

> PropertySelect onChange javascript error
> ----------------------------------------
>
>          Key: TAPESTRY-593
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-593
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>  Environment: Firefox (Deer Park Alpha 2)
>     Reporter: Jesse Kuhnert
>  Attachments: patch.txt
>
> The onchange attribute that PropertySelection ~seems~ to incorrectly specify "this.form.events.submit()" as the method to call, when it should actually be "this.form.submit()". This should work because the FormEventManagers already created for each form should have extended the form elements to call your handler listeners.  I have a patch for PropertySelection, don't know how many other form components this affects. 
> You guys may want to look into using something like this to test all of your new javascript functionality: http://wiki.script.aculo.us/scriptaculous/show/UnitTesting.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-593) PropertySelect onChange javascript error

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-593?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-593:
-------------------------------------------

    Fix Version: 4.0
     Resolution: Invalid
      Assign To: Howard M. Lewis Ship

As of 4.0-beta-6 this should work properly, the JavaScript FormEventManager.submit() method has changed to something that forces the form to submit.

> PropertySelect onChange javascript error
> ----------------------------------------
>
>          Key: TAPESTRY-593
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-593
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>  Environment: Firefox (Deer Park Alpha 2)
>     Reporter: Jesse Kuhnert
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0
>  Attachments: patch.txt, patch.txt
>
> The onchange attribute that PropertySelection ~seems~ to incorrectly specify "this.form.events.submit()" as the method to call, when it should actually be "this.form.submit()". This should work because the FormEventManagers already created for each form should have extended the form elements to call your handler listeners.  I have a patch for PropertySelection, don't know how many other form components this affects. 
> You guys may want to look into using something like this to test all of your new javascript functionality: http://wiki.script.aculo.us/scriptaculous/show/UnitTesting.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-593) PropertySelect onChange javascript error

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-593?page=all ]

Jesse Kuhnert updated TAPESTRY-593:
-----------------------------------

    Attachment: patch.txt

Yes you are correct. The javascript invoked by this elements onChange event IS executed, but since nothing involved in FormEventManager's submit() event fuction actually submits the form by default, it happily executes and returns true without any result. 

The attached patch calls the event as if onsubmit had been called, only calling form.submit if the method returns true.  The cleaner solution would probably be to either change the onchange javascript to call a static Tapestry.onChange(formId, elementId) function, or , if following the already defined model, add another conditional javascript contribution (instead of defining "onchange:javascript etc.." directly on the element) that would register a handler for that specific form and element 's onchange event. I would vote for method 2 as it takes yet one more piece of javascript logic out of your components and into your Form.js package. 

> PropertySelect onChange javascript error
> ----------------------------------------
>
>          Key: TAPESTRY-593
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-593
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>  Environment: Firefox (Deer Park Alpha 2)
>     Reporter: Jesse Kuhnert
>  Attachments: patch.txt, patch.txt
>
> The onchange attribute that PropertySelection ~seems~ to incorrectly specify "this.form.events.submit()" as the method to call, when it should actually be "this.form.submit()". This should work because the FormEventManagers already created for each form should have extended the form elements to call your handler listeners.  I have a patch for PropertySelection, don't know how many other form components this affects. 
> You guys may want to look into using something like this to test all of your new javascript functionality: http://wiki.script.aculo.us/scriptaculous/show/UnitTesting.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org