3 Replies Latest reply on May 9, 2012 1:40 PM by 599202

    Fire Partial Action programmatically

    Radul-Oracle
      Hi

      I'm extending a controller and adding a FireAction to a OAMessageChoiceBean programmatically. I use setFireActionForSubmit on the bean, which works fine.

      However, I would rather set it to Fire Partial Action - and I can't find a method for this. Any ideas much appreciated.

      Regards,
      Radu
        • 1. Re: Fire Partial Action programmatically
          Gyan Darpan
          Radu,

          Make use of below code.
          OAMessageChoiceBean mcb=(OAMessageChoiceBean)webBean.findChildRecursive("Client");
          FireAction firePartialAction = new FirePartialAction("clientPPR");
          mcb.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
          Regards,
          Gyan
          • 2. Re: Fire Partial Action programmatically
            Radul-Oracle
            Sir, a thing of beauty, thank you. It works. I can catch "aCustomEvent" in PFR and read "someParam" using pagecontext.getParameter. AND I don't get all that page refresh and going all the way up the page and loosing focus associated with FireAction/submit.

            This is the working code.

            //imports
            import oracle.cabo.ui.action.FireAction;
            import oracle.cabo.ui.action.FirePartialAction;

            import oracle.cabo.ui.collection.Parameter;

            //in processRequest
            OAMessageChoiceBean compbean = (OAMessageChoiceBean)paycomptablebean.findChildRecursive("Component");

            if (compbean!= null){
            FireAction fpa = new FirePartialAction("aCustomEvent");
            Parameter param = new Parameter();
            //this works with a bound table
            param.setValueBinding(new OADataBoundValueFireActionURL(compbean, "{$SomeVoAttribute}"));
            param.setKey("someParam");
            Parameter[] params = {param};
            fpa.setParameters(params);
            component.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,fpa);
            }
            • 3. Re: Fire Partial Action programmatically
              599202
              Hello,

              I am trying something similar but facing problem can you have a look.

              i am adding the fireaction to a programmatically created submit button inside a table region( submit button at row level so that if fires for current row only)
              i am able to raise event but parameter is not passed, can you help on that, please note that i want one of the attributes from the VO and it should be for the current row
              for which the button is clicked.