Object Type as Application Level Variable

I probably already know the answer to this but thought I would see if anyone has gotten to work or developed some sort of work-around.
My question is, if I define an object type (create type ... as object ...) is it possible to hold a variable of this type as the session level? For example, if I am creating an order using multiple web pages, it would be much easier (and intuitive) to create and manipulate an order object than to hold the data in generic collections.
If that is not possible, is there some way to make a generic Apex collection appear more application specific? By this I mean some way to map the columns C001, C002, ... to more intuitive names such as CUST_NO and ORDER_DATE. I had considered possibly creating a view of the APEX_COLLECTIONS view which would rename the columns but then I would also have to create a bunch of instead of triggers if I wanted to update it as well.
Any thoughts or suggestions would be appreciated. Thanks,
Mark

Mark Wagoner wrote:
I probably already know the answer to this but thought I would see if anyone has gotten to work or developed some sort of work-around.
My question is, if I define an object type (create type ... as object ...) is it possible to hold a variable of this type as the session level? No. APEX session variables are stringly typed (perhaps the biggest single drawback of the framework).
If that is not possible, is there some way to make a generic Apex collection appear more application specific? By this I mean some way to map the columns C001, C002, ... to more intuitive names such as CUST_NO and ORDER_DATE. I had considered possibly creating a view of the APEX_COLLECTIONS view which would rename the columns but then I would also have to create a bunch of instead of triggers if I wanted to update it as well.
jarola wrote:It might that instead of trigger do not work for view where you query APEX_COLLECTIONS.Confirmed: +{message:id=10391521}+
Don't waste your time on it.
But you can create view to display data from APEX_COLLECTIONS and give generic columns meaningful alias.
Then create own procedures where utilize APEX_COLLECTIONS package to make update/delete/insert.That's the approach I'd use as well.

