You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dennis Kieselhorst (JIRA)" <de...@myfaces.apache.org> on 2007/03/11 20:10:09 UTC

[jira] Created: (TOBAGO-317) tc:link action ignored when onclick is set

tc:link action ignored when onclick is set
------------------------------------------

                 Key: TOBAGO-317
                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
             Project: MyFaces Tobago
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.10
            Reporter: Dennis Kieselhorst


tc:link with onclick:
<tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

tc:link without onclick:
<tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

should be:
<a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Dennis Kieselhorst (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Kieselhorst reopened TOBAGO-317:
---------------------------------------


Cancel doesn't work (action is executed anyway).

Changed line 759 of HtmlRendererUtil to script.append("return confirm('");

Now it works correctly.

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>             Fix For: 1.0.11
>
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Arvid Hülsebus (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480061 ] 

Arvid Hülsebus commented on TOBAGO-317:
---------------------------------------

The confirmation facet is currently not support for <tc:link>. You will get a warning in HtmlRendererUtil:760 - Facet 'confirmation' is not supported for this type of button.

We could change the else branch to 

  onclick = "confirm('" + confirmation.getValue() + "')";

This would do the trick for links. Are there any side effects?

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480322 ] 

Udo Schnurpfeil commented on TOBAGO-317:
----------------------------------------

By the way, the "action", "link" and "onclick" attributes must be used separately, no combination is allowed. (Although it will not be checked by the TagExtraInfo in the moment.)

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>             Fix For: 1.0.11
>
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann resolved TOBAGO-317.
----------------------------------

    Resolution: Won't Fix

Link supports confirmation facet now.

See TOBAGO-394

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480113 ] 

Udo Schnurpfeil commented on TOBAGO-317:
----------------------------------------

I think you are right, Arvid. I've tested some cases and it seems to work. So I'll commit this change.

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Dennis Kieselhorst (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480133 ] 

Dennis Kieselhorst commented on TOBAGO-317:
-------------------------------------------

I've just checked out the trunk with the updated HtmlRendererUtil and built a snapshot. Works fine. Thank you!

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Arvid Hülsebus (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arvid Hülsebus resolved TOBAGO-317.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.11

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>             Fix For: 1.0.11
>
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480008 ] 

Volker Weber commented on TOBAGO-317:
-------------------------------------

You can archive this with a confirmation facet:

<tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}"> 
  <f:facet name="confirmation">
    <tc:out value="Wirklich löschen?"/>
  </f:facet>
</tc:link>

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOBAGO-317) tc:link action ignored when onclick is set

Posted by "Arvid Hülsebus (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOBAGO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481067 ] 

Arvid Hülsebus commented on TOBAGO-317:
---------------------------------------

It looks like the link/a needs the return. For buttons it seems to work without. My test cases work with the patch, but the passed onclick handler may already contain a "return" statement. In this case we would have to change the concatenation of the two expressions with &&.

> tc:link action ignored when onclick is set
> ------------------------------------------
>
>                 Key: TOBAGO-317
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-317
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.10
>            Reporter: Dennis Kieselhorst
>             Fix For: 1.0.11
>
>
> tc:link with onclick:
> <tc:link action="#{mmaController.deleteItem}" onclick="confirm('Wirklich löschen?')" actionListener="#{mmaController.selectItem}">
> result: <a href="#" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> tc:link without onclick:
> <tc:link action="#{mmaController.deleteItem}" actionListener="#{mmaController.selectItem}">
> result: <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">
> should be:
> <a href="javascript:Tobago.submitAction('page:_idJsp31:3:_idJsp40', true);" onclick="confirm('Wirklich löschen?')" class="tobago-link-default " id="page:_idJsp31:3:_idJsp40" name="page:_idJsp31:3:_idJsp40">

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.