1 2 Previous Next 24 Replies Latest reply: Mar 14, 2013 9:41 AM by AnilMenta RSS

    What is best approach to add fields to a OAF page in this situation?

    AnilMenta
      Hello Everyone,

      I'm on R12.1.3.

      I need your help to come up with the best approach for my below situation.

      It's a simple requirement to add four new fields to the OAF page. These will be read only fields which means their only purpose is to show values from the database.

      My first approach
      -------------------------------------
      Find the VO, extend it with new attributes, personalize the page and map the new VO attributes.

      Problem: This VO is based on a EO and I dont need to add these new attributes to EO (As mentioned earlier, these new fields are read only). Hence this does not work.

      My second approach
      -------------------------------------
      Create a new VO, extend the AM and add this VO to AM.

      Problem: This is a pretty busy page and it's a root AM and as per standard functionality, we are not supposed to extend root AM .

      I'm still investigating on the best approach to move ahead with. I really appreciate your expert suggestions and look forward for your help.

      Thanks,
      Anil
        • 1. Re: What is best approach to add fields to a OAF page in this situation?
          Kalimuthu V-Oracle
          Hi Anil,
          Go for Find the +"VO, extend it with new attributes, personalize the page and map the new VO attributes."+

          Though it is an EO based VO, you can make those attributes as Updatable never.

          Thanks,

          With regards,
          Kali.
          OSSi.
          • 2. Re: What is best approach to add fields to a OAF page in this situation?
            AnilMenta
            Thank you Kali for the response. I could proceed further with your suggestion. However, when I personalize the page and map the column with custom view instance and attribute details and return to application, it's throwing an error message "FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME = xxxORKleAssetBookDeprnVO; APPLICATION_MODULE = oracle.apps.okl.origination.contracts.server.ORKleRealEstateAM".

            I verified my substitution working from the "About page" link. It does show the custom VO. Now I'm wondering when the page shows custom VO, how come when i return to application after personalizing the page, it's complaining of VO not found. Any ideas please?
            • 3. Re: What is best approach to add fields to a OAF page in this situation?
              Gyan Darpan
              Anil,

              When you extend a View Object you still need to refer the Parent View Object(Standard View Object) instead of extended one(xx..).

              You are entering the extended view object using personalization.

              Cheers,
              Gyan
              • 4. Re: What is best approach to add fields to a OAF page in this situation?
                Kalimuthu V-Oracle
                Hi Anil,
                As Gyan mentioned, could you please try with the standard VO name as the viewInstance, and check the issue.
                You can refer the standard page, that how they referred the standard VO.

                Thanks,

                With regards,
                Kali.
                OSSi.
                • 5. Re: What is best approach to add fields to a OAF page in this situation?
                  AnilMenta
                  Thank you Gyan and Kali for the suggestion.

                  I did refer to the standard VO and the error is gone. But now the issue is, I don't see any value in the newly added field.

                  The standard VO I have is not a straight forward name. Initially, when I changed to standard VO reference, it did not work. Then I referred to AM.xml to see if the VO has a different name and this is what I found:

                  <ViewUsage
                  Name="*ORKleAssetBookDeprnExpVO*"
                  ViewObjectName="oracle.apps.okl.origination.contracts.server.ORKleAssetBookDeprnVO" >
                  </ViewUsage>

                  So I used ORKleAssetBookDeprnExpVO on the personalized page and the new attribute. As mentioned before, error is gone but doesn't display value either (I verified from my SQL that this record has a value).

                  The question is, ORKleAssetBookDeprnExpVO is the name for ORKleAssetBookDeprnVO and since I'm substituting ORKleAssetBookDeprnVO with my custom xxORKleAssetBookDeprnVO to which I added the attributes, will ORKleAssetBookDeprnExpVO be the name for my custom VO too so I can use ORKleAssetBookDeprnExpVO.<custom attribute>.

                  I'm sorry if I confused you. But I could not explain my situation any better.

                  Appreciate your help.

                  Thanks,
                  Anil
                  • 6. Re: What is best approach to add fields to a OAF page in this situation?
                    Kalimuthu V-Oracle
                    Hi Anil,
                    The easy way is download the page.xml using

                    begin
                    jdr_utils.printDocument('<full path of the page which you can get from about this page link or personalize page>');
                    end;

                    Then you can refer the standard field, how the reference of the standard VO.

                    And in your RowImpl you can add diagnostics message and see the message is coming with what value.
                    you can use System.out.println which will come in the
                    $LOG_HOME/ ora/ 10.1.3/ j2ee/ oacore/ oacore_default_group_1/ *.out file.

                    Thanks,

                    With regards,
                    Kali.
                    OSSi.
                    • 7. Re: What is best approach to add fields to a OAF page in this situation?
                      Kalimuthu V-Oracle
                      Hi Anil,
                      I checked the viewobject usage, i could see it has been used in
                      origination/contracts/webui/ORKleAssetGeneralRN.xml (hopefully that should be your region also).
                      with the name ORKleAssetBookDeprnExpVO
                      Can you please try with this and check the RowImpl you are getting the value for your custom attributes,

                      or for testing purpose return some hardcoded value in getCustomAttriName method.

                      Thanks,

                      With regards,
                      Kali.
                      OSSi.
                      • 8. Re: What is best approach to add fields to a OAF page in this situation?
                        AnilMenta
                        Hi Kali,

                        I've been using ORKleAssetBookDeprnExpVO but I'm not getting any values. But let me try with some messages in RowImpl and see what's going on.

                        Thanks for the help...
                        Anil
                        • 9. Re: What is best approach to add fields to a OAF page in this situation?
                          Kalimuthu V-Oracle
                          Hi Anil,
                          How those values will get set?
                          In your substituted VO have the logic to get the values
                          or in your RowImpl you are gettting it and setting it?

                          Can you share your VO query for only the custom Attributes

                          and setCustomAttribute method in VORowImpl.

                          Thanks,

                          With regards,
                          Kali.
                          OSSi.
                          • 10. Re: What is best approach to add fields to a OAF page in this situation?
                            AnilMenta
                            Hi kali,

                            Sorry for late response.

                            All I did was updated the extended VO query and added my custom attribute to it. Here is the VO query:

                            SELECT ORKleAssetDetailsEO.ASSET_ID,
                            b.implicit_yield
                            FROM OKL_OR_ASSET_INFO_UV ORKleAssetDetailsEO,
                            xxxx_asset_yields b
                            where ORKleAssetDetailsEO.CLEV_FIN_ID = b.asset_id(+)

                            And below is the generated code from VORowImpl for custom attribute
                            ------------------------------------------------------------------------

                            public String getImplicitYield() {
                            return (String) getAttributeInternal(IMPLICITYIELD);
                            }

                            /**Sets <code>value</code> as the attribute value for the calculated attribute ImplicitYield
                            */
                            public void setImplicitYield(String value) {
                            setAttributeInternal(IMPLICITYIELD, value);
                            }

                            /**getAttrInvokeAccessor: generated method. Do not modify.
                            */
                            protected Object getAttrInvokeAccessor(int index,
                            AttributeDefImpl attrDef) throws Exception {
                            if (index == IMPLICITYIELD) {
                            return getImplicitYield();
                            }
                            return super.getAttrInvokeAccessor(index, attrDef);

                            Thanks,
                            Anil
                            • 11. Re: What is best approach to add fields to a OAF page in this situation?
                              Kalimuthu V-Oracle
                              Hi Anil,
                              As I mentioned have you tried to put System.out.println in both the following methods and put the return value in get,
                              and "value" from set method.

                              public String getImplicitYield() {
                              return (String) getAttributeInternal(IMPLICITYIELD);
                              }

                              and
                              public void setImplicitYield(String value) {
                              setAttributeInternal(IMPLICITYIELD, value);
                              }

                              If you are not getting anything just return a hard coded value and see you are getting in the page,

                              Thanks,

                              With regards,
                              Kali.
                              OSSi.
                              • 12. Re: What is best approach to add fields to a OAF page in this situation?
                                AnilMenta
                                Hi kali,

                                I don't see *.out file under $LOG_HOME/ ora/ 10.1.3/ j2ee/ oacore/ oacore_default_group_1/ folder location. I did put a System.out.println message in the method below but since I didn't find *.out file there, didn't know where to look for that.

                                public String getImplicitYield() {
                                return (String) getAttributeInternal(IMPLICITYIELD);
                                }

                                But in this method, call to getAttributeInternal is striked (not sure why). So, I replaced the above return statement with return "10.00". I still don't see this value.

                                Thanks,
                                Anil
                                • 13. Re: What is best approach to add fields to a OAF page in this situation?
                                  AnilMenta
                                  Another observation is, I don't think any of the VORowImpl's are participating in getting values for the standard fields. It looks to me that the values are strainght coming from VO.execute_query() call. But for some reason, the value for my custom attribute is not showing up. Not sure if this is to do with the way page is structured that personalizations don't work properly or if I'm missing something here. Not sure how to proceed. Appreciate your help.

                                  Thanks,
                                  Anil
                                  • 14. Re: What is best approach to add fields to a OAF page in this situation?
                                    Kalimuthu V-Oracle
                                    Hi Anil,
                                    Sorry that was not the right directory to get the System.out.println logs,
                                    It should be$LOG_HOME/ora/10.1.3/opmn/oacore_default_group_1/*.out ( it is for R12 instance)

                                    Or you can use the below code to write diag messages from your rowImpl.

                                    OAApplicationModuleImpl app = (OAApplicationModuleImpl)getApplicationModule();
                                    app.writeDiagnostics("XX","<your diagnostics msg>",1);


                                    If you are not getting any message, your personalization is having some problem.

                                    If you run the new Sql directly you are getting the value in TOAD or sqldeveloper?

                                    Thanks,

                                    With regards,
                                    Kali.
                                    OSSi.
                                    1 2 Previous Next