Similar Messages

  • Global/Application level variable

    Hey guys
       I have been using sdk 3.0 so far, but now ran into a issue.  I wanted to create grouped data grid using AdvancedDataGrid, but when my data get loaded from CF, the AdvancedDataGrid does not update with newly acquired data.  I used
      [Bindable] public mydataprovider:ArrayCollection;
    and in result function have
        mydataprovider = new ArrayCollection(event.result as Array).
    All of this works but my datagrid remains empty, since there was no data when the component was created and added to the stage.  Turns out that this is a know issue and was fixed in subsequent DMV 3.0.2
    [link]http://bugs.adobe.com/jira/browse/FLEXDMV-1334?page=com.atlassian.jira.plugin.system.issue tabpanels:all-tabpanel[/link]
    So I installed sdk 3.3.  Now I have all sorts of errors.  Mainly this one.
    I have a utility.as file in which a var as bellow
    var app:[app name] = mx.Application.application as [app name]
    I am using this var (app) to access values that are set in different stages and also to dispatch and listen to events.  but now I can use it in 3.3
    I get an error
         Call to a possibly undefined method addEventListener through a reference with static type [app name]
    Now I think I know that I didn't use the best coding pratice, and made due with ad-hoc way of making app work.  But now I need some help to fix my hacks.
    So the question is how can I dispatch and listen for actions at a single point (I know that dispatched actions are suppose to bubble up till they are heard, but that for some reason didn't work for me from the start).  And how to I create application wide variables so I can access them anywhere and at anytime in my app.
    Sorry for such a long post, and thank you very much for all your help
    Jaysheel.

    Hey Alex,
       The the app name is the exact same.  I have a file called virome.mxml which has my <mx:application> tag and my var "app" is of type virome.  I have check the spelling.  Any other ideas?
    oo good to know that I should try to avoid even bubbling, hehe at least I am doing something right.
    Jaysheel
    p.s if it helps here is the application tag
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns="*"
                    creationComplete="initApp()"
                    layout="absolute"
                    width="100%"
                    height="100%"
                    preloader="custom.preload.Preloader"
                    historyManagementEnabled="false"
                    modalTransparency="0.45"
                    modalTransparencyBlur="8"
                    modalTransparencyColor="#FF6600">
    and here is my declaration in utility.as
         public var app:virome = mx.core.Application.application as virome;   
         public const viromeLSO:SharedObject = SharedObject.getLocal("viromeLocalSharedObject");
         private var parsing:Boolean = false;
         public function Utility(){
              app = mx.core.Application.application as virome;

  • Application scope variables ... an easier way or not ?

    Instead of sharing application scope variables through the
              servletContext()/application I am using a normal singleton class (or maybe
              static class) to share all my application varaiable. It works fine and it
              takes a lot less code to write.
              It seamed logical to do this a static classes or singletons are shared
              within a single servletContext/application (which there seems to be only one
              per WL instance anyway). (singleton is quite nice pattern coz. all
              jsp:useBeans with the application scope are by definition singletons)
              Has anoyne tried something similar or maybe know of the problem with this
              approach. I assume that server will never reinitialise application level
              variables ...... hope the assumption is correct. ....
              

    When you specify application scope, the JSP stores/retrieves the value
              into/from the servlet context. You may already know this, but it sounded
              like what you thought you were somehow avoiding.
              Cameron Purdy
              http://www.tangosol.com
              "Bohinc D" <[email protected]> wrote in message
              news:[email protected]..
              > Instead of sharing application scope variables through the
              > servletContext()/application I am using a normal singleton class (or maybe
              > static class) to share all my application varaiable. It works fine and it
              > takes a lot less code to write.
              >
              > It seamed logical to do this a static classes or singletons are shared
              > within a single servletContext/application (which there seems to be only
              one
              > per WL instance anyway). (singleton is quite nice pattern coz. all
              > jsp:useBeans with the application scope are by definition singletons)
              >
              > Has anoyne tried something similar or maybe know of the problem with this
              > approach. I assume that server will never reinitialise application level
              > variables ...... hope the assumption is correct. ....
              >
              >
              >
              

  • How to Use Transient View Objects to Store Session-level Global Variables

    hi
    Please consider section "40.8.5 How to Use Transient View Objects to Store Session-level Global Variables"
    at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    Based on this documentation I created the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.01.zip
    It behaves as show in the screencast at http://screencast.com/t/qDvSQCgpvYdd
    Its Application Module has a Transient View Object instance "MyEmployeesContextVOVI", as master for the child View Object instance "EmpInCtxJobVI".
    On rollback the Transient View Object instance keeps its row and attribute values.
    Also when passivation and activation is forced (using jbo.ampool.doampooling=false ) the Transient View Object instance seems to keep its row and attribute values.
    questions:
    - (q1) Why does the expression #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty} evaluate as true when a Transient View Object instance attribute value is changed (as shown in screencast at http://screencast.com/t/qDvSQCgpvYdd )?
    - (q2) What would be a robust approach to make a Transient View Object instance more self-contained, and manage itself to have only one single row (per instance) at all times (and as such removing the dependency on the Application Module prepareSession() as documented in "5. Create an empty row in the view object when a new user begins using the application module.")?
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    q1) Does sample 90 help ? http://blogs.oracle.com/smuenchadf/examples/
    Yes, the sample from Steve Muench does help, "90. Avoiding Dirtying the ADF Model Transaction When Transient Attributes are Set [10.1.3] "
    at http://blogs.oracle.com/smuenchadf/examples/#90
    It does point out a difference in marking transactions dirty by different layers of the framework, "... When any attribute's value is changed through an ADFM binding, the ADFM-layer transaction is marked as dirty. ...".
    This can be illustrate with a small change in the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.02.zip
    It now shows the result of both these expressions on the page ...
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty}
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.dataProvider.transaction.dirty}... where one can be true and the other false respectively.
    See also the screencast at http://screencast.com/t/k8vgNqdKgD
    Similar to the sample from Steve Muench, another modification to the example application introduces MyCustomADFBCDataControl
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.03.zip
    public class MyCustomADFBCDataControl
      extends JUApplication
      @Override
      public void setTransactionModified()
        ApplicationModule vApplicationModule = (ApplicationModule)getDataProvider();
        Transaction vTransaction = vApplicationModule.getTransaction();
        if (vTransaction.isDirty())
          super.setTransactionModified();
    }Resulting in what seems to be more consistent/expected transaction (dirty) information,
    see also the screencast at http://screencast.com/t/756yCs1L1
    Any feedback on why the ADF Model layer is so eager to mark a transaction dirty is always welcome.
    Currently, question (q2) remains.
    regards
    Jan

  • How to keep an application level object running with SunIDM?

    We are working on intergrate a gmail project with SunIDM. We need an application level object running with SunIDM so it will maintain a token generated from Gmail side. In anther servlet project, I had this object saved in the attribute of the ServletContext, then other session level servlet could share this attribute anytime. Is there a way to store attribute in Servlet Context and have it shared by different user session in SunIDM? I have been reading documents and searched this forum, haven't find any topics related how to maintain an application level object live. Hopefully that I can get some hint here.
    Thank you so much.

    Paul, Thank you so much for the further explaination. I don't think it will work since the token generated from gmail will expire every 24 hours.
    We are using the gdata library published from by gmail people, and I create a new UserService object and have it run in the application level. The UserService object will generate a token and renew it every 24 hours behind the scene. Here is how I implement it in my Servlet project:
    //to have a UserService object running at the application level:
    public class GmailUserService extends HttpServlet {
    public void init(ServletConfig config) throws ServletException{
    super.init();
    userService = new UserService(myApplication);
    config.getServletContext().setAttribute("gmailUserService", userService);
    //to access this UserService object from other servlet in each user session:
    UserService userService = (UserService)servletContext.getAttribute("gmailUserService");
    Gmail will trigger an error if we create a new UserService object for each user. They recommend to have all the user to share one UserService object. I am looking for similar approach in SunIDM.
    Thank you again, Paul, for trying to help.

  • Assign value to Object type variable

    CREATE OR REPLACE TYPE emp AS OBJECT (
    empid NUMBER,
    age NUMBER,
    dob date);
    CREATE OR REPLACE TYPE emp _tab AS TABLE OF emp;
    Pls hlep me assign value to the object type variable in loop..(assume there is 5 10 records in emp table)
    declare
    v_emp_tt emp _tab ;
    begin
    for i in (select empid ,age ,dob from emp ) Loop
    v_emp_tt := i.empid; --this is wrong pls help me correct it.
    end loop;
    end;
    thanks,

    I would keep the type/object naming convention distinct from the table name.
    In terms of assignment:
    CREATE OR REPLACE TYPE to_emp AS OBJECT
    (empid NUMBER,
    age NUMBER,
    dob date);
    CREATE OR REPLACE TYPE tt_emp AS TABLE OF emp;
    declare
    v_emp tt_emp;
    begin
    select to_emp_obj(emp_id, age, dob)
    bulk collect into v_emp
    from emp;
    end;

  • How can I obtain an object-type variable in Forms 6i?

    i create an object-type in oracle 8i database like this:
    TYPE OBJ_TYPE_NUMBER AS OBJECT
    FIELD1 NUMBER,
    MEMBER PROCEDURE INIT, ...
    i create a variable of this object-type in a stored procedure in Oracle 8i:
    v_Number OBJ_TYPE_NUMBER(10);
    and then call it's method:
    v_Number.INIT;
    it work's!
    But when I try to compile a previous variable declaration
    (v_Number OBJ_TYPE_NUMBER;) in Oracle Forms 6i I see only an error message.
    So my question is How can I declare and use an object-type variable in Forms 6i?

    Hi,
    the release after Forms 6i is Forms9i. Forms9i does have the PLSQL engine of Oracle 9.0.0.2 database which means that it should knwo how to handle object types in PLSQL.
    Frank

  • Can you reference package variables in a pl/sql object type

    I'm trying to create an object type and I would like to use a type from a pacakge definition as one of the parameters for a method in the object. I read that types defined inside a PL/SQL package cannot be used as parameter. Does anyone have a workaround for this?

    You could move the type definition out from the package to a schema level object type. Then you should be able to use the schema level object type in both your package and the new object you wish to create.
    Below is a short example of what I mean:
    -- The way I interpreted your question
    CREATE OR REPLACE PACKAGE foo_pkg
    AS
    TYPE foo_obj IS RECORD (
    f1 NUMBER
    ,f2 VARCHAR2 (10)
    in_pkg_foo_obj foo_obj;
    END foo_pkg;
    SHOW errors
    CREATE OR REPLACE TYPE newFooObj IS OBJECT (
    f1 NUMBER
    ,f2 VARCHAR2 (3)
    ,f3 DATE
    ,MEMBER FUNCTION getAllFoos (inFoo IN foo_pkg.foo_obj)
    RETURN NUMBER
    SHOW errors
    CREATE OR REPLACE TYPE BODY newFooObj
    AS
    MEMBER FUNCTION getAllFoos (inFoo IN foo_pkg.foo_obj)
    RETURN NUMBER
    IS
    BEGIN
    RETURN 1;
    END;
    END;
    SHOW errors
    -- Clean up
    DROP PACKAGE foo_pkg;
    DROP TYPE newFooObj;
    -- Now try it with a schema level object type
    CREATE OR REPLACE TYPE foo_obj IS OBJECT (
    f1 NUMBER
    ,f2 VARCHAR2 (10)
    CREATE OR REPLACE PACKAGE foo_pkg
    AS
    in_pkg_foo_obj foo_obj;
    END foo_pkg;
    SHOW errors
    CREATE OR REPLACE TYPE newFooObj IS OBJECT (
    f1 NUMBER
    ,f2 VARCHAR2 (3)
    ,f3 DATE
    ,MEMBER FUNCTION getAllFoos (inFoo IN foo_obj)
    RETURN NUMBER
    SHOW errors
    CREATE OR REPLACE TYPE BODY newFooObj
    AS
    MEMBER FUNCTION getAllFoos (inFoo IN foo_obj)
    RETURN NUMBER
    IS
    BEGIN
    RETURN 1;
    END;
    END;
    SHOW errors
    DROP PACKAGE foo_pkg;
    DROP TYPE newFooObj;
    Bob

  • IDOC - process code with error "Application Object Type not planned'

    Hi all,
    I am doing an inbound idoc.... in TCODE we42, i trying to put function module which i created, attached to the process code.
    However, when i put my function module ZIDOC_INBOUND to the process code... it comes out error, 'Application Object Type not planned.'
    Why is this so?
    Please advice...
    Thanks and regards...
    William Wilstroth

    HI all,
    I had solved this problem. I should have gone to we57 to tie the function module.
    thanks.
    William Wilstroth

  • Urgent: Application Object Type for ALE IDoc

    Hi All,
    I am struggling with ALE IDoc, I just wanted to know that is it mandatory to create Application Object Type when i have created my own message type, Idoc type, segment type and Function Module. I am Getting an error while excuting transaction we42( Maintaining Process code)
    Error: Application Object Type is not planned.
    Please Help with this.  i don't have any requirement of filtering or serialisation, so still do i need to create these application objects.
    Useful ans will be rewarded.
    Thanx

    Hi,
    Yes u need to have the assignment of Object type as ur extending the IDOC.
    Check the steps below:
    TCode- BD95.
    Create ALE object type  “Z...”  with table name “EKKO” and Field name “-BSART”
    Step2:
    Tcode- BD59 – “Assignment of Object type to Message”
    Give the message type “ORDERS”.
    Assign the object type “Z........” to segment type “E1EDK01’ with field “BSART”.
    Regards
    Kannaiah

  • SSIS 2012 - Parent/Child Package "Object" Type Variables

    How do I pass Variables of Object type from Parent to Child packages?
    I am using the SSIS 2012 project deployment model.
    Thanks

    You can do it as outlined in
    http://sqlblog.com/blogs/andy_leonard/archive/2010/01/25/ssis-snack-passing-parent-starttime-to-the-child-package.aspx
    But
    When you need an object it is typically a recordset, then just pass the results, or execute the query in a package.
    Arthur My Blog

  • What target property must be specified while passing a object type variable to child package in SSIS 2012

    What target property must be specified while passing a object type variable to child package in SSIS 2012???

    As shown below, there is variable strVar and it's Value property is selected. Likewise you have to select the property that you need to pass.
    Please refer:
    http://www.bidn.com/blogs/MikeDavis/ssis/155/passing-variable-values-from-parent-package-to-child-ssis
    -Vaibhav Chaudhari

  • IDOC - Application object type not planned

    Hi all,
    I am doing an inbound idoc.... in TCODE we42, i trying to put function module which i created, attached to the process code.
    However, when i put my function module ZIDOC_INBOUND to the process code... it comes out error, 'Application Object Type not planned.'
    Why is this so?
    Please advice...
    Thanks and regards...
    William Wilstroth

    Sorry... i think this should be in Data Transfer section

  • DS application object type

    Hi Experts,
    I would have a question.We wanted to make the Object type changeable on Acceptence system therefore we could create on acceptance an Design studio application to try if it runs on netweaver.but I could not find the object type for DS applications on the list of changeable objects in RSA1 in Transport connection.
    Can anybody help?
    Thanks,
    murat

    Hi,
    I actually want to know in details the various extractions functions performed by various extractors.This will help me a lot like understanding control/info/parameters/tracking ID extractors etc.

  • Persisting Instance Variables in Object Types across PL/SQL Calls

    How can I persist instance variables in my java class/object across PL/SQL calls via a PL/SQL object type.
    What I am finding is that if I do not have an attribute defined in my PL/SQL datatype that the value is not persisted between calls on the object in the PL/SQL environment. I am using the SQLData interface.
    Should I create a static variable that uses the singleton pattern?
    Any insights appreciated.

    How can I persist instance variables in my java class/object across PL/SQL calls via a PL/SQL object type.
    What I am finding is that if I do not have an attribute defined in my PL/SQL datatype that the value is not persisted between calls on the object in the PL/SQL environment. I am using the SQLData interface.
    Should I create a static variable that uses the singleton pattern?
    Any insights appreciated.

Maybe you are looking for