1 2 Previous Next 27 Replies Latest reply: Dec 3, 2012 9:38 AM by 761975 Go to original post RSS
      • 15. Re: Restricting display field size to 50 for standard OAF
        shreevat
        Give alias to substr(assetdescription,1,50) assetdescription, this way you are not altering existing substitutions.

        Thanks
        Shree
        • 16. Re: Restricting display field size to 50 for standard OAF
          761975
          Hi Sushant,

          While compiling I'm getting this error:
          Error(23,13): method setProperty(java.lang.String, int) not found in class oracle.cabo.style.CSSStyle

          The error for this:
          css.setProperty("max-length",50);

          Is there any issue here?

          mallik
          • 17. Re: Restricting display field size to 50 for standard OAF
            Sushant Sharma
            Hi,

            css setProperty method takes both the parameters as string.

            So, Can you check with this:
            css.setProperty("max-length","50");

            --Sushant                                                                                                                                                                                                                                                                                                       
            • 18. Re: Restricting display field size to 50 for standard OAF
              761975
              Sushant,

              It worked with "50"..

              but i'm getting this new error :
              Error(29,12): 'class', 'interface', or 'enum' expected

              The updated code :

              import oracle.apps.eam.asset.webui.AssetHeaderCO;
              import oracle.apps.fnd.framework.webui.OAPageContext;
              import oracle.apps.fnd.framework.webui.beans.OAWebBean;
              import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
              import oracle.cabo.style.CSSStyle;

              public class XXAssetHeaderCO extends AssetHeaderCO {
              public XXAssetHeaderCO() {
              }

              public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
              {
              super.processRequest(oapagecontext, oawebbean);

              CSSStyle css = new CSSStyle();
              css.setProperty("max-length","50");

              OAMessageStyledTextBean mstb = (OAMessageStyledTextBean)oawebbean.findChildRecursive("EamAssetDesc");
              if (mstb != null) {
              mstb.setInlineStyle(css);
              }
              }

              }

              mallik
              • 19. Re: Restricting display field size to 50 for standard OAF
                Sushant Sharma
                Hi,

                Are you able to compile the file properly?
                I think this is a compile time error. There might be some issues realted to braces mismatch or missing semicolon.

                Can you paste the complete file code here ?

                --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                • 20. Re: Restricting display field size to 50 for standard OAF
                  761975
                  Hi Sushant,

                  I'm not able to compile the file:

                  Here is the error:
                  Error(29,12): 'class', 'interface', or 'enum' expected


                  The code:
                  import oracle.apps.eam.asset.webui.AssetHeaderCO;
                  import oracle.apps.fnd.framework.webui.OAPageContext;
                  import oracle.apps.fnd.framework.webui.beans.OAWebBean;
                  import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
                  import oracle.cabo.style.CSSStyle;


                  public class XXAssetHeaderCO extends AssetHeaderCO {
                  public XXAssetHeaderCO() {
                  }

                  public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
                  {
                  super.processRequest(oapagecontext, oawebbean);

                  CSSStyle css = new CSSStyle();
                  css.setProperty("max-length","50");

                  OAMessageStyledTextBean mstb = (OAMessageStyledTextBean)oawebbean.findChildRecursive("EamAssetDesc");
                  if (mstb != null) {
                  mstb.setInlineStyle(css);
                  }
                  }

                  }

                  thanks
                  mallik
                  • 21. Re: Restricting display field size to 50 for standard OAF
                    Sushant Sharma
                    Hi,

                    This code seems to be fine.
                    send me a mail at sushantsh51@gmail.com

                    --Sushant                                                                                                                                                                               
                    • 22. Re: Restricting display field size to 50 for standard OAF
                      761975
                      Hi,

                      How to get handle on OAMessageStyledTextBean in stacklayout??
                      I'm getting NULL for this..
                      OAMessageStyledTextBean mstb = (OAMessageStyledTextBean)oawebbean.findIndexedChildRecursive("EamAssetDesc");

                      Because of this, I'm not able to set CSS Style max-length to 50 for the item.

                      Can someone shed some light on this?

                      mallik

                      Edited by: 758972 on Nov 27, 2012 8:47 AM
                      • 23. Re: Restricting display field size to 50 for standard OAF
                        shreevat
                        Try this

                        OAStackLayoutBean stackBean = (OAStackLayoutBean) oawebbean.findChildRecursive("<stack layout id>");
                        OAMessageStyledTextBean mstb = (OAMessageStyledTextBean)stackBean.findIndexedChildRecursive("EamAssetDesc");

                        Thanks
                        Shree
                        • 24. Re: Restricting display field size to 50 for standard OAF
                          761975
                          Hi,

                          Thanks for reply.
                          It didnt worked for updated changes ..

                          I'm enclosing part of page xml here:
                          <?xml version = '1.0' encoding = 'UTF-8'?>
                          <!-- dbdrv: exec java oracle/jrad/tools/xml/importer XMLImporter.class java &phase=dat+24 checkfile(115.10=120.0):~PROD:~PATH:~FILE &fullpath_~PROD_~PATH_~FILE -username &un_apps -password &pw_apps -dbconnection &jdbc_db_addr -userId "1" -rootPackage /oracle/apps/~PROD -rootdir &fullpath_~PROD_mds_directory -->
                          <page xmlns="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:user="http://xmlns.oracle.com/jrad/user" file-version="$Header: EAM_GN_ASSET_HIER_DETAIL.xml 120.2.12010000.2 2009/02/11 09:27:52 smrsharm ship $" version="10.1.3_1147" xml:lang="en-US">
                          <content>
                          <oa:pageLayout id="EAM_GN_ASSET_HIER_DETAIL" akRegionCode="EAM_GN_ASSET_HIER_DETAIL" regionName="GN Asset Hier Detail Main Region" amDefName="oracle.apps.eam.genealogy.server.GenHierDetailAM" controllerClass="oracle.apps.eam.genealogy.webui.GenAssetHierMainCO" appMenu="EAM_MAIN_SS" windowTitle="Hierarchy" helpTarget="EAM_GN_ASSET_HIER_DETAIL">
                          <ui:corporateBranding>
                          <oa:image id="corporateBranding" source="/OA_MEDIA/FNDSSCORP.gif" shortDesc="Oracle"/>
                          </ui:corporateBranding>
                          <ui:productBranding>
                          <oa:image id="productBranding" source="/OA_MEDIA/EAMBRAND.gif" shortDesc="Asset Management"/>
                          </ui:productBranding>
                          <ui:contents>
                          <oa:stackLayout akRegionCode="EAM_GN_ASSET_HIER_HEADER" regionName="Hier Asset Header" controllerClass="oracle.apps.eam.genealogy.webui.GenAssetHierAssetHeaderCO" addChildren="false" standalone="true" id="EamNestedRegion1" user:akAttributeCode="EAM_NESTED_REGION1" user:akAttributeApplicationId="426">
                          <ui:contents>
                          <oa:stackLayout id="EamNestedRegion1____1" extends="/oracle/apps/eam/asset/webui/EAM_AD_ASSET_HEADER"/>
                          <oa:messageStyledText prompt="Rebuild Item" viewName="AssetHeaderVO" viewAttr="ConcatenatedSegments" styleClass="OraDataText" id="EamAssetRebuildableItem" promptTranslationExpansion="100%" user:akAttributeCode="EAM_ASSET_REBUILDABLE_ITEM" user:akAttributeApplicationId="426"/>
                          <oa:messageStyledText viewName="AssetHeaderVO" viewAttr="AssetGroupDescription" id="EamAssetGroupDesc" promptTranslationExpansion="100%" user:akAttributeCode="EAM_ASSET_GROUP_DESC" user:akAttributeApplicationId="426" prompt="Description" styleClass="OraDataText"/>
                          <oa:messageStyledText prompt="Asset Number" viewName="AssetHeaderVO" viewAttr="InstanceNumber" styleClass="OraDataText" id="EamAssetRebSerialNumber" promptTranslationExpansion="100%" user:akAttributeCode="EAM_ASSET_REB_SERIAL_NUMBER" user:akAttributeApplicationId="426"/>
                          <oa:messageStyledText viewName="AssetHeaderVO" viewAttr="DescriptiveText" styleClass="OraDataText" id="EamAssetDesc" promptTranslationExpansion="100%" user:akAttributeCode="EAM_ASSET_DESC" user:akAttributeApplicationId="426"/>


                          There is a issue here: getting null still for messagestyledtext item "EamAssetDesc" for the updated change:
                          OAStackLayoutBean stackBean = (OAStackLayoutBean) oawebbean.findChildRecursive("<stack layout id>");
                          OAMessageStyledTextBean mstb = (OAMessageStyledTextBean)stackBean.findIndexedChildRecursive("EamAssetDesc");

                          Because of this I'm not able to set the length to 50.

                          Can someone help me this issue?.

                          thanks
                          mallik

                          Edited by: 758972 on Nov 29, 2012 8:34 AM
                          • 25. Re: Restricting display field size to 50 for standard OAF
                            shreevat
                            I am assuming that you have replaced <stack layout id> with EamNestedRegion1____1 in the below
                            OAStackLayoutBean stackBean = (OAStackLayoutBean) oawebbean.findChildRecursive("<stack layout id>");


                            Thanks
                            Shree
                            • 26. Re: Restricting display field size to 50 for standard OAF
                              761975
                              Hi,

                              I tried with both EamNestedRegion1____1 or EamNestedRegion1..
                              Nothing works. It returned NULL always.

                              Please let me know any other inputs.

                              mallik
                              • 27. Re: Restricting display field size to 50 for standard OAF
                                761975
                                Hi,

                                I tried with both EamNestedRegion1____1 or EamNestedRegion1..
                                Nothing works. It returned NULL always.

                                Please let me know any other inputs to resolve this issue.

                                mallik

                                Edited by: 758972 on Dec 3, 2012 9:38 AM
                                1 2 Previous Next