Ota Hauptmann created WICKET-4671:
-------------------------------------

             Summary: Cannot fallback to the link URL from ajax precondition
                 Key: WICKET-4671
                 URL: https://issues.apache.org/jira/browse/WICKET-4671
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 6.0.0-beta3
            Reporter: Ota Hauptmann


Let's have an AjaxFallbackLink - it means a link with ajax ability and also 
with ability to do things "classically" if JavaScript is not enabled. I want 
this link to be "Ctrl+clickable" (or other modifier-key-clickable) to be able 
to open it directly in a new tab or window of a browser.

In Wicket 1.5, it was possible to implement a decorator, where I was able to 
"return true" in case a modifier key was pressed in that moment and the 
Javascript execution was stopped and the raw link action was performed. In 
Wicket 6, there is possibility to specify the precondition of the ajax call, 
but there seem to be only two cases:
- return nothing or not-false to keep going
- return false and stop the execution of the link

But it is not possible to "return true" as with Wicket 1.5's decorator to stop 
the ajax/Javascript execution, but to continue performing raw Ctrl+click.

The Javascript handling code of this situation is in wicket-ajax-jquery.js at 
lines 503-507: there is the only one "stop situation", if the result is false, 
return false. Nothing more possible, nothing configurable.

With the information from 
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax I wasn't able to 
solve this situation by another way, which means I am not able to solve it at 
all (in Wicket 1.5 I was). Or am I doing something completely wrong?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to