[ 
https://issues.apache.org/jira/browse/TOBAGO-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659597#action_12659597
 ] 

Bernd Bohmann commented on TOBAGO-730:
--------------------------------------

Have you tried the solution?

> action not getting executed when onclick is used in tc:button
> -------------------------------------------------------------
>
>                 Key: TOBAGO-730
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-730
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.20
>         Environment: Operating system : Ubuntu 804
> IDE : Netbeans 6.5
>            Reporter: Dean
>
> In the code below, wheh the button is clicked, only the java script in 
> onclick is executed. The action code is never called. 
> If I remove the onclick from the button then the action code is executed.
> I need to have both in the command and both sets of code must execute.
> How do I do this?
> Thanks
> <%...@page contentType="text/html" pageEncoding="UTF-8"%>
> <%...@taglib uri="http://myfaces.apache.org/tobago/component"; prefix="tc" %>
> <%...@taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
> <%...@taglib uri="http://myfaces.apache.org/tobago/extension"; prefix="tx" %>
> <%...@taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
> <f:view>
>   <f:loadBundle basename="za.co.ffa.view.bundles.security" var="security"/>
>   <f:loadBundle basename="za.co.ffa.view.bundles.common" var="common"/>
>   <tc:page label="Page Label" id="loginPage" width="955px" height="600px">
>     <jsp:body>
>       <tc:script file="resources/encrypt.js"/>
>       <tc:script file="resources/logonUtils.js"/>
>       <f:facet name="layout">
>         <tc:gridLayout rows="fixed;*" columns="*" marginLeft="700px" 
> marginTop="400px" />
>       </f:facet>
>       <tc:form id="loginForm" >
>         <tc:box label="Box Label">
>           <f:facet name="layout">
>             <tc:gridLayout rows="fixed;fixed;fixed;fixed;*"/>
>           </f:facet>
>           <tx:in id="username" binding="#{Login.username}" 
> label="#{security.username}" required="true"/>
>           <tx:in id="password" binding="#{Login.password}" 
> label="#{security.password}" password="true" required="true"/>
>           <tx:in id="entity" binding="#{Login.entity}" 
> label="#{common.entity}" required="true"/>
>           <tc:messages id="messageText" showDetail="true" showSummary="false" 
> rendered="true"/>
>         </tc:box>
>         <tc:button type="submit" id="loginBtn1" label="#{security.login}" 
> image="resources/images/login.png" action="#{Login.loginBtnAction}" 
> onclick="dopwd()"/>
>       </tc:form>
>     </jsp:body>
>   </tc:page>
> </f:view>

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

Reply via email to