Using JHeadstart to generate shuttles for updates

Hi guys,
Using JHeadstart 11.1.1.3 - is it possible to generate shuttle boxes for the simple task of updating records.
For example - in the leading list I want to see all employees with a status of 'ACTIVE'. In the trailing list I want to see all employees with a status of 'INACTIVE'. By shuttling employees between the two lists, the status of the employee should be updated accordingly. I know there are processShuttle class in JhsApplicationModuleImpl but this (and the App Def Editor) only really seem to cope with data where a parent-child relationship exists.
Is there any way to achieve this in JHeadstart (I recall years ago somehow using dummy parent VO's ?) - or am I best dropping back to ADF for this and then using templates to preserve the code
Cheers,
Brent

Hi Steven,
I have actually managed to get this working in JHeadstart - and with only a couple of lines of custom code needed - so I thought I would post the process I followed here in case anyone else is interested (and perhaps get some feedback from you on whether this method is ok to use, or indeed if it can be tweaked/improved on :)
So, for my testing I used the HR schema
1. Extended the EMPLOYEES table to add a new column EMPLOYEE_STATUS. Not null, set most to "INACTIVE", some to "RETIRED" and some to "ACTIVE"
2. Created Employee EO and Employees VO
3. Also created a new VO EmployeesToBeActivatedShuttle - based on Employee EO with a custom where clause of WHERE Employees.EMPLOYEE_STATUS in ('ACTIVE','INACTIVE') - as in my unselected list, I don't want to see employees with a status of "RETIRED"
4. Created a dummy parent VO EmployeeStatusActiveDummy - Read only VO with query "select 'ACTIVE' as emp_active_status from dual"
5. Created a view link between EmployeeStatusActiveDummy and Employees
6. In AppModule added EmployeeStatusActiveDummy and the child Employees VO (renamed ActiveEmployeesShuttle)
7. In JAG, created a group ActivateEmployees with Data Collection EmployeeStatusActiveDummy. Hide single attribute.
8. Created a dynamic domain for the unselected list using EmployeesToBeActivatedShuttle with EmployeeID as value and LastName as meaning
9. Created a child group ActiveEmployees using the Data Collection ActiveEmployeesShuttle. Set group to parent-shuttle, set the unselected list domain and relevant titles
As it stands, after generation this works perfect for showing just the INACTIVE employees in the leading shuttle and ACTIVE employees in the trailing shuttle. Also, moving employees from the INACTIVE to the ACTIVE shuttle also works as the existing processSelectedParentShuttleRow method in JhsApplicationModuleImpl simply updates the child attr (EmployeeStatus in this case) to the value of the parent attribute (hard coded as ACTIVE). What doesn't work out of the box is moving employees the other way (ie un-selecting them) as the standard processUnselectedParentShuttleRow method sets the child attr to null.
I simply overrode processShuttle in my AppModuleImpl, and depending on the value of the childVo ViewObject I replace the processUnselectedParentShuttleRow with a shuttle box specific one (processUnselectedEmpStatusActiveShuttleRow). In this I simply change the line setting the child attr from null to INACTIVE (in my real world case I am looking up another attribute on the row that holds the previous status and using this value to reset the current status).
And voila - JHeadstart generated shuttle updating the status of my records :)
Hopefully it will stand up to more testing !
Cheers,
Brent

