9 Replies Latest reply: Mar 13, 2013 4:28 AM by user9212679 RSS

    OIM 11g R2 - Developing ManagedBean

    User245677
      Hi all,
      I'm very very newbie about ADF.
      I'm trying to develop a ManagedBean to show components on OIM web interface conditionally. I found this doc http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#BABFFACA and I followed the tutorial.

      My requirement is exactly the one explained in chapter "*30.10.5.1 Showing Components Conditionally*" (http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#BABFAEIE), but I have a problem: at steps 2 and 3, when I try to use FacesUtils class methods "+partialRender+" and "+getListBindingValue+" I get and error. It seems that the auto imported class oracle.iam.ui.platform.utils.FacesUtils does not have these methods.
      I try to look for other jars on OIM server containing the class FacesUtils, but without success.
      I searched on the web and I found this doc http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/facesutils.htm talking about FacesUtils class in OIM 11g R2 (my version) and in the code snippet provided I can find the methods mentioned above.

      To workaround the problem, I created a class FacesUtils in my project (copying the java code snippet provided in the last document) and use it in my ManagedBean, but which is the right solution? I mean where can I find the library containing the correct FacesUtils class?

      Thanks in advance,
      Daniele
        • 1. Re: OIM 11g R2 - Developing ManagedBean
          User245677
          Hi all,
          if anyone is interested, I found the jar file containing the class FacesUtils
          It is stored in the war file named oracle.iam.ui.custom-dev-starter-pack.war. This war is located in IDM_HOME/server/apps directory.

          The jar file is named ADFSpyke.jar and is located in WEB-INF/lib folder.

          Bye
          Daniele
          • 2. Re: OIM 11g R2 - Developing ManagedBean
            user9212679
            Hi,

            I just unzipped the war file present in IDM_HOME/server/apps directory and there is no lib directory inside WEB-INF folder.

            Could you please help me in locating the file.
            • 3. Re: OIM 11g R2 - Developing ManagedBean
              User245677
              Strange, I just unpacked the war file and in my one there is lib folder.
              This is the cheksum of my original war (the one provided with the installation):
              cksum /opt/Oracle/Middleware/Oracle_IDM1/server/apps/oracle.iam.ui.custom-dev-starter-pack.war
              4233950274 92775 /opt/Oracle/Middleware/Oracle_IDM1/server/apps/oracle.iam.ui.custom-dev-starter-pack.war
              Daniele
              • 4. Re: OIM 11g R2 - Developing ManagedBean
                user13349112
                Hi,

                I have the same issue and I don't have a lib folder under WEB-INF of "oracle.iam.ui.custom-dev-starter-pack.war"

                Did you find the jar some place else?

                Regards,
                • 5. Re: OIM 11g R2 - Developing ManagedBean
                  User245677
                  Hi guys,
                  sorry for the wrong information....There isn't any jar named ADFSpyke.jar in the original oracle.iam.ui.custom-dev-starter-pack.war.
                  In mine it was there because a colleague create it without tell me.

                  Sorry again for the mistake.

                  P.S. Anyway if you need the FacesUtils class, you can create it copying it from here http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/facesutils.htm (as mentioned in my first post)
                  To workaround the problem, I created a class FacesUtils in my project (copying the java code snippet provided in the last document) and use it in my
                  ManagedBean, but which is the right solution? I mean where can I find the library containing the correct FacesUtils class?
                  Bye
                  Daniele
                  • 6. Re: OIM 11g R2 - Developing ManagedBean
                    Durgaprasad
                    There will be no lib folder under WEB-INF of "oracle.iam.ui.custom-dev-starter-pack.war". whatever managed bean or taskflow you have created you should add it as a ADFlibrary jar inside lib folder. If there is no lib folder then you have to manually create it and put your jar file inside it. The post in this thread tells about some ADFSpyke.jar which will not be present by default. I think they would have created this jar with FacesUtils.java and added it inside lib folder so that it can be referenced for any other custom development
                    • 7. Re: OIM 11g R2 - Developing ManagedBean
                      996166
                      What Jar files need to be included in the project to create the FacesUtils class?
                      • 8. Re: OIM 11g R2 - Developing ManagedBean
                        User245677
                        I don't remember exactly, but I followed this guide to setup the environment http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#BABFFACA.
                        • 9. Re: OIM 11g R2 - Developing ManagedBean
                          user9212679
                          You need to follow the below steps to include the libraries in your jdeveloper project which are having FacesUtils class
                          Click on Project Properties
                          1. Select Libraries and Classpath
                          2. Click Add Library.
                          3. Navigate to \Oracle_IDM1\server\jdev.lib folder and select to add library
                          4. Click OK.
                          5. Click Add Library.
                          6. Select OIM Client Library.
                          7. Confirm selection by clicking on Select.
                          8. Click OK.
                          9. Click Add Library.
                          10. Click Load Dir.
                          11. Select OIM Model Shared Library and OIM View Shared Library.
                          12. Confirm selection by clicking on Select.
                          13. Click OK.
                          14. Save the project.

                          HTH