Struts ActionForm and Model Objects design

I've managed to make a pretty nice model with persistence managed by hibernate logic encapsulated in DAO's.
But now Ive reached the web layer and I'm with struts, and I'm kind of stuck so I would love to hear some suggestions.
How should I create ActionForms without duplicating the model state in ActionForm classes?
Right now, my model implements ActionForm, which is tight coupling .
But this increases maintenability.
Other suggestions?

It is a very bad idea to have your model implement ActionForm, for the reason you mentioned -- tight coupling. When you do that, you are tied to a web application; and, more specifically, Struts. "Best practice" says you need to duplicate a bit of your model in your ActionForm (Jakarta Commons BeanUtils makes this painless). As you probably know, the ActionForm should correspond to the form being displayed in the browser; each HTML form element should have a corresponding property in your ActionForm class. These properties might come from various parts of your domain model, so this gives you a place to muster them all together. I use an initXXXAction to populate the ActionForm, if needed, before display and a completeXXXAction to process the users input after they submit (although I'm thinking about switching to one of the DispatchAction flavors). Also, if the idea of maintaining the ActomForm classes is a hang-up, I'd suggest looking into the DynaXXX classes.
Just to re-iterate, having your model implement ActionForm is BAD.

Similar Messages

  • Struts actionform and checkboxes

    hi!
    I'm having trouble creating an actionform for a jsp that i have. Basically, my jsp lists files which have their corresponding checkboxes. The user can click multiple checkbox representing the files he wants to download. On clicking the download button, it submits it to my DownloadAction.
    My problem is that only the first checkbox is stored in my actionform.
    here's my actionform:
    package mybeans;
    import org.apache.struts.action.ActionForm;
    import java.util.*;
    public class FilesForm extends ActionForm
        Vector files = new Vector();
        String file = null;
        public String getFile() {
             System.out.println( "getting file" );
             return file;
        public void setFile( String string ) {  
             System.out.println( "setting file" );      
             file += string + ",";
             files.add( string );
        public Vector getFiles() {
             return files;
    }my jsp is a bit big. here's the form part:
    <html:form action="/download">
      <table>
        <tr>
          <td><input type="checkbox" name="file" value="someDynamicID"></td>
          <td>filename</td>
        </tr>
      ...more files here...
      </table>
    </html:form>Thanks in advance!

    Make your setter take a String[] argument and your getter return a String[] argument (I think List or Set might also work).

  • UIX and Struts ActionForm

    Hi,
    Can I use Struts ActionForm and ADF UIX?
    Thanks

    The "Simple Hello World sample using ADF UIX and JDeveloper 10g Preview" application integrates Struts with ADF UIX.
    http://jjacobi.blogspot.com/2003_11_30_jjacobi_archive.html
    Simple ADF UIX User Input Application
    http://www.oracle.com/technology/products/jdev/howtos/10g/adf_uix_userinput_ht/index.html

  • Model Instance Vs Model Object

    Hi experts
    can anyone plz explain me the difference between model instance and model objects. is it necessary to create model instance when dealing with WebService model.
    also tell me what do u mean by associating model objects.
    plz explain with reference to the following code :
    <b>public void wdDoInit() {
    //@@begin wdDoInit()
    // create a new model instance (1)
    model = new EmailAdWSModel();
    // create model objects (2, 3)
    Request_SendEmail requestMO = new Request_SendEmail(model);
    SendEmail emailMO = new SendEmail(model);
    // associate model objects (4)
    requestMO.setSendEmail(emailMO);
    // bind executable model object to context node (5)
    wdContext.nodeRequest_SendEmail().bind(requestMO);
    //@@end
    }</b>
    i found this on sample exercises given on sdn:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/301ff0bb-74ca-2910-fa99-eae392695aad
    can any one help me regarding this.
    Thanks in advance.

    Hi krishnan..,
                       To be brief , have a clear idea about model i.e., A model contains number of classes inbuilt in it which u could find after importing a model..
    You must create an instance to the model to access the classes in the model..
    similarly you create objects to the classes in the model to get it referenced..
    As u are used to object oriented programming, i hope u may have a good idea about classes and objects..
    An object is always an instance of a class..and u can never access a class without creating an object to the class..
    as in the coding which u have given..
    "model" is an instance of the model called EmailAdWSModel();
    then u create objects for the classes inside the model and then u access the attributes by referencing the objects of the class.
    hope u would be clear with this concept

  • ActionForms and Actions

    I have managed to make a console extension for my custom authentication provider. But there is one problem - how to handle submitted form data. Currently there is no quality tutorial at weblogic sites :( I found some but there are some steps skipped!
    I only know that I have to make Struts ActionForms and Actions. But I really do not know how.
    Could you please help me.
    Thanks a lot.

    Enyone pleeeeeeeeease.
    I find lot of contrary examples at web, but there are some ideas i could use. I only do not know how to make struts-auto-config-xxx.xml file. There are no manual for it :-(
    Help please.

  • Difference Between Maps and Value Objects

    Hi Guys
    Can you please help me differentiate between HashMap and Value Object Design patterns. The trade offs of each and how to choose between the two patterns.

    It really depends upon what you really want to do:
    - If you want to transfer simple objects using their inherent structure, use your DomainObject itself or if you really need to, use a ValueObject
    - If you want to transfer a lot of similar or even different objects with unique keys, use some Map.
    Using a HashMap, you might need to consider:
    - The hashing can significantly increase your CPU load, if you are doing too much. For example you can define your hashValue() to return just the PrimaryKey, or it's hashValue() if it's an Object. And equals() needs only to compare the PrimaryKey as well. This semantic results in two objects being equal, if they have the same PrimaryKey. You may define an additional deepEquals() method, to see if an updated version contains changes to the stored version, if this is needed.
    - If you keep around references in a Map without clearing them, when you don't need them any more, the Map will increase in size. If you want to keep them, but only as memory alows, you might even consider using WeakReference<T>.
    Together with the rules provided by krunals, I hope this helped a bit...

  • Good database design and modelling books

    Hi ,
    I need to work on designing a database from the scratch by creating logical database design and then physical database design.I'm new to database design.
    Can someone please point me to some good database design and modelling related books /tutorials.
    Regards,
    Bharath.

    bharathDBA wrote:
    Hi Girish Thanks for the information.
    I would definitely look into this book later.
    I don't mind paying any amount of money,if that book gives me the knowledge I want.
    As this book is international edition,for shipping it is taking 8-10 business days and by that time I need to complete designing my database and probably I might need to some other book.
    Is this a school assignment? I hope so. Referring back to your opening statement "I need to work on designing a database from the scratch by creating logical database design and then physical database design.I'm new to database design." I can only say that database design is a very big subject. If you are starting from a position of no knowledge at all, I'm afraid there is nothing that is going to give you the knowledge you need in the time frame you have. I will say you need to start by learning the rules of Data Normalization. Make your logical design Third Normal Form. Good can be your friend. There is actually a pretty good write-up on Data Normalization on Wikipedia.

  • Design and model

    Hi
              Anyone know of a good tool for designing and modelling a website that is
              written with JSPs ?
              Thanks
              C.
              

    To simple design and modeling , we can go for DreamWeaverMX.
              if we want to go to furthur implementation for components, we can go for Eclipse ,MyEclips and SmartDrawn.
              ---Anilkumar kari

  • How to push Process model to design model?

    I just learned how to capture business requirements and a logical design using the logical data modeler and process molder to create data flow diagrams, with composite, primitive and transformative processes in SQL Developer 3.0
    I know in Oracle Designer we were able to associate entities to business functions and transform the business functions into modules of type PL SQL or screen, etc.... We could create detail design documents from this information in Oracle Designer. In Oracle Designer the modules would be associated to the physical table definitions. However, the data flows in SQL developer are associated to logical entities.
    My question is can these objects/items (processes primitive, composite, transformative) be transformed into design items similar to how we transform a business function in Oracle Designer into a modulel?
    Thanks
    Mark
    Mark Kramm

    Hi Mark,
    there is no support for applications and modules in Data Modeler.
    Design can be exported to reporting repository and there is no limit in how you can utilize these meta data. Column groups and UI defaults can be defined at table and column level - I know some people are generating APEX applications and process model can be very helpful for that.
    In Oracle Designer the modules would be associated to the physical table definitions. However, the data flows in SQL developer are associated to logical entities.Each entity can be mapped to unlimited number of implementations in form of tables in relational and physical models. You need to engineer logical model to one or more relational models. There is small wizard appearing in context menu of data flow diagram node in browser - "Transform Process model roles to Physical role". You can create roles in process model and assign them to processes connected to data stores. Then this wizard will create these roles in selected physical model and CRUD settings will be transferred to permissions to select, insert, update and delete for related tables. This is just example that physical model can be reachable from process model.
    We'll add more utilization of definitions in process model in future releases.
    Philip

  • Best practice for saving and recalling objects from disk?

    I've been using the OOP features of LabVIEW for various projects lately and one thing that I struggle with is a clean method to save and recall objects.
    Most of my design schemes have consisted of a commanding objects which holds a collection of worker objects.  Its a pretty simple model, but seems to work for some design problems.  The commander and my interface talk to each other and the commander sends orders to his minions in order to get things done.  For example, one parrent class might be called "Data Device Collection" and it has a property that is an array of "Data Device" objects.
    The Data Device object is a parent class and its children consist of various data devices such as "DAQmx Device", "O-Scope Device", "RS-232 Device", etc.
    When it comes to saving and loading data, the commanding class's "Save" or "Load" routine is called and at that time all of the minions' settings are saved or recalled from disk.
    My save routine is more-or-less straight forward, although it still requires an overwriting "Save" and "Load" vi.  Here is an example:
    It isn't too bad in that it is pretty straight forward and simple and there also would be no changes to this if the data structure of the class changed at all.  It also can save more generalized settings from it's parrent's class which is also a good feature.  What I don't like is that it looks essentially the same for each child class, but I'm at a loss on an effective way to move the handling of the save routing into the parent class.
    The load routine is more problematic for me.  Here is an example:
    Again, the desirability of moving this into the parent class would be awesome.  But the biggest complaint here is that I can't maintain my dynamic dispatch input-output requirements because the object that I load is strictly typed.  Instead I have to rely on reading the information from the loaded object and then writing that information to the object that exists on the dynamic dispatch wire.  I also dislike that unlike my Save Routine, I will need to modify this VI if my data structure of my object changes.
    Anyway, any input and insight would be great.  I'm really tired of writing these same VIs over-and-over-and-over again, and am after a better way to take care of this in the parent class by keeping the code generalized but still maintain the ability to bring back the saved parameters of each of the children classes.
    Thanks for your time.

    I'm with Ben. Don't rely on the current ability to serialize an object. Create a save method and implement some form of data persistence there. If you modify your class you might be disappointed when you cannot load objects you previously saved. It mostly works but as soon as you reset the version information in the class, you can no longer load the old objects. This is fine if you know how to avoid resetting the history. One thing that will do this is if you move the class into or out of a library. It becomes a new class with version 1.0.0 and it no longer recognizes the old objects.
    [Edit:  I see that you are just writing to a binary file. I'm not sure you can load older objects anyway using that method but I have never tried it.]
    This will not help you right now but there are plans for a nice robust API for saving objects.
    =====================
    LabVIEW 2012

  • Struts, beans, and unique IDs

    Hi,
    I'm trying to capture info from a web form using Struts, and I have a ActionForm (bean?) for that. When submitted (or instantiated - I don't know the details of how or when exactly it's being created), I want that bean to somehow get assigned a uniqueID so I could locate it easily in a database later.
    Where and when should I be doing this? Is it in the action class after the form has been submitted that I should assign ID to the bean (bean.setID(generatedInt); - but that's not good practice, I think), or inside the bean in its constructor? Or maybe there's a simple and clean way Struts can do this?
    And generally, is there good info on how and when the bean is being created by Struts? From Struts docs I got an idea of a bean representing a form through which the data is being submitted. Is this so?

    There are beans and then there are beans. They are used for many purposes.
    Struts ActionForm beans are used to gather together and validate the data from a JSP page (or some other view) and present it to the Action. Those are the beans they were probably talking about in the struts docs.
    Your business logic for the most part should be stored in different beans from these ActionForm beans.
    Database properties don't always correspond directly to all the fields on a form and vice versa. The whole point is that these business beans are your model - they should not in any way be affected by the view.
    On assigning Ids - my approach would be to have it in your business layer, rather than in the action class. That would mean that the beans could be usable outside of struts. Each individual class should be responsible for getting its id - ideally the first time it is saved.
    Just my 2 cents,
    evnafets

  • Adaptive RFC and Locking Objects from WD Java

    Hi,
    There are some pieces of information available on this subject but no coherent and easy to follow "manual". Also some questions remain.
    I'd rate this a very important, i.e. "business critical" problem. Therefore I would appreciate your help to get things sorted in this thread.
    So let's start with a summary of what I think I understood so far (corrections welcome!):
    - You can call RFCs from WebDynpro and locking will work (on the ABAP side).
    - Once you release your JCo connection the locks will be released, though.
    - Therefore, to keep a lock in between requests you have to keep the connection.
    - You can keep the connection by passing WDModelScopeType.APPLICATION_SCOPE or WDModelScopeType.COMPONENT_SCOPE to the constructor of the model class.
    - You can lookup the default scope for a model using
         WDModelScopeType defaultScope = WDModelFactory.lookupDefaultScopeForModel((Class) modelClazz);
    Now suppose you have many users, each holding some locks.
    Would you not easily run out of JCo connections? On the other hand by default WebDynpro RFC Models seem to keep a connection per application instance (= user session).
    Using WDModelScopeType: Do you really need to code this or can you just configure this during design time for the deployment?
    blog=/pub/wlg/1061 claims the default is APPLICATION_SCOPE.
    Will connections (and thus locks) be released automatically on an HttpSession timeout? I guess so because this means the end of the application and therefore end of scope WDModelScopeType.APPLICATION_SCOPE and WDModelScopeType.COMPONENT_SCOPE.
    I'm also not clear about this:
    /people/sap.user72/blog/2005/01/08/adaptive-rfc-models-in-web-dynprosome-pointers
    "But to ensure that the record remains locked it is necessary reserve the connection that was used for locking and be made unavailable for other models and also the connection should remain open as long as the lifetime of the screen. This becomes similar to locking records through SAP Gui . This can be easily achieved by having separate models for locking RFCs defined with APPLICATION_SCOPE and isolating its connection by not grouping with other model objects."
    What does "reserve the connection" mean?
    Suppose you lock some object and afterwards want to allow the user to request more information about this or other objects.
    Would you need to use a different connection for that?
    Suppose you want to lock two objects.
    Would you need to use two different connections for that?
    Suppose you want to edit both objects and save the changes inside one transaction (with atomicity). A transaction normally is associated with a single connection (unless XA protocol is used). So how would this work?
    What will cause the locks to be released?
    - Application expiration (timeout)
    - RFC that explicitely releases locks
    - Transaction commit/rollback (?)
    Reference:
    I found some of the information and further pointers in the blog mentioned above and here:
    Disconnect method
    Looking forward to your replies
    Markus
    Message was edited by: Markus Wissmann
    Another thread with the same topic and no final answers:
    Handling object locking in R/3 from WD through RFC
    Message was edited by: Markus Wissmann

    Hi,
    This for If you send destination params are different u sent it thru URL param only.
    For that u need generate URL by using the application .
    For that purpose u need to create two applications u can call the first application in second application u can create URL and send Destination params with URL only.
    Other wise u can create the par file that would be configured in portal and thru worksets u can pass the params like u mention the destinations.
    Or at the time generationg URLS only u can add the destination names.
    Thanks,
    Lohi.

  • Issues in persisting dynamic entity and view objects using MDS

    Hi All,
    I'm trying to create dynamic entity and view objects per user session and to persist these objects throughout the session, I'm trying to use MDS configurations(either file or Database) in adf-config.xml.
    I'm facing following two errors while trying to run the app module:
    1. MDS error (MetadataNotFoundException): MDS-00013: no metadata found for metadata object "/model/DynamicEntityGenModuleOperations.xml"
    2. oracle.mds.exception.ReadOnlyStoreException: MDS-01273: The operation on the resource /sessiondef/dynamic/DynamicDeptEntityDef.xml failed because source metadata store mapped to the namespace / DEFAULT is read only.
    I've gone through the following links which talks about the cause of the issue, but still can't figure out the issue in the code or the config file. Please help if, someone has faced a similar issue.
    [http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG |http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG ]
    [http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm|http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm]
    Attached is the code for dynamic entity/view object generation and corresponding adf-config.xml used.
    ///////////App Module Implementation Class/////////////////////////
    public class DynamicEntityGenModuleImpl extends ApplicationModuleImpl implements DynamicEntityGenModule {
    private static final String DYNAMIC_DETP_VO_INSTANCE = "DynamicDeptVO";
    * This is the default constructor (do not remove).
    public DynamicEntityGenModuleImpl() {
    public ViewObjectImpl getDepartmentsView1() {
    return (ViewObjectImpl) findViewObject("DynamicDeptVO");
    public void buildDynamicDeptComp() {
    ViewObject internalDynamicVO = findViewObject(DYNAMIC_DETP_VO_INSTANCE);
    if (internalDynamicVO != null) {
    System.out.println("OK VO exists, return Defn- " + internalDynamicVO.getDefFullName());
    return;
    EntityDefImpl deptEntDef = buildDeptEntitySessionDef();
    ViewDefImpl viewDef = buildDeptViewSessionDef(deptEntDef);
    addViewToPdefApplicationModule(viewDef);
    private EntityDefImpl buildDeptEntitySessionDef() {
    try {
    EntityDefImpl entDef = new EntityDefImpl(oracle.jbo.server.EntityDefImpl.DEF_SCOPE_SESSION, "DynamicDeptEntityDef");
    entDef.setFullName(entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setName(entDef.getName());
    System.out.println("Application Module Path name: " + getDefFullName());
    System.out.println("EntDef :" + entDef.getFileName() + " : " + entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setAliasName(entDef.getName());
    entDef.setSource("DEPT");
    entDef.setSourceType("table");
    entDef.addAttribute("ID", "ID", Integer.class, true, false, true);
    entDef.addAttribute("Name", "NAME", String.class, false, false, true);
    entDef.addAttribute("Location", "LOCATION", Integer.class, false, false, true);
    entDef.resolveDefObject();
    entDef.registerSessionDefObject();
    entDef.writeXMLContents();
    entDef.saveXMLContents();
    return entDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private ViewDefImpl buildDeptViewSessionDef(EntityDefImpl entityDef) {
    try {
    ViewDefImpl viewDef = new oracle.jbo.server.ViewDefImpl(oracle.jbo.server.ViewDefImpl.DEF_SCOPE_SESSION, "DynamicDeptViewDef");
    viewDef.setFullName(viewDef.getBasePackage() + ".dynamic." + viewDef.getName());
    System.out.println("ViewDef :" + viewDef.getFileName());
    viewDef.setUseGlueCode(false);
    viewDef.setIterMode(RowIterator.ITER_MODE_LAST_PAGE_FULL);
    viewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
    viewDef.setSelectClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.addEntityUsage("DynamicDeptUsage", entityDef.getFullName(), false, false);
    viewDef.addAllEntityAttributes("DynamicDeptUsage");
    viewDef.resolveDefObject();
    viewDef.registerSessionDefObject();
    viewDef.writeXMLContents();
    viewDef.saveXMLContents();
    return viewDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private void addViewToPdefApplicationModule(ViewDefImpl viewDef) {
    oracle.jbo.server.PDefApplicationModule pDefAM = oracle.jbo.server.PDefApplicationModule.findDefObject(getDefFullName());
    if (pDefAM == null) {
    pDefAM = new oracle.jbo.server.PDefApplicationModule();
    pDefAM.setFullName(getDefFullName());
    pDefAM.setEditable(true);
    pDefAM.createViewObject(DYNAMIC_DETP_VO_INSTANCE, viewDef.getFullName());
    pDefAM.applyPersonalization(this);
    pDefAM.writeXMLContents();
    pDefAM.saveXMLContents();
    ////////adf-config.xml//////////////////////
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
    xmlns:sec="http://xmlns.oracle.com/adf/security/config">
    <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
    <amconfig-overrides>
    <config:Database jbo.locking.mode="optimistic"/>
    </amconfig-overrides>
    </startup>
    </adf-adfm-config>
    <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="TestDynamicEC-8827"/>
    </adf:adf-properties-child>
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    </sec:adf-security-child>
    <persistence-config>
    <metadata-namespaces>
    <namespace metadata-store-usage="mdsRepos" path="/sessiondef/"/>
    <namespace path="/model/" metadata-store-usage="mdsRepos"/>
    </metadata-namespaces>
    <metadata-store-usages>
    <metadata-store-usage default-cust-store="true" deploy-target="true" id="mdsRepos">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
    <property name="metadata-path" value="/tmp"/>
    <!-- <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
    <property name="jndi-datasource" value="jdbc/TestDynamicEC"/>
    <property name="repository-name" value="TestDynamicEC"/>
    <property name="jdbc-userid" value="adfmay28"/>
    <property name="jdbc-password" value="adfmay28"/>
    <property name="jdbc-url" value="jdbc:oracle:thin:@localhost:1521:XE"/>-->
    </metadata-store>
    </metadata-store-usage>
    </metadata-store-usages>
    </persistence-config>
    </adf-config>
    //////////////////////////////////////////////////////////////////////////////////////////////////////////

    Hi Frank,
    I m trying to save entity and view object xml by calling writeXMLContents() and saveXMLContents() so that these objects can be retrieved using the xmls later on.
    These methods internally use MDS configuration in adf-config.xml, which is creating the issue.
    Please share your thoughts on resolving this or if, there is any other way of creating dynamic entity/view objects for db tables created at runtime.
    Nik

  • BI-IP and Business Objects?

    Please refer to the thread:
    BI-IP and Business Objects?

    Ian,
    reading through the messages, there seem to be a few questions that are raised.  After attending SAP Financials 2008, here is what I got from it:
    1. IP vs BPC:  IP is still in production and will be developed (no commitment on time though.  I was told somewhere between 18-24 months before it goes to maintenance mode).  There is some functionality difference from BPC and right now these are two separate products.  There is a talk of a possible integration in the "distant" future
    2. BPC is in process of being developed for BI, but currently it is only running on top of Microsoft SQL server. The BI version is slated to be released June 28th, but majority of the experts are fairly pessimistic about that date.
    Now, the main question is what will happen to IP when BEx and BO tools converge into one - based on my understanding, we are going to see ADDITIONAL functionality.  Since all the WAD and Excel activities are based on BEx API's, it is highly unlikely that they are going to be dismissed in the new product.  The process in which we assign functions/commands to the planning model might change, but I think only for the best
    Pavel

  • Newbie question about entity and view objects

    Hi everyone,
    My first ADF application in JDeveloper is off to a difficult start. Having come from a forms background, I know that it is necessary avoid using post-query type lookups in order to have full filtering using F11/Ctrl+F11. This means creating an CRUDable view and getting as much of the lookup data as possible into the view without losing the ability to modify the data. In JDeveloper, I do not know how to build my data model to support that. My thought was to start with a robust updateable view as my main CRUD EO and then create a VO on top of that with additional EOs or VOs. But, I have found that I cannot add VOs to another VO. However, if I link the VOs then I have a master-detail which will not work for me.
    For example, I have two joins to CSI_INST_EXTEND_ATTRIB_V shown in the queries below and need to have that show in the table displaying the CRUD VO’s data. It seemed that the best way to do this is to create a CSI_INST_EXTEND_ATTRIB_V entity object and view object. The view object would have two parameters, P_INSTANCE_ID and P_ATTRIBUTE name. Both the building and the unit are needed on the same record, and this is not a master-detail even though it might look that way. (A master-detail data control will not work for me because I need all this data to appear on the same line in the table.) So, I need help figuring out the best way to link these to the main (CRUD) view; I want as much of this data as possible to be filterable.
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'BUILDING NAME'
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'UNIT NAME'
    Ultimately, I need to display a ton of data in each record displayed in the UI table, so a ton of joins will be needed. And, I need to be able to add records using the UI table also.
    James

    Hi Alejandro,
    Sorry if I caused confusion with my first post. What I had in mind assumed that I could have a single CSI_INST_EXTEND_ATTRIB_V EO with a BuildingVO and UnitVO on top of it. So, I wrote the queries individually to show how I would invoke each view. When I realized that confused the issue, I rewrote the query to explain things better.
    Now having seen your 2 queries. You need to create 2 EO. One for each table. Then create an association between the 2 aeO (this will be the join you are talking about). Then, you need to create a VO based on one of the EO and after you can modify and add the second EO (in here you select the join type).
    After your done with this, youll have 1 VO that supports CRUD in both tables.
    There were three tables in the query: CIEAV_BUILDING, CIEAV_UNIT, and T -- the main CRUD table. When you say that I should create two EOs, do you mean that they are to be for CIEAV_BUILDING and CIEAV_UNIT? Or, CIEAV and T? Assuming CIEAV and T, that sounds like it would allow me to show my building or unit on the record but not both.
    By the way, everything is a reference except for the main CRUD table.
    Look forward to hearing from you. Thanks for your help (and patience).

Maybe you are looking for

  • How to suggest new tower location in Death Valley

    The Death Valley travel season is almost over and this applies mostly to next one, in around 7 months. For some reason T-Mobile and to some degree At&t offers service near Furnace Creek. I am not sure why Verizon offers zero service there.... I mean

  • Rented movie from atv back to computer

    I read an article from apple insider that said you can't sync a movie from the apple tv to you computer. I spoke with an apple representative that said that is not true the movie will sync to the computer otherwise how could you put the movie onto yo

  • Example of calling a function with passing parms

    Does anyone have an example of calling a function that returns a refcursor, but also has passing parms? I've looked at the samples and they don't have passing parms. I've tried what you would think (adding an in passing parm to the function call and

  • AUTOMATIC VENDOR EVALUATION

    Dear SDN Experts & MM Gurus, I had run automatic vendor evaluation in back groung . I need your experities in the following queries . 1. system is giving messsage weighing Key doesnot exists for the purchase organization & in overall score in Me62 or

  • Address Labels in Pages

    Hi -- Haven't been able to find how to set up and print address labels--any help would be great. Thx, Elfwoman