ADF View object validation. Cannot have same column value multiple time.

Hi Expert,
I have a ADF viewobject validation question. I have the Department and employee view objects. Each department have multiple employees. (may be u can also assume. the employee name is an VO attribute not the database field)
I need to implement the following validation rule
One department shouldn't have same employee name. How can i implement this validation rule in the ADF-BC.
Looking forward ur expert suggestions. Thanks
-t

Assuming that the employee name (which you have said is a transient attribute) is created by concatenating some other fields, you could, I suppose create a unique index in the DB or a unique validator in the EO to ensure that the department ID (assume you have such an attribute) and the fields that make up the name are unique. It seems kind of unusual to be validating a transient field like this.
John

Similar Messages

  • How To change the ADF View Object  query where-clause at RunTime?

    I am trying to create a simple display page which will display user data (username, assoc_dist_id, assoc_agent_id, status , etc). The User data is stored in a database table and i am using an ADF Read Only table based on the View Object to display the data on the JSF page.
    However, i want to display only the users that a particular person accessing the page has the AUTH LEVEL to see. e.g. If the person accessing the page is an 'ApplicationAdministrator' then the page should display all users in the table, If its a 'DistributorAdministrator' then the page should display only users associated with that Distributor (i.e. assoc_dist_id = :p_Dist_id ) and If its an 'AgentAdministrator' , then the page should display only users associated with that Agent ( i.e. assoc_agent_id = :p_Agent_id).
    Currently my af:table component displays all the users in the table because the query for the view object is (select * from users) . However, i want to use the same viewobject and just set the where-clause at runtime with the appropriate parameter to restrict the dataset returned.
    Do anyone knows how to accomplish this ?

    David,
    See the custom method initializeDynamicVariableDefaults() in the SRViewObjectImpl.java class in the FrameworkExtentions project in the SRDemoSampleADFBC sample application. You can find out how to install the demo if you haven't already from the ADF Learning Center at:
    http://www.oracle.com/technology/products/adf/learnadf.html
    This class is a framework extension class for view objects that adds a neat, generic feature to be able to dynamic default the value of named bind variables. You can read more about what framework extension classes are and how to use them in Chapter 25, "Advanced Business Components Techniques" of the ADF Developer's Guide for Forms/4GL Developers, also available at the learning center above.
    It is an example of generic framework functionality that "kicks in" based on the presence of custom metadata properties on a named bind variable. See section 25.3.3 "Implementing Generic Functionality Driven by Custom Properties" in the dev guide for more details. Using this sample code, if you add a bind variable to a view object, and define a custom metadata property named "DynamicDefaultValue" on that bind variable, and set this custom metadata property to the value "CurrentUser", then that bind variable will have its value dynamically defaulted to the name of the authenticated user logged in. If instead you set this custom property to the value "UserRole", then the bind variable will be set to the comma-separated string containing the list of roles that the authenticated user is part of.
    Once you've created a framework extension class for view objects like this, you can have the view objects you create inherit this generic functionality.See section 25.1.4 "How to Base an ADF Component on a Framework Extension Class" in the dev guide for more info on this.
    By adapting a technique like this (or some idea similar that better suits your needs) you can have your view object query contain bind variables whose values automatically take on the defaults based on something in the user-session environment.

  • ADF panel does not prompt for variable defined in ADF view object.

    I have created an ADF Panel, which allows the user to run a few simple queries against an Oracle database done using ADF view objects and ADF view links and ADF application module.
    One of these queries lookup detail information about a given database object (Table, view or whatever) from dba_objects. The SQL uses a parameter (:P_OBJ_NAME) that has a default value of “Departments”. If I run the ADF application module by itself outside of the ADF panel, all works fine, it prompts me to provide a value for the parameter :P_OBJ_NAME.
    As I said the panel contains the different ADF view links including the one that should prompt the user to provide a value for :P_OBJ_NAME. When I run the panel it does not prompt me for :P_OBJ_NAME, it just uses the default defined value “departments”.
    I hope I described my problem for every one to understand. The question obviously is how do I get the ADF panel to prompt the user to provide a value for parameter :P_OBJ_NAME, my expectation was that since the sql in the view object and the application module both are designed to prompt for a value for this parameter then the panel should do just that but it does not.
    You expert input would be most appreciated.
    Thanks.
    Bobby A.
    Edited by: Babak Akbari on Aug 13, 2009 8:34 AM
    Edited by: Babak Akbari on Aug 13, 2009 11:12 AM

    The prompting for a parameter is a feature we built into the ADF Tester - it is not a default behavior you get in your application when you just place a VO on your page.
    To get something like this expend the operations node under the VO in the data control palette, and drag the "Execute with parameters" operation to your page to drop it as a parameter form.
    This will provide your user a place to fill out the parameter and press a button to execute the query.

  • Deleting from multiple tables where few tables have same column name

    Hi,
    I am new to PL/SQL and need some help. I need to delete data older then X years from some 35 odd tables in my schema and out of those tables 25 tables have same column name on which i can have my "where" clause and rest 10 table have different table names. I am doing something like this :
    declare
    table_list UTL_FILE.FILE_TYPE;
    string_line VARCHAR2(1000);
    tables_count number:=0;
    table_name VARCHAR2(400);
    column_name VARCHAR2(400);
    BEGIN
    table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
    DBMS_OUTPUT.PUT_LINE(table_list);
    LOOP
    UTL_FILE.GET_LINE(table_list,string_line);
    table_name := substr(string_line,1, instr(string_line,'|')-1);
    column_name := substr(string_line, instr(string_line,'|')+1);
    DBMS_OUTPUT.PUT_LINE(table_name);
    DBMS_OUTPUT.PUT_LINE(column_name);
    IF column_name = 'SUBMISSION_TIME' THEN
    delete from :table_name where to_date(:column_name)<(sysdate-(365*7));
    ELSE
    delete from || table_name || where ( || to_date(column_name) || ) <(sysdate-(365*7));
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    UTL_FILE.FCLOSE(table_list);
    DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
    UTL_FILE.FCLOSE(table_list);
    END;
    WHERE the text file "text7.txt" contains list of table name and column names separated by a pipe line. But when I execute the above proc it gives error "invalid table name".
    Can something like this be done or is there any other way to execute this task of deletion from 35 tables.
    Thanks.

    Thanks for replies. I don't know what I am doing wrong but still not getting this damn thing work...This is the proc i am running now :
    declare
    table_list UTL_FILE.FILE_TYPE;
    string_line VARCHAR2(1000);
    tables_count number:=0;
    table_name VARCHAR2(4000);
    column_name VARCHAR2(4000);
    code_text VARCHAR2(2000);
    BEGIN
    table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
    LOOP
    UTL_FILE.GET_LINE(table_list,string_line);
    table_name := substr(string_line,1, instr(string_line,'|')-1);
    column_name := substr(string_line, instr(string_line,'|')+1);
    IF column_name = 'SUBMISSION_TIME' THEN
    DBMS_OUTPUT.PUT_LINE('do nothing');
    ELSE
    code_text:= 'begin delete from'|| (table_name) ||'where to_date' || (column_name) || '<(sysdate-(365*7))';
    Execute Immediate code_text;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    UTL_FILE.FCLOSE(table_list);
    DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
    UTL_FILE.FCLOSE(table_list);
    END;
    But it gives following error :
    " ORA-06550: line 1, column 51:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 1, column 68:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    ORA-06512: at line 22 "

  • ADF View Object Capability

    Usually I use ADF View Object when I want to view data from table in Oracle DB.
    Now can View Object extract data from file? xml or csv format?
    Regards
    Erich

    Hi,
    no, ViewObjects work with queries against the database.
    Frank

  • Crystal Reports XI - How to pull same column value with different select...

    I have a report with many (around 30) sub reports and it is giving serious performance issue. I am currently finding out a strategy to improve the performance. I see that most of the sub reports are taking same parameters from main report except for one parameter which is different for each sub report and hard coded in them and pulling up the same column value from a oracle database with a different select criterion. I am trying to find out a way using either of command/crystal formula/SQL expression which can do the same job for me and give me performance improvement. I tried to take the parameters from the main report in one sub report and mapped them to parameters being transferred to the command and then drag and drop the field for which I need to display the value but due to some reason it is not returning values when I am trying multiple commands...I need some help in selecting a strategy for this issue resolution and some guidance....Any help would be highly appreciated....

    My version is 11.5.8.826. First of all I need to make it clear that I have 6 set of sub reports and each set has 5 sub reports. So if I can resolve the issue for one set, I resolve it for all. The sub reports are doing nothing but fetching a column value using a simple SQL SELECT query and appending to the right of a box in main report. The issue is that all these queries embedded into the sub reports are using same SQL except for one parameter in the "where" clause and they are fetching same column value from the database and fortunately all of them are returning same number of results. So at the end these results create a table when run. The only way I can stop using sub reports is by creating a table in the main report and use some object(formula/command/SQL expression or whatever) to fetch that column value using the same filter conditions. But please take a note that I need to use and append the same column value from a database table and use different filter conditions and append them to the right so that at the end they create a table...as long as I get the table in the output with a decent performance , anyone will be least bothered about what I used inside the report.....please ask me as many questions to get more lights on the issue....

  • Can I have the same printer installed multiple times under different names?

    On WIndows I have the same printer installed multiple times
    All using the same driver
    I have a Canon printer that has a rear tray and a bottom tray
    So, I will have one printer that prints to the rear and the other to the bottom
    Other printers (the same one) will be set so that they print in high quality and in duplex for example
    I'll name the printers 1.Canon 2.Canon 3.Canon etc
    So, when I go to print, I just hit a number on the keyboard and the printer I want is selected
    Can I do the same on my laptop?
    Thanks
    Omar

    Back Up - that's in case things go wrong.
    In the case you cite:
    You have
    Mother
    Mother Maiden Name
    as Faces, right?
    In the Corkboard view click on Mother Maiden Name and delete the 'Maiden Name'.
    It will disappear and all the photos will be in the Mother face.
    Note that 'Mother' and 'Mother ' (that is, with a trailing space) are not the same.
    You can  also just edit the name 'Mother Maiden Name' to 'Mother'
    As for photos staying in manual sort, I can only say that mine do. But as I've no idea what troubleshooting steps you've used.
    Regards
    TD

  • Just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    just bought a new iphone4 and was loading os6 and now it won't turn on. the apple glows like it is starting up, then the screen goes black and then repeats the same process over and over. i have tried to reboot multiple times now

    I am assuming the phone was working prior to you installing IOS 6? Did you use itunes to install IOS 6 or just run from the phone?
    When I tried to do the Over The Air update to IOS6 on my iPhone 4, it errored out and I had to connect it to iTunes and select "Restore" from the summary screen after iTunes finds the phone is connected. If this works for you, it will go through a couple of reboots that take a few minutes to complete. It should then give you the option to start with a fresh new phone or to use one of your previous backups to load your contacts and other information, provided you have backed up the phone previously.
    I hope this helps you my friend!

  • I have elements 8 and I want to be able to load the same picture in multiple times because

    Question - I have photoshop elements 8 and I want to be able to load the same picture in multiple times because I have 1200 pictures already pregrouped into 60 file categories and some pictures are duplicated thruout these files. How can I get elements 8 to load the duplicates  - it currently seems to default to only loading the picture one time and not allowing duplicates

    The apple lightning to 30 pin works just fine for me.
    Works with a fio amp and srs  iwow.

  • TS2755 keep receiving the same text message multiple times, at the same time of the night. How can I stop this?Thabnks

    Hi
    I keep on receiving the same text message multiple times and at around the same time each night. Any idea how I can stop this happening? The text messages are originating from to separate Saudi Arabian mobile numbers. Both these people are listed in my contacts so do you think if I delete their names it might stop the texts coming htrough each night?
    Cheers

    Deleting the people from your contacts will not stop the messages. Have you tried talking to the people and finding out if they're sending you messages? You could try contacting your carrier and finding out what blocking services they offer. However, theat would block all messages from those people.

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • My ipad2 is unable to find wireless network(s). while at home I am able to connect my MacBook and iPhone to network but am unable to connect iPad. I have restarted the device multiple times and even reset the network and all settings but still no luck

    my ipad2 is unable to find wireless network(s). while at home I am able to connect my MacBook and iPhone to network but am unable to connect iPad. I have restarted the device multiple times and even reset the network and all settings but still no luck

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • IPhone keeps sending the same text message multiple times in a row.

    My iphone (4s) keeps sending people the same text message multiple times (2-4) a few seconds inbetween.  Sometimes it will tell me that there the message failed, but they still recieve it multiple times.  I've already tried deleting the message tread and reset network settings.  Nobody who has an iphone has said anything to me about it yet, only people with android.  

    It's a carrier issue. I have AT&T and had this issue with my friend (who had an Android) and my mother (who had a feature phone). Both of them have Verizon for service and I'm thinking the issue was on Verizon's end. They both just dealt with it as we tried all sorts of things to get this sorted out (other than contacting Verizon directly) and had no luck.
    They've both switched to iPhones so it's a moot point for us now, at least.
    ~Lyssa

  • Internet pages state I need to update my web browser, but I have updated my software multiple times.  Any suggestions?

    I consistently receive notices on certain webpages (LA Times, NY Times) that I need to update my web browser to see the entire website.  However, I have updated my software multiple times recently as a result of the messages.  I have Mac OSX 10.6.8 currently.  Can someone provide any guidance? 

    Please note the version of your computer's OS X now installed and see if
    that version is (or not) able to run the latest browsers available now...
    http://helpx.adobe.com/flash-player.html
    The minimum requirements usually are posted along with the builder site
    in a link other than the download one.
    See if the Adobe Flash Player help pages can identify whatever Flash may
    be installed already; and before installing another, usually the older one
    has to be removed. Adobe has an uninstaller for that. See there are two
    links into Adobe Help for Flash player. The second one goes further to
    try & find an archived alternative to the latest Flash player, if needed.
    http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-mac.ht ml
    PS: was the notice to upgrade browser, a pop-up window over the web page you
    were looking at? Could be some adware, or other malware item is in your Mac.
    I do not see those kinds of prompts to upgrade anything in my Mac, and
    mine run an OS X older than your Snow Leopard 10.6.8. Visiting the same sites.
    Good luck & happy computing!
    edited 3x

  • Droid X - Receiving same Txt message multiple times, repeatedly

    After an upgrade back in September/October...  I started receiving the same text message multiple times.  It doesn't happen every time.  For example, my Husband responds with "OK" and I receive the same message 5 times over a period of 4-5 hours. 

    Welcome ...  SEARCH is your friend in this forum as most issues have already been reported.  I did a quick search on "Multiple" and this popped up:
    http://community.vzw.com/t5/DROID-X-by-Motorola/Receiving-multiple-duplicate-text-messages-since-latest-update/m-p/685893#M31790
    There may be others as well. 

Maybe you are looking for