t:toggleLink onclick does not allow javascript than could prevent toggle
------------------------------------------------------------------------
Key: TOMAHAWK-1428
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1428
Project: MyFaces Tomahawk
Issue Type: Bug
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
Just take a look at the example of toggleLink.jsf
The link with this code:
<t:toggleLink for="editNames" onclick="return confirm('do you really want to
edit this stuff?')">
renders on onclick:
onclick="return confirm('do you really want to edit this
stuff?');MyFacesToggleLinkUtils.toggle(......."
and it should render this:
onclick="var cf = function(){return confirm('do you really want to edit this
stuff?')};var oamSF =
function(){MyFacesToggleLinkUtils.toggle('_idJsp0:editNames','_idJsp0:_idJsp10','_idJsp0:_idJsp9_hidden','');};return
(cf()==false)? false : oamSF();"
This is very similar as h:commandLink does on jsf 1.2 and the idea is allow
user to put a javascript to prevent toggling. This does not have any side
effect and preserve old behavior.
When promoting t:toggleLink, this code was deleted without notice it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.