Best way to autofill related fields (ADF Faces - ADF BC )

Hi,
I have the following database structure:
Restaurant (RestId*, RestName, ..)
|1
|
|n
Categories (CatId*, RestId (FK), CatName, CatOrder,..)
I am trying to implement the Categories page as follows (sorry for the layout but was the best I could do with text based interface...):
Restaurant
| RestId | | RestName |
Categories List
Select Category Name
| o | CatId#1 | CatName#1 |
| o | CatId#2 | CatName#2 |
Category Detail
| CatId |
| CatName |
| CatOrder |
| Commit | | Rollback | | Create | | Delete |
Autofill Functionality:
1. After leaving the RestId input field RestName and Categories List gets populated. (For this I will be using the autoSubmit feature).
2. If the user enters a wrong RestId (not in table restaurant) an error should be raised and user shouldn't be allowed to leave RestId field until it has the correct value.
Question:
Which is the best way of achieving such functionality having most part of the code at the ADF BC Layer ? It would be nice to have all validations inferred as they are when you define them at the Entity Object Layer.
Thanks,
Claudio.

see section 9.6.2 "Implementing an Efficient Existence Check" to perform your existence check validation.

Similar Messages

  • Best Way to Organize Related Multiple Contacts

    What's the Best Way to Organize Multiple Related Contacts?
    It may be a Couple or a Family with common Address and Phone, but different names and birthdates.
        Then I try to put them all in one contact listing.
    It may be a Large Business where you want to keep track of information about
    a dozen different people's address, phone, depart, title, email etc.  But It still
    would be nice to be able to pull up one entry with all the business's information.
       At some point, it will be necessary, I suppose to split the info into multiple
       seperate contacts.  When?
    Is there a better way to do this?
    Thanks, Jim Baranski

    JimBaranski wrote:
    What's the Best Way to Organize Multiple Related Contacts?
    Use Groups.
    It may be a Couple or a Family with common Address and Phone, but different names and birthdates.
        Then I try to put them all in one contact listing.
    IMHO, not a good idea. Best to keep to one person, one card.
    It may be a Large Business where you want to keep track of information about
    a dozen different people's address, phone, depart, title, email etc.  But It still
    would be nice to be able to pull up one entry with all the business's information.
    Separate cards for each person; one group (or smart group, which is a fancy name for a saved search) for the Large Business. It won't be quite the way you want it (there's no "one entry" with all the info), but it's close enough for rock'n'roll.

  • The Excel-Mania - Best Ways of Implementing Excel-Like ADF

    Hello people, good afternoon!
    I would like to share with you a doubt i have implementing complex, matrix-like forms in ADF. More often than i'd like to hear, users ask for input forms that closely resemble Microsoft Excel, where the dimensions are layered both vertically and horizontally, and the intersection between them must contain an input or output component, allowing themselves to rapidly input the data they need or to create a web version of Oracle Reports' Matrix Report. Some cases are:
    1) The user wishes to associate the employees (located in table EMPLOYEES) to the projects (located in table PROJECTS) in a screen that lays out the employees as columns and the projects as rows in a table. The intersection between them must contain a checkbox, which will insert a third record when selected, on a table called EMP_PROJ, which associates the employees to the projects.
    2) The user wishes to input a timecard in a time control system. This system must have a screen that shows the days in the week as columns, and the projects the employee is working on as rows. On the intersection, we must provide an input text where he will enter the hours he worked on that specific project on that day.
    3) The user wishes to see a screen that shows the Open Auctions they have in a Purchasing system as rows in a table, crossed with the suppliers that have bidded on these (as the columns). The intersection must contain the price each supplier bidded on each Auction.
    As you can see, i run across this requirement A LOT =). And, as much as i have polished my "Web-Like-Applications-Are-Not-Like-This" and "You-Are-Not-Working-With-Excel" speeches, our beloved users never learn ;)
    Nevertheless, i have been looking for a consistent way to implement this behavior, and i have found some options along the way. I would like to know your impressions on this matter, and if you have any "Best-Practices" that you imagine for this case.
    CASE 1: Creating a Dynamic, On-The-Fly View Object by using ADF BC APIs and using af:table component to do the trick on the page
    PROS: Less work in the View layer, Preservation of the Table CSS Layout (very nice blue header and light brown cells)
    CONS: A LOT of work on the BC layer, creates an awful lot of View Objects, and generates tons of java code on the Application Modules.
    CASE 2: Creating the model as usual and working with repeating layouts on ADF Faces (for example, enclosing an af:cellFormat on an af:forEach to repeat each column)
    PROS: Simplifies the BC layer, making it much cleaner and maintainable.
    CONS: Loses a lot of the declarative wonders of ADF Faces and also the CSS Layouts, since we are using cellFormat, rowLayout and tableLayout instead of table tag we have to manually apply the styles to the columns and rows.
    Of course, both implementations take an awful lot of time. Any other implementation styles are quite welcome (ADF Wizards, step in!)
    Anyone wants to discuss better ways of doing it?
    Best Regards,
    Thiago Souza

    Well, you could do the following:
    1) Create a stored procedure that assembles the data into a rowset with rows and fields like the format you want.
    2) Create stored procedures that handle insert, update, and delete.
    3) Create an entity object definition with all transient attributes. Make the attributes match the elements of one row.
    4) Override doDML() in the entity object class to call your procedures (the doc explains how to do this). You might also need to do a bit of research and figure out if you need to override some other method so you can report rows with transient attribute changes only as needing posting. (getPostState(), maybe?)
    5) Create a view object definition with entity-derived attributes based on your EO attributes.
    6) Override the appropriate methods to call your data assembly procedure rather than execute a query (this is also in the doc).
    Still kind of kludgy, but it keeps your business components pretty clean, especially if you use framework classes to do most of the work for you. (I have a partial example of how to do that here.) Of course, it keeps your business components clean by moving the real work to the DB, but some people find that more maintainable that a kazillion business components.
    Hope this helps,
    Avrom

  • Best way to clone a Field?

    I would like to write an application that takes a field and replicates it - everything except the name and rectangle. Attributes such as font, justification, format and maybe more complex stuff: actions, JavaScripts and calculated values should be cloned.
    Naturally, I would prefer to use high-level coding. Is it possible to perform this without having to go down to the FDF/COS layer? How?
    TIA,
    -RFH

    I rather stay away from JS for this particular task, which requires performance. I guess I will roll my sleeves and work at the COS level.
    Thanks!
    -Ramon

  • Best way to validate currency field based on two picklists

    Hi,
    Im having a great deal of trouble creating validation for the following statement:
    If (Task type =”Call” or “Callback”) and (‘Outcome Category’ is “In Progress” or “Tried and Failed to Save” or “Saved”) then (‘Total Value of Policy’ must be > 0)
    Both task type and outcome category are picklist items.
    What is the easiest way for me to do this? Ive created something horribly complex which only works when I first create the record (possibly because of the use of FieldValue rather than stored values). Ive seen people use the NOT function before to do this - could this be an option?! Ive had no luck with anything Ive tried so far.
    My current expression is as follows:
    (FieldValue('<cTotal_Value_of_Policy_ITAG>') > 0
    AND FieldValue('<Type>') <> LookupValue("TODO_TYPE", "Investigation") - - Because call or callback are the only other options in the list.
    AND (FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "In progress")
    OR FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Tried & failed to save")
    OR FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Saved")))
    OR FieldValue('<Type>') = LookupValue("TODO_TYPE", "Investigation")
    OR (FieldValue('<Type>') = LookupValue("TODO_TYPE", "Call")
    AND (FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "In progress")
    AND FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Tried & failed to save")
    AND FieldValue('<IndexedPick2>') <> LookupValue("OCC_INDEX_CUST_LOV_EVT_ACT_2", "Saved")))
    Sorry for including this confusing chunk of code, but I think it explains how more complex i have made this than i probably need to!!
    Any help would be greatly appreciated as this is quite an urgent issue..
    Many Thanks
    AJ

    Anon,
    In your edit form, create two hidden items p10_ha, p10_hb (for e.g.) Make the default values for these items as values of p10_item_a and p10_item_b respectively. So when you are processing the update, you have old values in hidden items and new values in p10_item_a and b.
    Now create 'after submit' pl/sql computation and put similar code
    if p10_ha !=1 and p10_hb !=1 then
        if p10_item_a = 1 and p10_item_b = 1 then
        -- your business logic here   
       :p_date_item := sysdate;
       end if;
    end if;Hope it helps
    Cheers
    Hari
    Edited by: Hari_639 on Oct 27, 2009 9:21 AM

  • Best way to mask a web dynpro view field

    hey guys ,
      i was wondering , what would be the best way to mask  a field in web dynpro.
      the way i am doing this is i get a value (float ) and pass it to a method i have on my context that uses the java NumberFormat to apply #####.##  and it returns a string.
    but since all i want to do is on the field  i want to show the value as a price ( i.e 999.99 ) always with double digits
    TIA,
    Guy

    Hi
      Use Java DDIC (data dictionary).Check out this post. This tells you how to use it.
    https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://Re: Output formatting?
    Hope that helps.
    regards
    ravi

  • What is the best way to add libraries to a project?

    What is the best way to add technologies to ADF? For example log4j. Or does the embedded logger have log4j features?

    HI,
    Hope helpful
    http://technology.amis.nl/blog/8380/manage-jdeveloper-external-libraries

  • Best practice to code Lookup Field to another list

    Hello All,
    Wanted to check what is the best way to create lookup field to another list. I have seen blog posts to create using feature receiver and using declarative way, but not able to find out pros and cons for the same. Want this answer urgently.
    Rohit Pasrija

    Hi,
    Per my understanding, you might want to find a better way to create Lookup field.
    Though there are different ways to create Lookup field(declaratively or programmatically), there would be no much difference between them in performance or maintenance.
    If going in the declarative way, the whole definition of the field will be hardcoded, user simply need to deploy the solution, Lookup field to a specific list will be there.
    If creating the field programmatically, there would be great flexibility when provisioning a field as we will be able to specify the properties dynamically.
    Thus, you might need to make a choice depends on the scenario in the actual production environment.
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Best way to make my WDA read only when user selects from FPM toolbar

    Using FPM, we've inserted a custom web dynpro application to maintain our gate dates in PPM 5.0.
    When the user presses the Read Only button on the FPM toolbar, what's the best way to turn our fields off? Just create a new attribute in our Component Controller context node and bind it to all the screen fields?

    Hallo Robert,
    I think it is the best and easy way to realize this.

  • Best way to implement m to n relation?

    Could you please give me some advice on the best way to implement m-n relations in apex?
    Example: I want to store server and database info. A server can have multiple database of course. But in case of a RAC database, the database can be running on multiple servers. So I have tables:
    create table SERVERS (id number primary key, name varchar2(30));
    create table DATABASES(id number primary key, name varchar2(30))
    and an m-to-n table
    create table SERV_DB(serv_id number references SERVERS(id), db_id number references DATABASES(id), instance_name varchar2(30))
    So the table SERV_DB can tell me e.g. that database PROD is running on server 'prdsrv1' with instance PROD1 and on server 'prdsrv2' with instance name PROD2
    How would you design an apex page to maintain this information (adding relations, updating instance names, etc)? I have a solution using checkboxes and 2 for-loops over htmldb_application.g_f40 (to process checkboxes) and g_f41 (to process text fields with instance names) and some delete statements but the logic behind it looks too complex for me. I am convinced that this can be done more simpler. Seems like a common problem to me, so I wonder if there is no out-of-the-box solution in apex for this?
    Could you please show me or create a small demo application with the solution that looks most elegant to you?
    Thanks,
    Geert

    Thanks for your reply. You modified the question slightly, but conceptually it is still the same. What you call the instances table corresponds with my serv_db table. I understand the solution you propose using the tabular report. If I see it correctly, you would have an insert button above the tabular report for each new relation (instance - server) you would want to add. This is ok for the case i used (databases, servers, instances) because there are relatively few relations. However I would not like this solution for other cases. E.g.:
    case: you have a list of persons and a list of tasks. You want to assign tasks to persons in a way that each person has multiple tasks to do and each task can be assigned to multiple persons.
    Suppose you add a new person, and you want to assign 15 tasks to him. The solution above (with the tabular report) would be quite some work because you would have to click 15 times on the insert button and on each click select a task from the select list. In this case it would be more appropriate to, after selecting the new person, see a list of all tasks (e.g. 30 tasks) with a checkbox in front, so you can mark 15 out of the 30 checkboxes and press submit. It gets more complex when you want to assign also an attribute to the relation, i.e. showing the list with all tasks, a checkbox in front and a select list next to each task where you can choose from e.g. "priority high" or "priority low" to indicate that this task is high or low priority for that person. Is there an easy way to implement that?

  • What is best way to active sync large quantities of files on work PCs across multiple mobil devices of employees in the field?

    I am looking for the best way for us to file share between our PC and mobil devices?  We have tons of PDF files and would benefit from being able to view/edit while in the field but are not sure of the best way to do so…
    - iCloud drive isn’t ideal because it requires everyone to have and maintain their own files via their individual devices and iCloud addresses
    - Dropbox seems to work, but it doesn’t actually store a local copy of the files so we have to load each time to view and their document viewers are not the most user friendly
    - Google Drive we used a long time ago, when it first came out, and it kind of worked well, but due to the volume of files and size of folders we constantly ran into crashing issues and sync problems so we gave up on it…
    Ideally we would like to have local folders on our desktop that activesync to our mobil devices… Do you know of a way that this would be possible or do we need to purchase one of those large, robust field management programs?

    Hi Bob.
    So what I should have done on my PC for all my files is gone to the File menu and used the Package command which would have converted it into a file with the images in it so they wouldn't need to be relinked.
    From now on I will only be working on Mac (I gave away my PC) but I'm sure I could use a friend's pc (or at a later point install Windows on my Mac). But to use the Package command on PC I need to actually have the images in the correct folder on the PC right?

  • What is the best way to clone a form field in BC

    Hi,
    What is the best way to clone a form field in BC.  I tried using jquery .clone.  It works fine on other forms for me but not on the BC forms, why? is it just me?  Any help would be great. Thanks

    I mean, duplicate a field with the click of a button.
    I think this should work, but it's not and  I am linked to the jquery library in the head of my page.
    <script type="text/javascript">
    $(document).ready(
      function() {
        $('input#tmpAddRow').click(
          function($e) {
            $e.preventDefault();
            $('tr#tmp').clone(true).removeAttr('id').appendTo('tbody');
        $('tr input[type=text]').focus(
          function() {
            $(this).addClass('myFocused');  
        ).blur(
          function() {
            $(this).removeClass('myFocused');
        </script>
    <img alt="" style="border: 0px solid; width: 200px; height: 134px; float: left;" src="/images/pv logo 3d.png" />
    <h3 style="text-align: center; color: #0000ff; text-shadow: #999999 0px 1px 5px;">Member Directory Listing</h3>
    <p style="text-align: center;">If you would like to be listed in the Pine Valley Middle School Directory, please fill out this form.  Only fill out the areas you would like to show up in our Directory.</p>
    <div style="margin-left: 130px;" class="form_bg">
    <form action="/CustomContentProcess.aspx?CCID=5656&amp;OID={module_oid}&amp;OTYPE={module_otype }" method="post" enctype="multipart/form-data" onsubmit="return checkWholeForm45842(this)" name="catcustomcontentform45842">
        <table cellspacing="0" cellpadding="2" border="0" class="webform">
            <tbody>
                <tr>
                    <td id="tmp"><label for="ItemName">First Name</label><br />
                    <input type="text" value="{module_firstname}" maxlength="255" id="ItemName" name="ItemName" class="cat_textbox_small" /><br />
                    <input type="button" id="tmpAddRow" value="Add a Row" />
                    </td>
                </tr>
                <tr>
                    <td><label for="CAT_Custom_131512">Last Name</label><br />
                    <input type="text" value="{module_lastname}" class="cat_textbox" id="CAT_Custom_131512" name="CAT_Custom_131512" maxlength="1024" /></td>
                </tr>
                <tr>
                    <td><label for="CAT_Custom_131509">Number</label><br />
                    <input type="text" value="{module_homephone}" class="cat_textbox" id="CAT_Custom_131509" name="CAT_Custom_131509" maxlength="1024" />
                    </td>
                </tr>
                <tr>
                    <td><label for="CAT_Custom_131510">Email</label><br />
                    <input type="text" value="{module_emailaddress}" class="cat_textbox" id="CAT_Custom_131510" name="CAT_Custom_131510" maxlength="1024" /></td>
                </tr>
                <tr>
                    <td><label for="ItemAddress">Address</label><br />
                    <input type="text" value="{module_homeaddress}" maxlength="500" class="cat_textbox" id="ItemAddress" name="ItemAddress" />
                    </td>
                </tr>
                <tr>
                    <td><label for="ItemCity">City</label><br />
                    <input type="text" value="{module_homecity}" maxlength="255" class="cat_textbox" id="ItemCity" name="ItemCity" /></td>
                </tr>
                <tr>
                    <td><label for="ItemState">State</label><br />
                    <input type="text" value="{module_homestate}" maxlength="255" class="cat_textbox" id="ItemState" name="ItemState" />
                    </td>
                </tr>
                <tr>
                    <td><label for="ItemZip">Zipcode/Postcode</label><br />
                    <input type="text" value="{module_homezip}" maxlength="255" class="cat_textbox" id="ItemZip" name="ItemZip" /></td>
                </tr>
                <tr>
                    <td class="hidden"><label for="FirstName">First Name</label><br />
                    <input type="text" value="{module_firstname}" class="cat_textbox" id="FirstName" name="CAT_Custom_131511" maxlength="1024" /></td>
                </tr>
                <tr>
                    <td><input type="submit" id="catcustomcontentbutton" value="Submit" class="cat_button" /></td>
                </tr>
            </tbody>
        </table>
        <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
        <script type="text/javascript" src="/CatalystScripts/Java_DatePicker.js"></script>
        <script type="text/javascript">
    //<![CDATA[
    var submitcount45842 = 0;function checkWholeForm45842(theForm){var why = "";if (theForm.ItemName) why += isEmpty(theForm.ItemName.value, "Item Name");if (theForm.Days) why += isNumericIfVisible(theForm.Days, "days"); if (why != ""){alert(why);return false;}if(submitcount45842 == 0){submitcount45842++;theForm.submit();return false;}else{alert("Form submission is in progress.");return false;}}
    //]]>
    </script>
        <script type="text/javascript">
        jQuery("#ItemName").blur(function(){
            jQuery("#FirstName").val(jQuery("#ItemName").val());
    </script>
    </form>
    </div>

  • What is the best way to keep my personal files stored in iCloud separate from my work-related files?

    What is the best way to keep my personal files stored in iCloud separate from my work-related files? It seems that I'm not allowed to link my iPad mini and my work iMac using two different accounts, so I'm wondering how to make my single personal account work for both, while keeping personal vs work files reasonably separated.
    Thanks for any suggestions.

    Is it possible for you to upgrade your account to iCloud Drive? That would mean, all Macs upgraded to Yosemite, and all mobile devices to iOS8?
    See:  iCloud Drive FAQ and iCloud: About using iWork for iOS and iCloud
    In iCloud Drive you could create two separate custom folders, one for work documents and one for private documents and organize your documents there.  Don't use the app specific folders (Keynote, Pages, Numbers, ...) , because you can only create one level of folders inside these folders.

  • I have a iMac Desktop and MacBook Pro laptop. I generate my work related files on both of these machines. What is the best way to keep the files in these machines synchronized?

    I have a iMac Desktop and MacBook Pro laptop. I generate my work related files on both of these machines. After a few days or weeks, I have new files on some folders on either of the machines that is not on the other machine. What is the best way to keep the files in these machines synchronized?

    How did you transfer the files to the iMac.  If you exported the files out of the MB library using Kind = Current you should get the edited version.  Any other  option may not.
    If you want to keep the two libraries "synced"  any photos you want to move to the iMac should be added to an album, connect the two Mac with a LAN, Target Disk Mode,  Transferring files between two computers using FireWire, with WiFi. and use the paid version of  iPhoto Library Manager to copy that album from the MB library to iMac library.  It will also copy the original and edited versions, keywords, titles, etc.
    OT

  • What is the best way to migrate from Forms to ADF?

    We are in a big quagmire. Our company has been into Oracle Forms development for over 15 years. We have applications developed in Forms 6i and 10g. We have about 5 products and these 5 products have about 25 to 30 different versions. i.e. we maintain about 30 different versions of our applications. Each version of the application has about 100 forms and 100 reports.
    Now, since Forms has come to the End of life from 11g we want to move to ADF. We tried Forms to ADF migration tools but failed. So now we have decided to manually rewrite the applications in ADF.
    Our Forms / PL/SQL developers, designers and analysts (total about 40) are all Oracle Forms people. They have no experience in Java.
    What I want to know is:
    (1.) What is the BEST way to achieve this?
    (2.) Do we have to learn Java, JSF and ADF?? (i.e. All 3)?
    (3.) Is it mandatory to learn JSF??
    (4.) Assuming, comprehensive training can be given, how long will it take for Forms people to learn ADF?
    (5.) What type of training will be required?? (Java, JSF, ADF, JDeveloper etc.)
    (6.) How LONG will this take? i.e. to train all 40 and then get rewrite an application of 100+ forms and 100+ reports? (Ballpark is OK).
    (7.) Any other technologies we should learn??
    Edited by: user12240205 on Jul 18, 2012 5:48 AM

    Obvoiusly the longer you have for training the better but I think the minimum would be
    1) Java skills - I think to start off, 1 or two days reading something like Head First Java http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208
    2) I'd then get "The Quick Start Guide to Fusion Development" http://www.amazon.com/Quick-Start-Oracle-Fusion-Development/dp/0071744282/ref=sr_1_1?s=books&ie=UTF8&qid=1343201618&sr=1-1&keywords=jdeveloper+quick (declaration: I'm the author so have a vested interest, but I still think its a good place to start. - this should be about 2-3 days to read and also to try things out.
    3) In parallel I'd be watching these ADF Insider Basics http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html#a1 - a couple of hours
    4) I'd then try this tutorial http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/ps1/ria_application/developriaapplication_long.htm - 3 hours.
    5) Optionally, if you are coming from a Forms background I would also read http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/SummitADF/SummitADF_Redevelopment.pdf and watch http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/Forms_Redevelopment_ADF/Forms_Redevelopment_ADF.html - which is about 2 hours of work.
    I think this would be the absolute MINIMUM to at least be able to build some basic applications and to start feeling your way - everything else outlined in the "ADF COLLATERAL TOUR" http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADFTour/ADFTour.html could be learned as you start building some proof of concept. However, I'd wouldn't suggest you try building a real application with only one weeks exposure (in the same way I wouldn't expect you to design a product database with only one week training). I would probably expect your developers to have at least the above training and then spend about a month or so (minimum) building proof of concepts (or testing themselves with the ADF Insider Essentials Tasks). Furthermore, I'd probably expect you to have at least on senior developer/architect, with much more experience who can be making decisions on things like reuse, partitioning, architecture etc.
    Of course, this is all subjective but I hope it helps.
    regards
    Grant
    ps
    Of course, we also have formal Oracle University Training courses which you could attend (or they can be purchased to watch on line).

Maybe you are looking for