You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Karel Cabel (JIRA)" <ji...@apache.org> on 2011/09/16 11:57:08 UTC

[jira] [Created] (WICKET-4060) Disabled AjaxLink calls onClick()

Disabled AjaxLink calls onClick()
---------------------------------

                 Key: WICKET-4060
                 URL: https://issues.apache.org/jira/browse/WICKET-4060
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.0
         Environment: all
            Reporter: Karel Cabel
            Priority: Minor


1) Render AjaxLink and copy its URL
2) Render again with disabled AjaxLink (there will not be any URL on client)
3) Enter URL from 1) to browser and go -> it calls onClick() on server
This is because AjaxLink uses behavior that doesn't check disabled state on binded component (it checks it for rendering only).
However normal Link works OK and doesn't call onClick().


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4060) Disabled AjaxLink calls onClick()

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-4060:
---------------------------------

    Attachment: WICKET-4060.zip

Hi Andrea, initial invetigation shows that the component remains enabled at the previous page version.

> Disabled AjaxLink calls onClick()
> ---------------------------------
>
>                 Key: WICKET-4060
>                 URL: https://issues.apache.org/jira/browse/WICKET-4060
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>         Environment: all
>            Reporter: Karel Cabel
>            Assignee: Pedro Santos
>            Priority: Minor
>         Attachments: WICKET-4060.zip
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 1) Render AjaxLink and copy its URL
> 2) Render again with disabled AjaxLink (there will not be any URL on client)
> 3) Enter URL from 1) to browser and go -> it calls onClick() on server
> This is because AjaxLink uses behavior that doesn't check disabled state on binded component (it checks it for rendering only).
> However normal Link works OK and doesn't call onClick().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4060) Disabled AjaxLink calls onClick()

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos resolved WICKET-4060.
----------------------------------

    Resolution: Not A Problem

It is an expected behavior for visioned pages. If the page's first version has the ajax link enable, and if user navigates back to it, he will be able to click its ajax link.
Karel, consider to move the enabled/enabled logic to Component#onConfigure, so at any moment it will be correct, since this method is called before every component rendering.

> Disabled AjaxLink calls onClick()
> ---------------------------------
>
>                 Key: WICKET-4060
>                 URL: https://issues.apache.org/jira/browse/WICKET-4060
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>         Environment: all
>            Reporter: Karel Cabel
>            Assignee: Pedro Santos
>            Priority: Minor
>         Attachments: WICKET-4060.zip
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 1) Render AjaxLink and copy its URL
> 2) Render again with disabled AjaxLink (there will not be any URL on client)
> 3) Enter URL from 1) to browser and go -> it calls onClick() on server
> This is because AjaxLink uses behavior that doesn't check disabled state on binded component (it checks it for rendering only).
> However normal Link works OK and doesn't call onClick().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (WICKET-4060) Disabled AjaxLink calls onClick()

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos reassigned WICKET-4060:
------------------------------------

    Assignee: Pedro Santos

> Disabled AjaxLink calls onClick()
> ---------------------------------
>
>                 Key: WICKET-4060
>                 URL: https://issues.apache.org/jira/browse/WICKET-4060
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>         Environment: all
>            Reporter: Karel Cabel
>            Assignee: Pedro Santos
>            Priority: Minor
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 1) Render AjaxLink and copy its URL
> 2) Render again with disabled AjaxLink (there will not be any URL on client)
> 3) Enter URL from 1) to browser and go -> it calls onClick() on server
> This is because AjaxLink uses behavior that doesn't check disabled state on binded component (it checks it for rendering only).
> However normal Link works OK and doesn't call onClick().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4060) Disabled AjaxLink calls onClick()

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106040#comment-13106040 ] 

Andrea Del Bene commented on WICKET-4060:
-----------------------------------------

Hi,

can you provide a quick start? I've tried to reproduce your issue without success. Method 'RequestListenerInterface.invoke' should block behavior if component is not enabled.

> Disabled AjaxLink calls onClick()
> ---------------------------------
>
>                 Key: WICKET-4060
>                 URL: https://issues.apache.org/jira/browse/WICKET-4060
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>         Environment: all
>            Reporter: Karel Cabel
>            Priority: Minor
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 1) Render AjaxLink and copy its URL
> 2) Render again with disabled AjaxLink (there will not be any URL on client)
> 3) Enter URL from 1) to browser and go -> it calls onClick() on server
> This is because AjaxLink uses behavior that doesn't check disabled state on binded component (it checks it for rendering only).
> However normal Link works OK and doesn't call onClick().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira