CommandLink action not being invoked

HI:
I have a page with panelGrid, which has three inputText and one selectOneMenu, all of which have a validator ( a method in the backing bean).
All these are followed by a commandLink button with a 'action' method in the same backing bean.
Problem is when the link is submitted the action method does not get invoked. I placed debug messages and can see that the validator methods are entered but the action method never gets invoked. There are no error messages either.
Any thoughts ?

I found a work around. At least everything is working now. I have to yet test out the entire functionality of my application but here is what I did.
Thanks to the example in the book
JavaServer Faces
By Hans Bergsten
In my main layout page
<%@ taglib prefix="f" uri="/WEB-INF/jsf_core.tld" %>
<%@ taglib prefix="h" uri="/WEB-INF/html_basic.tld" %>
<f:view>
<html>
<h:form>
<%@ include file="../../page1.jspf" %>
</h:form>
<h:form>
<%@ include file="../../page2.jspf" %>
</h:form>
<h:form>
<%@ include file="page3.jspf" %>
</h:form>
</html>
</f:view>

Similar Messages

  • Resource action not being called

    The executable file not being called
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='AfterUpdate'>
    <ResTypeAction restype='Red Hat Linux' timeout='6000'>
    <act>
    /usr/local/vistaplus/vadmin c=mu us=$(USER_NAME) pas=$(USER_PASSWORD)
    exit
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>

    yep, sorry for reposting but in that post I said I had it fixed but obviously its not. What's really change is that I cant recreate this problem on my laptop but on our dev and test environments this problem still exists. My initial thoughts is that this is an environment problem but i'm not totally convinced as the was settings etc are the same as on my laptop.

  • Why h:commandlink action not get fired after upgrading to JSF-1.2_12?

    Hi,
    One strange behavior that I'm facing right now after upgrading to JSF version1.2_12, is that the action method for hidden commandlink which should get fired on changing the value of a comboBox are not getting fired. Note that I was initially using the JSF1.2_07 version and it worked fine.
    Any help would be much appreciated.
    Here is a sample code of what I have in my app.
    <h:panelGroup>
                   <h:selectOneMenu id="nav-menu" value="#{customBean.rowName}"
                   onchange="submitOnMenuChange(this.form,'id-link', 'nav-menu');">
                   <f:selectItem itemLabel="Select:" itemValue="" />
                   <f:selectItem itemLabel="rowName1" itemValue="rowName1"/>
                   <f:selectItem itemLabel="rowName2" itemValue="rowName2"/>
                   </h:selectOneMenu>
                   <h:commandLink id="id-link" value=" " action="#{customBean.updateAction}" style="display: none;"/>
    </h:panelGroup>
    Inside submitOnMenuChange() I'm using below technique to submit the form
    var idclValue = formId + JSF_ID_SEPARATOR + elementId;
    jsfcljs(document.forms[formId],idclValue+','+idclValue,'');
    So, ideally on changing the value from above comboBox it should invoke the updateAction method, bit it doesn't.
    Thanks,
    Umesh
    Edited by: Umesh_S on Oct 7, 2009 4:47 AM

    Here is a small simple example which could help replicate the problem
    There are mainly three files: 1. displayPage.jsp 2. CustomBean.java 3. faces-Config.xml
    1. displayPage.jsp (content)
    <%@ page session="true" contentType="text/html;charset=utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <script language="javascript">
    function submitLinkAction(formId, elementId) {
         if (document.forms[formId] != null) {
              var idclValue = formId + ":" + elementId;
    jsfcljs(document.forms[formId],idclValue+','+idclValue,'');
         } else {
              throw "Form with id [" + formId + "] is null.";
         return false;
    function submitOnMenuChange(thisForm, linkId, menuId) {
         var fullMenuId = thisForm.id + ":" + menuId;
         var menu = document.forms[thisForm.id][fullMenuId];
         var selectedValue = menu.options[menu.selectedIndex].value;
         if (selectedValue.length > 0) {
              try {
                   return submitLinkAction(thisForm.id, linkId);
              } catch (errorMsg) {
                   alert("Error occurred: " + errorMsg);
         return false;
    </script>
    </head>
    <body>
    <h:form id="edit-form">
                             <h:panelGroup>
                                  <%-- show select drop-down--%>
                                       <h:selectOneMenu id="nav-menu" value="#{customBean.rowName}"
                                            enabledClass="grid"
                                            onchange="submitOnMenuChange(this.form,'nav-link', 'nav-menu');">
                                            <f:selectItem itemLabel="Select:" itemValue="" />
                                            <f:selectItem itemLabel="Row1" itemValue="Row1"/>
                                            <f:selectItem itemLabel="Row2" itemValue="Row2"/>
                                       </h:selectOneMenu>
                                       <h:commandLink id="nav-link" value=" " action="#{customBean.updateAction}" style="display: none;"/>
                             </h:panelGroup>
    </h:form>
    </body>
    </html>
    </f:view>
    2. CustomBean.java
    public class CustomBean {
    private String rowName;
         public CustomBean() {
         public String getRowName() {
              return this.rowName;
         public void setRowName(String value) {
              System.out.println("** Inside set row name**");
              this.rowName = value;
         public void updateAction() {
              System.out.println("************This is action method for hidden command link************* ");
    3. faces-config.xml (content)
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
         <managed-bean>
         <managed-bean-name>customBean</managed-bean-name>
         <managed-bean-class>com.examples.CustomBean</managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
    </faces-config>
    So, if we run above example on JSF 1.2_07, on changing the value of nav-menu, it should submit the form and the action method (updateAction()) defined for commandlink "nav-link" should get fired (one could see the System.out coming on the console) but the moment the JSF jars are upgraded to 1.2_12 the action method no more gets invoked.
    Thanks,
    Umesh

  • Authenticator not being invoked - NTLM authentication against IIS 6.0 !!

    Hi Folks,
    I am trying to access Microsoft Reporting Service running on IIS 6.0 through a Web Proxy (a simple application running in an App Server) using the NTLM authentication. This is what i am doing
    Authenticator.setDefault(new ReportAuthenticator());
    HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();.
    As i understand, the authentication is to magically work with the IIS Server requesting my web proxy for the credentials on connect whcih should involke the Authenticaor class.
    Howver this is not happening at the moment. The authenticator object never gets invoked and even then my web proxy is being able to chat to IIS. The Sun app server hosting my web proxy is somehow passing my windows credentials to IIS and since my account has sufficient previliges on IIS, i am able to get through the initial connection.
    When i debug the urlConnection object, i can see that the connection recognises that this is an NTLM authentication but is obviously not using the Authenticator credentials.
    Is the Authenticator object meant to be invoked automatically or do i need to set some header information in the urlConnection??
    Any help is greatly appreciated.
    P.S: I am using JDK 1.5, IIS 6.0, Sun App Server 9.0 (platform edition)
    best regards
    Dushy

    Hi,
    we had the same problem, but we got support
    from readme.txt
    Bug#: 6789020
    Agent type: All Agents
    Description: In CDSSO mode non enforced POST requests cannot be accessed
    Bug#: 6736820
    Agent type: IIS 6 Agent
    Description: IIS 6 agent doesn't work properly with ASP pages in CDSSO mode
    Both bugs should be fixed in this version:
    Sun Java System Web Agents 2.2-02 hotpatch2

  • Command link action not being called

    Hi,
    I raised another bug about this and I thought I had fixed this but it seems to have come back again! Here are the details:
    The Problem
    - I have a jsf application that uses SDO to manage database calls/changes. In the application I have a navigation menu which consists of command links. From time to time (doesn't always happen) you click on a link and the page just refreshes and you are not taken to the requested page. Now this doesn't happen all the time! I've looked at logs and added debugs but I can't find anything apart from the face that when the page just refreshes the action behind the command link is not called.
    Has anyone experienced this before? I'm using wsad 5.1.2 and have this problem and the version of faces is 1.0.
    Please help as I have no idea what is causing this!!

    yep, sorry for reposting but in that post I said I had it fixed but obviously its not. What's really change is that I cant recreate this problem on my laptop but on our dev and test environments this problem still exists. My initial thoughts is that this is an environment problem but i'm not totally convinced as the was settings etc are the same as on my laptop.

  • Strutstestcase problem - exception thrown by action not being caught

    Hi,
    I am experiencing a problem in a test class I wrote to test part of a Struts based application. I have posted this problem on the StrutsTestCase forum but not had a response yet (it doesn't seem to be frequently visited/posted at) so thought I would try my luck here.
    The action performs some back-end processing and if all successful then returns a mapping forward. If an error occurs then an Exception is thrown. The config file contains the entry for the ExceptionHandler which displays the error message on the page (i.e. it calls the same jsp page that the action was first submitted from).
    This all works fine when tested through the browser. Running a successful test via CactusStrutsTestCase also works correctly. But when I try to run a test to validate the error path the test class errors and the cactus output file indicates the Exception was thrown. BUT in my test class method...
    public void testFileUpload()
    this.setRequestPathInfo("/mypath");
    this.addRequestParameter("action", "uploadFile");
    MyForm form = new MyForm();
    form.setFormFile(this.getUploadFile("empty.txt"));
    this.setActionForm(form);
    try
    this.actionPerform();
    System.out.println("got here OK -----------------------");
    catch (Exception e)
    System.out.println("got here ERROR -----------------------" + e.getMessage());
    I try to catch the Exception so I can determine whether the test passed/failed but it is never caught. Instead the test just errors and neither debug line above is printed on the console. Yet the output file indicates that at the 'this.actionPerform();' line an error was uncaught...
    <testcase classname="test.MyCactusTest" name="testFileUpload" time="4.87">
    <error message="An uncaught exception was thrown during actionExecute()" type="org.apache.cactus.internal.client.ServletExceptionWrapper">servletunit.struts.ExceptionDuringTestError: An uncaught exception was thrown during actionExecute()
         at servletunit.struts.CactusStrutsTestCase.actionPerform()V(CactusStrutsTestCase.java:546)
         at test.MyCactusTest.testFileUpload()V(MyCactusTest.java:34)
    I'm bemused! Any help is much appreciated.

    Hi,
    I am experiencing a problem in a test class I wrote to test part of a Struts based application. I have posted this problem on the StrutsTestCase forum but not had a response yet (it doesn't seem to be frequently visited/posted at) so thought I would try my luck here.
    The action performs some back-end processing and if all successful then returns a mapping forward. If an error occurs then an Exception is thrown. The config file contains the entry for the ExceptionHandler which displays the error message on the page (i.e. it calls the same jsp page that the action was first submitted from).
    This all works fine when tested through the browser. Running a successful test via CactusStrutsTestCase also works correctly. But when I try to run a test to validate the error path the test class errors and the cactus output file indicates the Exception was thrown. BUT in my test class method...
    public void testFileUpload()
    this.setRequestPathInfo("/mypath");
    this.addRequestParameter("action", "uploadFile");
    MyForm form = new MyForm();
    form.setFormFile(this.getUploadFile("empty.txt"));
    this.setActionForm(form);
    try
    this.actionPerform();
    System.out.println("got here OK -----------------------");
    catch (Exception e)
    System.out.println("got here ERROR -----------------------" + e.getMessage());
    I try to catch the Exception so I can determine whether the test passed/failed but it is never caught. Instead the test just errors and neither debug line above is printed on the console. Yet the output file indicates that at the 'this.actionPerform();' line an error was uncaught...
    <testcase classname="test.MyCactusTest" name="testFileUpload" time="4.87">
    <error message="An uncaught exception was thrown during actionExecute()" type="org.apache.cactus.internal.client.ServletExceptionWrapper">servletunit.struts.ExceptionDuringTestError: An uncaught exception was thrown during actionExecute()
         at servletunit.struts.CactusStrutsTestCase.actionPerform()V(CactusStrutsTestCase.java:546)
         at test.MyCactusTest.testFileUpload()V(MyCactusTest.java:34)
    I'm bemused! Any help is much appreciated.

  • Solution to Button Action not being called in IE

    All,
    Thought I'd post a solution to a problem I had recently. I have seen variations on a theme elsewhere on the net.
    IDE: Java Studio Creator 2, Update 1.
    Problem: The button action associated with a button component on a jspx page is not called when using IE 6, but is called using M. Firefox 1.5.
    Background: The jspx page is a combination of one core jsp page and four jsp fragments (header, main nav bar, module nav bar, authorization code). Several components are present on the core jsp page (layout components, table, buttons), several on the header, main nav bar, module nav bar fragments (images, hyperlinks, text), JSTL and a lonesome form on the authorization fragment. You can see where I'm going....
    Solution: The problem was with the authorization fragment. The authorization fragment is meant to be dropped on pages that I want to protect from users without the authorized role, perhaps by these users trying to navigate to it by URL manipulation. I added some JSTL code to specifically look at the role authorization for the current session user. If not in that role, they are redirected to the home page. Navigation links are secured by similar authorization using the rendered property bound to session data. The form was the problem. Unfortunately, I didn't give much thought to the additional component I would need on the fragment. I had to add something so I picked a layout one. The IDE appears to require a component. To correct the problem, I simply set the rendered property to "false". IE 6 now works fine, M. Firefox 1.5 was always happy. Code example below...
    Code Pre:
    <?xml version="1.0" encoding="UTF-8"?>
    <div style="-rave-layout: grid; width: 400px; height: 200px" xmlns:c="http://java.sun.com/jstl/core" xmlns:f="http://java.sun.com/jsf/core"
        xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
        <c:if test="${SessionBean1.monitor==false}">
            <c:redirect url="/faces/Welcome.jsp"/>
        </c:if>
        <ui:form binding="#{MonCheck.form1}" id="form1" />
    </div>
    Code Post:
    <?xml version="1.0" encoding="UTF-8"?>
    <div style="-rave-layout: grid; width: 400px; height: 200px" xmlns:c="http://java.sun.com/jstl/core" xmlns:f="http://java.sun.com/jsf/core"
        xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
        <c:if test="${SessionBean1.monitor==false}">
            <c:redirect url="/faces/Welcome.jsp"/>
        </c:if>
        <ui:form binding="#{MonCheck.form1}" id="form1" rendered="false"/>
    </div>

    Hi there,
    Great to know you were able to fix your problem. Thanks for posting the solution as well, Im sure It'll help the community.
    Thanks
    K

  • Dynamic Action not being triggered in Batch

    Hi Gurus,
    We have the below Dynamic Action that is not getting triggered when we run a Batch to Create IT2010. We are using TCode PTE1 to create the batch.
    2010                   4     5     P     T001P-MOLGA='10'
    2010                   4     10     P     PSPAR-TCLAS='A'
    2010                   4     12     P     P2010-LGART='4023'
    2010                   4     15     I     INS,2001,,,(P2010-BEGDA),(P2010-ENDDA)/D
    2010                   4     20           **P2001-AWART='0100'
    2010                   4     21     W     P2001-AWART='1300'
    2010                   4     25     W     P2001-STDAZ=P2010-ANZHL
    I have read a few posts on how this can be done, but not very clear as to whether it can even be achieved.
    This Dynamic Action works fine when we manually Create an IT2010 record via PA30, it creates the IT2001 in the background.
    Cheers,
    Anil

    Hello Anil,
    Please check the following note, I think note should be helpful in this case.
    386027   Dynamic actions
    1564499  Processing initial values which are not valid in
    Best Regards,
    Deepak.

  • [FIXED]ExternalInterfce.call not being invoked in IE7

    My Flex UI is working perfectly in FF3. I am getting a
    strange problem in IE7. When I clear out all browsing history and
    visit my application, it works fine. When I reload the page
    containing the SWF of my flex app, or if I logout and log into my
    app again, the ExternalInterface.call invocation does not seem to
    be happening.
    I have looked for answers on various fora. I am using SWF
    embedding code generated by the flex builder and it is correctly
    setting the id of the SWF. I am running out of leads on what to try
    next.
    This has got to be a history-related issue. Anybody else seen
    this?
    Thanks.
    -Raj

    My observation was that the ExternalInterface call to my JS
    function was vanishing into the ether.
    I moved the SWF embedding code to the bottom of the page to
    ensure that IE will initialize all other tags in the page before it
    started the flash player. This seems to have done the
    trick!!

  • Plsql notify procedure not being invoked

    I have defined a persistent queue of RAW with multiple consumer set to false. I have also defined and registered a procedure to be called when a message is enqueued. I have assumed that I only need to call DBMS_AQ.REGISTER to enable the callback to be envoked. i.e. I have not used the subscriber interface to subscript to the queue because I need not do so.
    Am I incorrect in assuming that I need not use the subscriber interface when the behavior I desire is for the notify procedure to be called when a message is enqueued.

    Hi
    If you are using single consumer and registering for notification as anonymous you may face problem but if you use multiple consumer and subscribe using an agent and register for notification using that subscriber it is bound to work. Just try once.
    Regards,
    Sanjeev.

  • MethodBinding from commandLink not being called

    Hello,
    I am building a dynamic datatable and everything is being rendered fine. However, now I want to implement row selection on the table and am doing so by rendering a commandLink on each row that the user can click to select the row. I would like to bind this to an action method in my bean and have so far been unable to invoke the action method when I click on the link. Here is my code:
    UICommand comm = new UICommand();
    MethodBinding mbButton = app.createMethodBinding("#{myBB.buildModel}", null);
    comm.setAction(mbButton);
    code]
    And my backing bean is defined in faces-config as myBB.  In that backing bean, I have:      public String buildModel() {
         logger.info("BuildModel invoked");
         return "stay";
    But buildModel is not being called at all when I click the link on the page. What am I missing?

    Figured it out.
    You need to set an ID for each comm, also. Adding a call to comm.setId(<unique ID>) fixed the problem.

  • Action method not being called

    Using jdev 10.1.3.4 with jsf/adf bc. I have two af:table components on a jsf page. I'll call them table A and table B. In table B, I have an input text with autosubmit=true and hooked up to a valuechangelistener. One of the columns in table B is a command button. Initially, I was having problems when the user changed the input value in table B and then immediately clicked the button in table B. Sometimes when the button was clicked, the backing bean method associated with it was not executing. Thanks to Didier's advice in this forum (Re: PPR and submit I was able to get this functionality working consistently.
    I still have a problem though. Table A has a command LINK as one of the columns, which executes a method in the backing bean when clicked. However, as in the scenario above, if the user changes a value in the input text in table B and in this case immediately clicks the LINK in table A, it seems that the action method behind the button in table A executes the first time but if user repeats steps (changes value of input in table B and immediately clicks LINK in table A) the action method is not called after the first time. For testing, there is no real code in the backing bean method. The only code in the action method is an sop so I can tell if the method was executed. Likewise, the value change listener method, for testing purposes, has a sop so I can tell if/when it is executed and the thread.sleep(400) code needed per Didier's workaround. I'll include the code from jspx:
    In the jspx -
    <afh:body firstClickPassed="true">
    <h:form>
    <!-- table A -->
    <af:table value="#{bindings.Summary.collectionModel}" var="row"
    rows="#{bindings.Summary.rangeSize}"
    first="#{bindings.Summary.rangeStart}">
    <af:column headerText="#{bindings.Summary.labels.PositionNbr}">
    <af:inputText value="#{row.PositionNbr}"/>
    </af:column>
    <af:column>
    <af:commandLink text="Click" action="#{backing_levelone_untitled2.buttonClicked}"/>
    </af:column>
    </af:table>
    <!-- Table B -->
    <af:table value="#{bindings.BdCommentsView.collectionModel}" var="row"
    rows="#{bindings.BdCommentsView.rangeSize}"
    first="#{bindings.BdCommentsView.rangeStart}">
    <af:column headerText="#{bindings.BdCommentsView.labels.CommentId}">
    <af:inputText value="#{row.CommentId}"
    required="false" />
    </af:column>
    <af:column headerText="#{bindings.BdCommentsView.labels.Comments}">
    <af:inputText value="#{row.Comments}"
    required="false" autoSubmit="true" valueChangeListener="#{backing_levelone_untitled2.isValid}"/>
    </af:column>
    <af:column>
    <af:commandButton text="Click" action="#{backing_levelone_untitled2.buttonClicked}"/>
    </af:column>
    </af:table>
    </h:form>
    </afh:body>
    I need the backing bean method behind the LINK in table A to be fired consistently, every time user makes a change to input of table B and immediately clicks LINK in table A. It works the first time, but all subsequent attempts will not result in the action method being executed. Hope someone can help.
    Edited by: user12341229 on Dec 11, 2009 3:24 PM

    I'm not sure if this is considered a bug, but I found that if I use a commandLink in table A, my code doesn't work as expected. However, I found that by using a commandButton in table A the functionality works as expected. I still would like to hear some feedback on this if anyone is interested in recreating the scenario. Thanks.

  • How to invoke commandLink action?

    Hi!
    On my page i have commandLink defined like this:
    <af:commandLink binding="#{regBean.cmdLink}" text="commandLink 1" action="#{regBean.startRegistration}"/>
    i need to invoke its action automatically when the page is loaded (it is just "please wait" page") ... i have pagePhaseListener, my own afterPageLoad() method is invoked at right time.
    System.out.println("afterPageLoad");
    Object retVal = cmdLink.getAction().invoke(FacesContext.getCurrentInstance(),null);
    System.out.println("afterPageLoad end- "+retVal);
    But when i try invoke commandLink action from this method, it is not invoked, even debugging message after this call is not processed, no exception is thrown..
    What am i doing wrong? thanks a lot for any help
    Tomas

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame {
        public Test() {
         setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         Container content = getContentPane();
         JButton jb = new JButton("DO NOT PRESS");
         jb.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent ae) {
              doFirstThing();
              doSecondThing();
         content.add(jb, BorderLayout.SOUTH);
         setSize(200,200);
         show();
        private void doFirstThing() { System.out.println("I'm doin mah thing!"); }
        private void doSecondThing() { System.out.println("I wanna go first!"); }
        public static void main( String args[] ) { new Test(); }
    }If you want something different from this, you are going to have to explain more.

  • AC 5.3  Critical Action Alert Emails not being sent

    HI:
    We have set up Critical Action alerts for a couple of transactions and while the on-line alert logs are being generated correctly, the alert email is not being sent to the Risk Owner.
    Does anyone know where I can trouble shoot this issue?
    Thanks,
    Margaret

    >
    Alpesh Parmar wrote:
    > Margaret,
    >
    >     Have you set up the SMTP server in visual admin? RAR needs to use this server details to send out an email.
    >
    > Alpesh
    Hi AlpeshMargaret,
    Where are the instructions for setting up the SMTP server in visual admin for the purpose of Alert Generation? I am not seeing this in the Configuration Guide. Could you point me to the correct documentation?
    Thanks!
    Jes

  • OBIEE Action Could not be invoked

    HI
    when scheduling bi publisher report through OBIEE Action webservices link getting following error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service ScheduleService at endpoint http://xxx:9704/xmlpserver/services/v2/ScheduleService
    Client received SOAP Fault from server : java.lang.NullPointerException
    please suggest
    thanks

    Hello,
    Please check ChaRM related SPRO points under the node
    SAP Solution Manager
    -> Scenario-Specific Settings
    -> Change Request Management
      -> Extended Configuration
       -> Change Transaction
        -> Change Transaction Types
    and also sub-node "Actions in Change Request Management2 and all its activities. These SPRO activities contain settings that are important to ChaRM activities.
    Best regards,
    Miguel Ariñ

Maybe you are looking for