2 Replies Latest reply: Jan 7, 2013 9:13 AM by D.Ram RSS

    Added button through Personalization , Not able to capture the event

    910567
      Hi All,

      We ahve added button through personalization , we need to capture this particular click event , but not able to.

      Kindly provide any samnple code for the same.

      Regards
      Kumar
        • 1. Re: Added button through Personalization , Not able to capture the event
          963393
          Hi,

          You must have added "Submit Button" item.
          Please use "Button" item instead of Submit button.
          and then use below code to handle your event in contorller's processFormRequest

          String event = pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);
          if ("<event_name>".equals(event))
          {
          Do necessary task
          }

          Please let me know if it solves your query..

          Regards,
          Piyush
          • 2. Re: Added button through Personalization , Not able to capture the event
            D.Ram
            You cannot create submit button using personalization.
            You can try below.

            Create a normal button using personalization or programmatically in process request.
            add fire action/partial action to the button bean in ProcessRequest using setFireActionForSubmit method on Button Bean.

            OAButtonBean xxButton = (OAButtonBean)webBean.findChildRecursive("xxCustButton"); // if you have created button using personalizatin.
            xxButton.setFireActionForSubmit(<params>);

            Capture and handle the event in processFormRequest.


            As you are extending controller to handle the event i suggest create button also programatically if it meets your requirement. Please refer below link.

            http://oracle.anilpassi.com/sample-code-add-submit-button-using-oa-framework-extension-2.html


            Regards,
            Ram