Similar Messages

  • ERROR WHEN USING JHEADSTART TO GENERATE ADF BUSINESS COMPONENT FROM DESIGNE

    Use JDeveloper to generate a ADF Businness component using Jheadstart from
    Designer the following error is thrown
    oracle.jmig.source.ExtractorException: Caught SQL exception:ORA-01795: maximum number of expressions in a list is
    1000
    at oracle.jmig.source.designer.DesignerExtractor.extract(DesignerExtractor.java:136
    at oracle.jmig.MigrationRunnable.extract(MigrationRunnable.java:349)
    at oracle.jmig.MigrationRunnable.migrate(MigrationRunnable.java:183)
    at oracle.jmig.MigrationRunnable.run(MigrationRunnable.java:122)
    at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:551)
    at java.lang.Thread.run(Thread.java:595)

    Yes, this is a known issue. We will fix this for the next release.
    Having said that, the next release will contain the JHeadstart Forms2ADF generator which directly reads Oracle Forms .fmb files to ADF, without the need to use Oracle Designer, avoiding problems like this alltogether.
    Steven Davelaar,
    JHeadstart Team.

  • "ORA-01762: vopdrv: view query block not in FROM" while using LOG ERRORS INTO  feature for Update/Delete

    Hi
    Ours is VPD database in 11GR2. We're using "LOG ERRORS INTO " feature to track list of records violating constraints.
    For Inserts it is working as expected but for Updates/Deletes it is throwing mis. ORA- errors. "ORA-01762: vopdrv: view query block not in FROM"
    We dint find any clue when searched in net.
    Could someone help us here? Is there any limitation with "LOG ERRORS INTO" ?
    Below are the steps we're executing
    EXEC DBMS_ERRLOG.CREATE_ERROR_LOG(
    dml_table_name => 'EMP',
    err_log_table_name => 'ERR_EMP'
    > DESC EMP
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    INSERT INTO EMP VALUES('1','Test','@' /* generates Ora */,2,'2); -- ERR_EMP populated
    UPDATE EMP set SAL='@'
    where EMPNO='1' -- Throwing ORA-01762: vopdrv: view query block not in FROM
    Could someone help us?

    Hi
    Ours is VPD database in 11GR2. We're using "LOG ERRORS INTO " feature to track list of records violating constraints.
    For Inserts it is working as expected but for Updates/Deletes it is throwing mis. ORA- errors. "ORA-01762: vopdrv: view query block not in FROM"
    We dint find any clue when searched in net.
    Could someone help us here? Is there any limitation with "LOG ERRORS INTO" ?
    Below are the steps we're executing
    EXEC DBMS_ERRLOG.CREATE_ERROR_LOG(
    dml_table_name => 'EMP',
    err_log_table_name => 'ERR_EMP'
    > DESC EMP
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    INSERT INTO EMP VALUES('1','Test','@' /* generates Ora */,2,'2); -- ERR_EMP populated
    UPDATE EMP set SAL='@'
    where EMPNO='1' -- Throwing ORA-01762: vopdrv: view query block not in FROM
    Could someone help us?

  • Unecessary use of SELECT...FOR UPDATE causing Deadlock

    DB version:10gR2
    We are getting a deadlock issue frequently. When i looked at the trace file i found that the <em>Rolled back SQL</em> and the <em>Successfull SQL</em> are both <strong>SELECT FOR UPDATE</strong> statements. They both are declared before UPDATE statments.
    Both of these PL/SQL codes are developed by a C++ guy. When is it appropriate to use SELECT ..FOR UPDATE. I've seen SELECT ...FOR UPDATE very rarely in the codes developed by PL/SQL gurus in our firm. Why didn't they use SELECT..FOR UPDATE to lock rows before UPDATE/DELETE/INSERT in their codes?

    For update is a rowlevel locking. like
    Session 1
    SQL> conn scott/tiger
    Connected.
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL> select * from emp where empno = 7369 for update;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
    SQL>
    Session 2
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> update emp set sal = 1000 where empno = 7900
      2  /
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> update emp set sal = 1000 where empno = 7369
      2
    SQL> /In session 1 we have lock row where empno = 7369 & in session 2 we are updating salary where empno = 7900 it is updating successfully, but we are updating a empno = 7369 then session 2nd hangs for waiting for the next session.
    Also read the Link (http://www.oracle.com/technology/oramag/oracle/05-nov/o65asktom.html)

  • Generating Wizard layout for updating record

    Is there a way of using JHeadstart to generate a wizard to be used for updating records (and not for inserting) ?
    I want to be able to use a table-form layout, but have the update of the record via the form to be presented in a wizard layout.
    Cheers,
    Brent

    Brent,
    Yes, JHeadstart can also be used for generating a wizard to do updates. See the "Attention" at the end of section 5.8 in the JHeadstart 10.1.3.2 Developer's Guide (http://download.oracle.com/consulting/jhsdevguide1013.pdf).
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Processing SELECT FOR UPDATE queries

    Hello,
    Is there any occi sample code that uses "SELECT ... FOR UPDATE" and "WHERE CURRENT OF"?

    I think "where current of" is not supported in OCI as well.
    But, may be I can use the below steps for positioned updates using "select for ... updat" sqls
    1. Lock the rows by executing the "select for ...update " SQL.
    2. Get the result set
    3. Now, as iterating the result set, get the current row id using ResultSet.getRowid() or getRowPosition() (I am not sure which one to use. But, I think getRowPosition() is suitable as it explicitly returns the rowid of the current row position)
    4. Execute the update stmt "update tableName set ... where rowid=?"
    5. Iterate the Result set and update the row as in pt. 4
    6. commit the transaction (this unlocks the rows)
    Please let me know if this is correct...

  • Pros and  cons  of  select  for  update  clause

    hi,
    Can anybody explain what are the
    pros and cons of select for update clause
    11.2.0.1

    As commented, there are no pros versus cons in this case.
    What is important is to understand conceptually what this do and why it would be use.
    Conceptually, a select for update reads and locks row(s). It is known as pessimistic locking.
    Why would you want to do that? Well, you have a fat client (Delphi for example) and multiple users. When userA updates an invoice, you want that invoice row(s) locked and prevent others from making updates at the same time. Without locking, multiple users updating the same invoice will result in existing updated data being overwritten by old data that also has been updated. A situation called lost updates.
    For web based clients that are stateless, pessimistic locking does not work - as the clients do not have state and pessimistic locking requires state. Which means an alternative method to select for update needs to be used to prevent lost updates. This method is called optimistic locking.
    So it is not about pros versus cons. It is about understanding how the feature/technique/approach works and when to use it.. and when it is not suited to use it. All problems are not nails. All solutions are not the large hammer for driving in nails.

  • Q5 prompts for update 10.3 but still claims 10.2 is "latest version"

    So, I have a Q5, and it has been a bit of a hazzle from day one.
    I really looked forward to the update of the software to 10.3, because I hoped it would solve some of my issues with this phone. And I finally got the prompt today in the Hub, that "a new update is available".
    But when I tried to update the phone from the phone itself, it didn´t find any updates. I go to Softwareupdates in my System Settings menu, and click the "check for updates"-button. I get a message in return that claims I "have the latest version" and it says 10.2.1.
    I connect with Link, and click on Softwareupdates here.
    Same message. I still have the latest version, and it still says 10.2.1.
    Then I try (while still connected to Link) to use my browser to go to http://www.blackberry.com/update. Browser gives me the answer that "the page could not load due to too many redirections" (or something like that), indicating that the page loads in loops.
    I´ve checked my settings in the browser, it allows everything necessary for the page to load, and every other page loads perfectly. But not the udate-page on BB.
    I´ve also tried two other browsers, all with settings properly set. Get the same message.
    So; what do I do?? How do I update my Q5?

    I still haven´t found a solution to this problem. And my Q5 still won´t update its software.
    I´m stuck on 10.2.1, and it continues to insist that I´ve got "the lates software available".
    Why did the notification in my Hub about a new update, disappear? I can´t find it anywhere.
    Using Link to update doesn´t work either.
    And using BB´s own webpage for updates doesn´t work either. Same error message pops up that came last time I tried.
    Nothing works to get this update, and I´m pretty frustrated.

  • Change control process for updating the UPK topics

    Is anyone using a change control process for updating the UPK topics for JD Edwards EnterpriseOne?
    With publishing the whole module and everything linked, I am finding it difficult if a developer is updating a topic and maybe in the middle of it, but has it checked in to the server?
    I would like to hear what others may be doing to control this.
    Thank you,
    Linda Paar
    MOM Brands

    Hello,
    If you have not already joined the UPK community in My Oracle Support, I would recommend you ask your question in that forum as there is a lot of experience there. Additional information can be found in the announcement at the top of this forum: https://forums.oracle.com/forums/ann.jspa?annID=1175
    Best regards,
    Marc

  • Re: FM for updating the ADR6 table

    Hi,
    In ME21N, I add an email to the vendor PO.
    Can someone tell me where can I find the FM that updates this into table ADR6?
    Thanks
    Bye

    Hello,
    Please use the below function Module for updating ADR6.
      1. ADDR_SAVE_INTERN
    Reward points if helps.
    Thanks,
    Krishnakumar

  • Jdbc mysql "select ... for update" and isolation level...

    Dear, I am now writing an application, in which some worker threads will get a waiting job from database (mysql) and perform the processing.
    To avoid workers getting the same job id, I have studied the topics about locks, isolation level, and something like "select ... for update".
    The storage engine being used is innoDB. Actually the problem seems solved after using "select ... for update" to get the id, but I am just curious that do I also need to care about the isolation level. It is because when I do some experiments by setting the isolation level to serializable, but NOT using "SELECT ... FOR UPDATE" (just simple select), exception something like "deadlock found and try to restart transaction" occurs. Is there any relationship between these two things? Any comments are welcome!! Thanks!!!

    ashipj wrote:
    can u plz provide me with the code (connection string). Am new to Mysql.
    And also the driver u are using.
    Thank youDon't hijack other's topics. Kindly start your own. Don't do that before you read the [Sun JDBC tutorial|http://java.sun.com/docs/books/tutorial/jdbc/index.html] and the [MySQL JDBC documentation|http://dev.mysql.com/doc/refman/5.0/en/connector-j.html].

  • Trigger with SELECT-FOR-UPDATE

    There is a trigger on a table, which updates a particular column with SYSDATE BEFORE an INSERT OR UPDATE in the table.
    CREATE OR REPLACE TRIGGER my_schema.trg_Order
    BEFORE INSERT OR UPDATE
    ON my_schema.ORDER
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    :NEW.LAST_UPDATE_DATE := SYSDATE;
    END;
    If I update the record using PL/SQL with SELECT-FOR-UPDATE & then UPDATE, the column LAST_UPDATE_DATE is not updated with the SYSDATE.
    But if it is done by using the UPDATE Statement, then the column LAST_UPDATE_DATE is correctly updated with the SYSDATE.
    Why? How can I ensure that for SELECT-FOR-UPDATE & then UPDATE will also update the LAST_UPDATE_DATE with SYSDATE.

    The Table Order has a BLOB column.

  • Select or Select....for update nowait (data write concurrency issue)

    Hello everyone,
    I am working on a jsp/servlet project now, and got questions about which is the better way to deal with concurrent writing issues.
    The whole senario is described as following:
    First each user is viewing his own list of several records, and each record has a hyperlink through which user can modify it. After user clicks that link, there will be a popup window pre-populated with the values of that record, then user can do the modifications. After he is done, he can either click "Save " to save the change or "Cancel" to cancel it.
    Method1---This is the method I am using right now.
    I did not do any special synchronization measures, so if user 1 and user2 click the link of same record, they will modify the record
    at the same time, then whose updates will take effect depends on who submits the request later. If user1 submitted first, then user 2, user1
    will not see his updates. I know with this method, we will have the problem of "Lost Updates", but this is the simplest and efficient way to handle this issue.
    Method2--This is the method I am hesitating.
    I am considering to use "Select....for update nowait " to lock a record when user1 has selected one record and intended to modify it. If user2 wanted to modify the same record, he is not allowed. ( by catching the sql exception.)But the issue I am concerned about is because the "select .. For update" action and "Update action" are not so consecutive as many transaction examples described. There could be a
    big interval between " select " and "update" actions. You could not predict user's behavior, maybe after he open the popup window, it took him a while to make up his decision, or even worse, he was interrupted by other things and went away for the whole morning?.Then the lock is just held until he releases it.
    And another issue is if he clicks "cancel" to cancel his work, if I use method1, I don't need to interact with server-side at all, but if user method2, I still need to interact with the server to release the lock.
    Can someone give me some advice ? What do you do to deal with similar situation? If I did not make clear of the question, please let me know.
    Thanks in advance !
    Rachel

    Hi Rachel,
    Congratulation, you have found a way to overcome your programming business logic.
    Have you ever consider that the solution of using CachedRowset concept yet to be included in j2se 1.5 tiger next year too prove workable under the scenario , whereby you can disconnect from the database after you have execute your query and reconnect again if you have to do transactional activity later, so that the loading overhead as well as the data pooling activity could be well balanced off.
    Although rowset is still not an official API now, but its potential to me is worth consideration.
    I have written a simple but crude cut JSP programme posted on this forum under the heading "Interesting CachedRowset JSP code to share " to demonstrate the concept of CachedRowset and hoping that the Java guru or the developer could provide feedback on how to imporve on the programming logic or methodology.
    Thanks!!

  • ITunes 11 Check for Updates button not working

    Anyone else having a non-responsive "Check for Updates" and "Get More Apps" button (found in the apps pane)? Clicking either button yields no result, no dialogue bubble to acknowledge the input, not even an error message that it can't connect or that there's no updates available like in previous versions. As of this morning, the button is displaying that I have "3 Updates Available", but clicking on the button does not do anything, the same goes for the adjacent  "Get More Apps" button. I ran Disk First Aid's permissions etc. and rebooted, was able to get it to work for the first try, and then thereafter it has reverted back to non-responsiveness. I also resorted to re-installing the iTunes 11 via a fresh download, still the same bug. This versions suffers again from a lot of bugs (and missed opportunities) and I can't revert back to v10.7 because Mountain Lion simply won't let you. Le sigh.

    Running iTunes 11 on Mac OS 10.6.8. I manually sync my apps/songs/etc.
    I atttempted to updates apps using ITunes. The "Check for Updates" at bottom left was non-responsive. I tried:
    • Disconnecting the phone (2x), then reconnecting to iTunes
    • Relaunching iTunes (2x)
    • Reverting back to the previous version (ugh - don't try it)
    Googling the problem lead me to many MacRumors and Apple forum threads.
    Went to work, tried again tonight and success! The only thing I can attribute the sudden functionality of updating via iTunes is from REBOOTING my G5. BTW, I am using a wired mouse.
    Feeling a little silly that I didn't try that earlier.

  • Itunes "check for updates" feature not working?

    my friend has itunes 7.0 and when he clicks on "check for updates" inside the itune program it says:
    “This version of iTunes (7.0) is the current version.”
    I thought the new version of itunes is 7.0.1.8? If so, why isn't the "check for updates" feature downloading the newer version? Can apple please fix this problem because users shouldn't have to download the new update manually and alot of users don't know there is a newer version because they all use the "check for updates" feature.
    thanks

    Running iTunes 11 on Mac OS 10.6.8. I manually sync my apps/songs/etc.
    I atttempted to updates apps using ITunes. The "Check for Updates" at bottom left was non-responsive. I tried:
    • Disconnecting the phone (2x), then reconnecting to iTunes
    • Relaunching iTunes (2x)
    • Reverting back to the previous version (ugh - don't try it)
    Googling the problem lead me to many MacRumors and Apple forum threads.
    Went to work, tried again tonight and success! The only thing I can attribute the sudden functionality of updating via iTunes is from REBOOTING my G5. BTW, I am using a wired mouse.
    Feeling a little silly that I didn't try that earlier.

Maybe you are looking for

  • Can I send a message to multiple users at once?

    My company has an internal Jabber/XMPP server that we use to communicate as a group. Up until recently, I've been using a Jabber client called Psi (http://psi-im.org/) to connect to our Jabber server and do messaging. However, I recently decided to g

  • Bridge & Cache Errors - CS4

    I keep getting errors when I launch Bridge saying "Bridge encountered a problem and is unable to read the cache. Please try purging the central cache in Cache Preferences to correct the situation". I purge the cache but the message keeps coming back.

  • SAMPLE INIT.ORA FILE

    I NEED A SAMPLE INIT.ORA (PARAMETER) FILE SUITES FOR OLTP SYSTEM. BLOCK SIZE - 8K DATAFILES -600 TXN VOLUME - HIGH REGARDS INDIKA

  • Just don't get it

    I'm a noob overclocker but i'm confused over why my Neo2 board can go 250x10 no problem yet if i try to run 220x10 it reboots when under load, same voltages and same settings. Any idea ?

  • My ipad this slower than before as I fix this?

    Please help me