Set Transient VO attribute runtime

Hi Everyone,
I am creating new row though create Method in Entity Object. Now the problem is I have to set Transient VO attribute in order to keep the row of advance table editable. Any help would be appreciable.
Thanks and Regards,
Sandip

Hi Sandip,
As per my understanding we can't create row in create method, it fires automatically when a row will be created.
Transient attribute can be set when you are creating new row.
after creating new row, set the transient attribute then insert the row and set the row status.
I hope it will give you clue.
Regards,
Reetesh Sharma

Similar Messages

  • Setting transient VO attributes defaut value does not work

    Hi,
    I try to set default values to transient attributes but it dowes not work the value retuened after the executequery() is null.
    Please help.
    Thnaks
    JO

    Transient attributes will be cleared on VO requery
    what is your requirement ?
    Thanks
    Tapash

  • How to set default value in transient boolean attribute in VO in ADF

    Hi ADF Experts,
    I have requirement like,I have viewObject with one transient booelan attribute,
    I want to set default value of that boolean attribute as "True"
    How can I achive that please help,
    Tried every thing but no luck.

    Hi,
    I am not sure what is the use of setting a default value for a transient attribute in a read-only VO.
    However, why not include that attribute with a default value in the query itself?
    Something like
    SELECT
         Empno, Ename, Deptno, 'true' as BooleanTransAttr
    FROM EMP
    and set the type of the attribute to Boolean?
    -Arun

  • How to set a extended attribute as read-only in runtime

    Hi Team,
    I would like to set a extended attribute as read-only in runtime based in a condition.
    I tried with "Criterion" in a extended model definition, but if the condition is false the content field disappear.
    Best regards

    Hi Bruno,
    About the first part of your problem : User with permission and user without permission.
    To meet your needs I would have defined a Group named "WithPermission" and associated this group to a Member (user) "A"
    While other users would not have been associated with this group.
    When an user login I would have checked what groups that are associated with. If the group "WithPermission" was found I would have allowed the current login user to write "My Example". If the current login user was not associated to group name "WithPermission". The user would not have been able to edit the field.
    I did a search in the metamodel object and I found nothing Method. Following my reading it seems that it is not possible. Read below.
    In Sybase Guide "Customizing and Extending PowerDesigner" - CHAPTER 7: Scripting PowerDesigner you can read the following :
    Manipulating the Repository By Script
    PowerDesigner lets you access the Repository feature via scripting using the RepositoryConnection as BaseObject global property.
    It allows you to retrieve the current repository connection, which is the object that manages the connection to the repository server and provides access to documents and objects stored under the repository.
    The RepositoryConnection is equivalent to the root node in the Repository browser.
    You can access the repository documents, but you cannot access the repository administration objects, like users, groups, configurations, branches, and list of locks. In addition, only the last version of a repository document is accessible using scripting.
    As described by Dirk I think the only thing you can do is to make a check on a specific username. Unfortunately it will be "hard coded" in your program. Or If you can by vb script access the repository tables. You could resolve your problem by checking Group permission associated to each users logged in..

  • Setting Transient Attributes

    Hi all,
    Is there a way to set transient attributes (they are NOT based on EO attributes) without dirty the transaction?? I'm setting them using my VORowImpl.
    Thanks in advance,
    Eduardo

    Use setState(STATUS_UNMODIFIED).
    --Shiv                                                                                                                                                                                                                       

  • The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.

    I recently moved from coldfusion 8 to coldfusion 9 but all the pages with cfgrid: is throwing the following error. Any suggestion would be of great help
    coldfusion.jsp.JRunTagLibraryInfo$NoSuchAttributeException: The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.
    at coldfusion.jsp.JRunTagLibraryInfo.getPropertyType(JRunTagLibraryInfo.java:627)
    at coldfusion.jsp.JRunTagLibraryInfo.buildTagInfo(JRunTagLibraryInfo.java:585)
    at coldfusion.jsp.JRunTagLibraryInfo.getTag(JRunTagLibraryInfo.java:267)
    at coldfusion.compiler.NeoTranslationContext.findTagName(NeoTranslationContext.java:346)
    at coldfusion.compiler.NeoTranslationContext.isKnownTag(NeoTranslationContext.java:222)
    at coldfusion.compiler.CFMLParserBase.isKnownTagName(CFMLParserBase.java:589)
    at coldfusion.compiler.cfml40TokenManager.TokenLexicalActions(cfml40TokenManager.java:6704)
    at coldfusion.compiler.cfml40TokenManager.getNextToken(cfml40TokenManager.java:6586)
    at coldfusion.compiler.cfml40.getToken(cfml40.java:11879)
    at coldfusion.compiler.CFMLParserBase.isTrivialAngleBracket(CFMLParserBase.java:707)
    at coldfusion.compiler.cfml40.jj_3_1(cfml40.java:9392)
    at coldfusion.compiler.cfml40.jj_3_2(cfml40.java:9460)
    at coldfusion.compiler.cfml40.jj_3R_67(cfml40.java:9500)
    at coldfusion.compiler.cfml40.jj_3_86(cfml40.java:8147)
    at coldfusion.compiler.cfml40.jj_3R_92(cfml40.java:8584)
    at coldfusion.compiler.cfml40.jj_3_85(cfml40.java:8641)
    at coldfusion.compiler.cfml40.jj_2_85(cfml40.java:7619)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4215)
    at coldfusion.compiler.cfml40.cfif(cfml40.java:311)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
    at coldfusion.compiler.cfml40.cfif(cfml40.java:311)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
    at coldfusion.compiler.cfml40.cfelse(cfml40.java:442)
    at coldfusion.compiler.cfml40.cfelseif(cfml40.java:374)
    at coldfusion.compiler.cfml40.cfif(cfml40.java:314)
    at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
    at coldfusion.compiler.cfml40.start(cfml40.java:4664)
    at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:667)
    at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:648)
    at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:401)
    at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:343)
    at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:144)
    at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:418 )
    at coldfusion.util.LruCache.get(LruCache.java:180)
    at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java :362)
    at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
    at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
    at coldfusion.util.SoftCache.get(SoftCache.java:81)
    at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:591)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
    at coldfusion.CfmServlet.service(CfmServlet.java:201)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    Thanks Vishu,
    We are running Coldfusion 9 and attach is the sample code and error message.:
    The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.
    The CFML compiler was processing:
      A cfgrid tag beginning on line 39, column 18.
    The error occurred in E:/Websites/DreData/sobrietytesting/main/Sobrietytesting/Admin/view_users.cfm: line 54
    52 :                     hrefkey="member_id"
    53 :                     bind="cfc:tabledisplay.browseAccessAcountRequests(,,,)"
    54 :                     >
    55 :                    

  • Transient VO Attributes Question?

    Can anyone please explain to me why there appears to be two, and not one, VORowImpl instances for one detailVO record?  Please let me explain.
    I have two EO's with one AO between them.  Two VO's and a VL between them.  An AM containing the two VO's with the detail VO via the VL(on num1) from the master the the detail.  The detail VO contains a transient attribute.
    Here are the tables.
    create table jl_oaf_test1(num1 number, text1 varchar2(30));
    create table jl_oaf_test2(num1 number, num2 number, text1 varchar2(30));
    I have a simple test page containing an advanced table with an inner advanced table in the outer's detail.  I also have another advanced table bound to the same detail VO instance found in the AM.  The controller code below will produce a page that displays the same database record with two different transient attribute values.  While the non transient text1 attribute is the same in both records displayed in the page.  So I am confused.  It appears like there could be multiple VORowImpl instances for the same database record based upon how the transient attribute appears but the single update to the non transient attribute makes it appear like there is only one as I would expect.  Can someone please explain what I am missing about transient VO attributes?
    The developer's guide mentions a view object row cache.  Could that be what I am missing here?
      "6. The SuppliersVORowImpl get<AttributeName> method in turn calls the corresponding SupplierEOImpl get<AttributeName> method to retrieve the value. For the "calculated" OnHoldDisplay attribute, the view object row retrieves the value from its own cache."
    Controller code.
    package oracle.apps.xxmap.JlOafTest.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.xxmap.JlOafTest.server.JlOafTest1VOImpl;
    import oracle.apps.xxmap.JlOafTest.server.JlOafTest1VORowImpl;
    import oracle.apps.xxmap.JlOafTest.server.JlOafTest2VOImpl;
    import oracle.apps.xxmap.JlOafTest.server.JlOafTest2VORowImpl;
    import oracle.apps.xxmap.JlOafTest.server.JlOafTestAMImpl;
    import oracle.jbo.Row;
    import oracle.jbo.RowIterator;
    public class JlOafTestCO extends OAControllerImpl
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
        JlOafTestAMImpl am = (JlOafTestAMImpl)pageContext.getApplicationModule(webBean);
        JlOafTest1VOImpl vo1 = am.getJlOafTest1VO1();
        vo1.executeQuery();
        JlOafTest1VORowImpl row = (JlOafTest1VORowImpl)vo1.first();
        if (row != null) {
            row.setSelectFlag("Y");
            vo1.setCurrentRow(row);
      public void processFormData(oracle.apps.fnd.framework.webui.OAPageContext p1, oracle.apps.fnd.framework.webui.beans.OAWebBean p2) {
        super.processFormData(p1, p2);
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
        System.out.println("PFR 1");
        String event = pageContext.getParameter("event");
        if (pageContext.getParameter("Apply") != null) {
            System.out.println("Apply");
            JlOafTestAMImpl am = (JlOafTestAMImpl)pageContext.getApplicationModule(webBean);
            JlOafTest1VOImpl vo1 = am.getJlOafTest1VO1();
            JlOafTest1VORowImpl row1 = (JlOafTest1VORowImpl)vo1.first();
            row1.setTransTest("test master transient update in PFR");
            System.out.println("row1.getNum1 is " + row1.getNum1());
            System.out.println("PFR 2");
            if (row1 != null) {
                System.out.println("PFR 3");
                RowIterator iterator2 = row1.getJlOafTest2VO();
                JlOafTest2VORowImpl row2;
                if ((row2 = (JlOafTest2VORowImpl)iterator2.first()) != null) {
                    System.out.println("PFR 4");
                    System.out.println("found row2 from iterator, num1,num2 = " + row2.getNum1() + "," + row2.getNum2());
                    row2.setTransTest("test detail transient update in PFR");
                    row2.setText1("test123456");
            JlOafTest2VOImpl vo2 = am.getJlOafTest2VO1();
            Row row = vo2.first();
            row.setAttribute("TransTest","test123");
            System.out.println("set row with num1,num2 = " + row.getAttribute("Num1") + "," + row.getAttribute("Num2"));
            System.out.println("VORow instance id " + row.)
            am.getTransaction().commit();
        else if ("Select".equals(event)) {
            System.out.println("PFR Select event");
            JlOafTestAMImpl am = (JlOafTestAMImpl)pageContext.getApplicationModule(webBean);
            JlOafTest1VOImpl vo1 = am.getJlOafTest1VO1();
            Row row = vo1.getFirstFilteredRow("SelectFlag", "Y");
            vo1.setCurrentRow(row);
    Thank you

    By adding the TransTest transient attribute to the underlying EO object and using this new EO attribute in the VO the update via the master VO's detail accessor now results in the page rendering the new value for each display of the detail VO record.
    I would still like to know why the VO transient attribute behaves the way I describe above.

  • Setting value for attribute  'PO_NUMBER_SOLD'  using setter method

    Hi Experts,
    I need to set the value of a screen field according to some condition. I am using setter method of this attribute to set the value but it is not getting changed.
    I have written following code in DO_PREPARE_OUTPUT method of implementation class ZL_ZZBT131I_ZCREDITCHECK_IMPL using setter method of attribute
    Get Referral Authorization Code
          lv_val1 = me->typed_context->crechkresph->get_po_number( attribute_path = 'PO_NUMBER' ).
          me->typed_context->crechkresph->set_po_number( attribute_path = 'PO_NUMBER'
                                                            value     = ' ' ).
    while debugging I found that in method set_po_number set_property method has been used:--
    current->set_property(
                          iv_attr_name = 'PO_NUMBER_SOLD' "#EC NOTEXT
                          iv_value     = <nval> ).
    In set_property method  following code is getting executed
    if ME->IS_CHANGEABLE( ) = ABAP_TRUE and
               LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
              if <VALUE> ne IV_VALUE.
                if ME->MY_MANAGER_ENTRY->DELTA_FLAG is initial.
                first 'change' -> proof that entity is locked
                  if ME->MY_MANAGER_ENTRY->LOCKED = FALSE.
                    if ME->LOCK( ) = FALSE.
                      return.
                    endif.
                  endif.
                flag entity as modified
                  ME->MY_MANAGER_ENTRY->DELTA_FLAG = IF_GENIL_CONTAINER_OBJECT=>DELTA_CHANGED.
                endif.
                ME->ACTIVATE_SENDING( ).
              change value
                <VALUE> = IV_VALUE.
              log change
                set bit LV_IDX of ME->CHANGE_LOG->* to INDICATOR_SET.
              endif.
            else.
            check if it is a real read-only field or a display mode violation
              assert id BOL_ASSERTS subkey 'READ-ONLY_VIOLATION'
                     fields ME->MY_INSTANCE_KEY->OBJECT_NAME
                            IV_ATTR_NAME
                     condition ME->CHANGEABLE = ABAP_TRUE.
            endif.
    and in debugging I found that if part ( ME->IS_CHANGEABLE( ) = ABAP_TRUE and
               LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY) fails and hence else part is getting executed and hence my field a real read-only field or a display mode violation is happening according to comments in code.
    What shall I do so that I would be able to change the screen field value?
    Any help would be highly appreciated.
    Regards,
    Vimal

    Hi,
    Try this:
    data: lr_entity type cl_crm_bol_entity.
    lr_entity = me->typed_context->crechkresph->collection_wrapper->get_current( ).
    lr_entity->set_property( iv_attr_name = 'PO_NUMBER' value = '').
    Also, make sure the field is not read-only.
    Regards
    Prasenjit

  • How to set property classes at runtime.

    Well, as the subject line says my question is plain and simple. I don't see any property for this in SET_ITEM_PROPERTY built-in.
    Currently a form has 10 subclassed blocks and views. These blocks have almost similar/definite number of items. At a time only one block with its canvas will be shown to the user. Instead of using so many sub-classed objects, I would like to use only one block and canvas. Now I am looking get getting just property classes from the 10 child forms, which I am looking forward to apply to the common block and items. Any other ideas for the same also appreciated.
    Thanks,
    -- Raam.

    alsalamu alykom
    I think there is no way to set property classes at runtime.
    u must loop through the objects

  • Setting the logonHours attribute for a user in Active Directory

    Hi Anyone,
    I'm a brasilian guy and I need your help. How can I set the logonHours attribute on my Active Directory?
    I have this code but it doesn't works good:
        public void setLogonHours(boolean[] logonHoursBits){
            int i;
            int j;
            int k;
            int index21 = 0;
            int index24 = 0;
            byte[] byteLogonHour = new byte[21];
            byte byte8Hours = 0;
            for(i=0; i <= 6; i++){
                for(j=1; j <= 3; j++){
                    for(k=7; k >= 0; k--){
                        if (i < 6){
                            if (logonHoursBits[i] == (boolean)(index24 == 0) ? true : false){
                                byte8Hours += (byte)Math.pow(2,k);
                        else{
                            if (logonHoursBits[0] == (boolean)(index24 == 0) ? true : false){                           
                                byte8Hours += (byte)Math.pow(2,k);
                        index24++;
                    byteLogonHour[index21] = byte8Hours;
                    index21++;
                index24 = 0;
            try{
                String nome = "CN=Dryelle,OU=Pesquisa,DC=cifya,DC=com,DC=br";
                ctx = new InitialLdapContext(env,null);
                ModificationItem logonHours[] = new ModificationItem[1];
                logonHours[0]= new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute("logonHours",byteLogonHour));
                ctx.modifyAttributes(name,logonHours);
                System.out.println("Atributo logonHours alterado com sucesso.");
            catch (NamingException e) {
               System.err.println("Problema na altera??o " + e);
        }the code set the attribute but wrong. Can anyone help-me? It's making me crazy.
    Sorry about my poor english.
    Tks.
    Edited by: th_slopes on Aug 15, 2008 5:50 PM

    DirContext ctx = new InitialDirContext(pr);
              BasicAttributes entry = new BasicAttributes(true);
              String entryDN = "cn=CharbelHad,ou=test users,dc=test,dc=dev";
              Attribute cn = new BasicAttribute("cn", "ChHad");
              Attribute street = (new BasicAttribute("streetAddress", "Ach"));
              Attribute loginPreW2k = (new BasicAttribute("sAMAccountName", "[email protected]"));
              Attribute login = (new BasicAttribute("userPrincipalName", "[email protected]"));
              Attribute sn = (new BasicAttribute("sn", "Chl"));
              Attribute pwd = new BasicAttribute("unicodePwd", "\"Ch@341\"".getBytes("UTF-8"));
    Attribute userAccountControl = new BasicAttribute("userAccountControl", "512");
              Attribute oc = new BasicAttribute("objectClass");
              oc.add("top");
              oc.add("person");
              oc.add("organizationalPerson");
              oc.add("user");
              // build the entry
              entry.put(cn);
              entry.put(street);
              entry.put(sn);
              entry.put(userAccountControl);
              entry.put(pwd);
              entry.put(login);
              entry.put(loginPreW2k);
              entry.put(oc);
              ctx.createSubcontext(entryDN, entry);

  • Creation of Service Product with Set Type and Attribute

    Dear All,
    Please guide me with proper step by step process,
    How to create the product with the set type and attribute for service industry in sap crm 7.0
    Regards,

    Hi Nitin,
    Before creating the Service type of product, you have to define the Base category for Service type product. Generally the category for service will be created under the R3 hierarchy R3PRODSTYPE. You can create this category using the TCode:
    COMM_HIERARCHY. Here you have to select the product type as Service and have to assign the set types to the category.
    You can create a service product using the transaction : COMMPR01 -> Click on Service ICON -> Select the Category for Service Type. Then fill in the details for Service Product description, Service ID(Based on number range settings for products), Language.
    Also fill other details like Base Unit of measure, Pricing condition for different sales areas for the service product.
    Since you are using CRM7.0, you can do all these activities using a POWER USER role.
    For more information about Set types and hierarchies please refer the following help link:
    http://help.sap.com/saphelp_crm70/helpdata/EN/46/57672501a208e7e10000000a114a6b/frameset.htm
    Hope this helps!
    Regards,
    Chethan

  • Using table filters with transient VO attributes

    Hi,
    I have a the following use case and I cannot seem to find a valid solution on my own without falling into deep depression and/or psychotic delirium. Anyway, I'm sure there's a solution and that it's pretty simple, and hopefully someone here will know it.
    Let say I have a read-only VO with two attributes bound to the SQL query, namely Prefix and Suffix, as well as a transient calculated attribute named Compound formed of both the Prefix and Suffix separated with an hyphen.
    Now I want to bind that VO to an af:table supporting filters, showing only Compound column as Prefix and Suffix alone doesn't make much sense to the end user. I therefore use Compound as the sortProperty. For sorting, I was able to enforce correct logic by overriding the VO's getOrderByClause and setOrderByClause methods. For findMode, an old solution proposed by Steve involving overriding createViewCriteria with a custom class extending ViewCriteria that needs to override createViewCriteriaRow works. However, the filter capability of the table seems to use something different involving ViewCriteriaItemValue. Although I would be able to create a different instance when a criterion is created for the Compound attribute, but even if I do, I don't know how to split that value into two columns afterward. I guess I could create three linked values when the compound filter value is created, but it seems complicated. Best would be to hook the method returning the list of ViewCriteriaItemValue during the where clause creation, but then again, the data binding layer use that to detect what filters are applied and output the table accordingly so I cannot really remove the compound value at that point either. I could also override the getWhereClause I guess. Another solution, the simplest, would be to put the compound value in the SQL query, but I find that option appalling as it shouldn't be the database responsibility. If there's no other option I guess that what I'm going to do however.
    Anyone can shred any light on that issue?
    Regards,
    ~ Simon

    Hi Peter,
    Although it's not exactly what I need, I can indeed build a solution from that. Then again, it wouldn't be my first choice as it doesn't respect a correct separation of concerns (I guess I'm a purist). A listener is a view/controller layer entity and I would have preferred to hide the fact that the VO Attribute is a composition of two others to that layer. I would really have liked a pure model layer solution. That being said, I prefer the queryListener option to the Database one.
    Thanks,
    ~ Simon

  • How can I set a VO Attribute value ?

    Hi,
    I'm relatively new to developing OA framework pages, so apologise in advance if my terminology is not quite right at the moment. But I have an experienced Oracle Forms developer so am getting to grips with new tools.
    I've managed to develop a number of simple pages (query page and create single record page). I now want to develop a simple "master-detail" page. I've created a page that has two regions Header region and Lines region. Region styles are set to Header and AdvancedTable (child of Header region). I created some test data in TOAD and have written the code to query back the header and related lines. This works and the correct lines get displays when a new header record is displayed. I coded this in the initQuery methods. But now I'm stuck trying to create detail/line rows from the page.
    I've added the "Add New Rows" to and want to populate the Lines row with the value of my parents primary key (eventually I'll make the child fkey column hidden). For the last few days, I've read lots of forum notes and the OA dev guide. At the moment, I've created a CO on my Lines region and this basically does the following in the processFormRequest :-
    a) Traps the Add Rows Event
    b) Fetches the current row for the parent and parent Id (primary key)
    c) Fetches the current child row
    d) Tries to update the child foreign key attribute using parent's primary key.
    When I pressed the Add Rows button I was getting an error "Attribute set <attribute> failed for ...>.
    I read various notes suggesting that I did not have my EO and VO properties set for the attribute I was updating. So I changed the EO and VO to allow the attribute to always be updateable. Now I don't get the error, but the column is not populated. An empty row appears. I used the messaging and am definately getting a value in the parentKey variable.
    I know I'm in the Add Rows event because I manged to display some dummy messages.
    Below is the code in my Lines CO processFormRequest :
    OAAdvancedTableBean tableBean = (OAAdvancedTableBean) webBean.findChildRecursive("RoutesRN");
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    OAViewObject parentVO = (OAViewObject)am.findViewObject("XXRPAirlineCreateVO1");
    OARow parentRow = (OARow)parentVO.getCurrentRow();
    String parentKey = (String)parentRow.getAttribute("CompCode");
    OAViewObject childVO = (OAViewObject)am.findViewObject("XXRPRouteFullVO1");
    OARow childRow = (OARow)childVO.getCurrentRow();
    //String childFKey = (String)childRow.getAttribute("CompCode");
    //childRow.setAttribute("CompCode",parentKey);
    childRow.setAttribute("CompCode",parentKey);
    ///// String message = "Pressed Add Rows Button Parent = " + parentKey + " Child = " + childFKey;
    /// // throw new OAException(message, OAException.INFORMATION);
    I guess the above may not be the best way to the "copy" of a parent id into a child foreign key.
    Any help would be really appreciated.
    Thanks
    Ramnik
    The region style for the Header

    Look in the dev guide, Tables --> Adding rows.
    If you are handling the add row event, you need to set autoInsertion off. You need to create a row in the child VO and then set the desired attributes

  • How to set the DFF Attribute Programmatically?

    hi
    how to set the DFF Attribute Programmatically in Process Request of CO
    thanx

    Hi
    Do u want to set the value in DFF Programmatically ?
    u can capture the VO used for DFF and set the the value in controller.
    Thanks

  • How to give  Value set for model attribute?

    Hi all,
           How to give value set for model attribute?
           plz explain me with some sample code.
    Regards,
    Srinu

    Hi Srinivasulu,
    An attribute (of basic data types like integer , string etc) holds a single values.
    Please clarify by what you mean value set ?
    Also, share the structure of context.
    Regards,
    Kartikaye

Maybe you are looking for