1 Reply Latest reply: Apr 21, 2013 1:14 PM by 11gA RSS

    Sample Custom Bean with Override Submit button

      Does some one have a sample code with an override logic for button.

      Please do not share the code of the Dev Guide and the OIM assets published.
        • 1. Re: Sample Custom Bean with Override Submit button
          I have created a Custom Managed Bean, which is associated with My Information Page.My Bean reads a UDF field which has a comma seprated value of EMails and populates a drop down list on the My Information Page.
          This works fine. Now the next step is to implement the value change listener which catches the change/selection done on the drop down list and overriding of Apply Button to save the selected field on User's profile.

          I am not able to do it,even after spending quite bit of time on this. Has any one done something similar and can share code.I need code for Value change Listener and Override Submit button.

          The code which is published in assests page and Dev Guide is not working.

          My Submit button code is

          public void submitActionValidator(ActionEvent actionEvent) {
          String methodName="submitActionValidator";
          BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
          System.out.println("Inside" methodName"2**********");
          // Get the sepecific list binding
          JUCtrlListBinding listBinding = (JUCtrlListBinding)bindings.get("Custom Dropdown");
          System.out.println(methodName+"MNSCUInside SubmitAction3 **********");
          // Get the value which is currently selected
          Object emailSelected = listBinding.getSelectedValue();

          System.out.println(methodName+"MNSCUInside SubmitAction Avlidator***********************************");
          // emailSelected =
          // (RichSelectOneChoice)actionEvent.getSource();
          if (emailSelected != null) {
          preffemail = emailSelected.toString();
          FacesContext facesContext = FacesContext.getCurrentInstance();
          // execute original submit button action listener
          MethodExpression originalActionListener =
          new Class[] { ActionEvent.class });
          originalActionListener.invoke(FacesUtils.getELContext(),new Object[] {actionEvent});
          System.out.println("Exit methodName **********");