Unable to refresh page when insert the first row in viewobject

I am using JDeveloper 10g to develop a JSP page, DataAction, AppModule and ViewObject. But when I am trying to use the following code to insert the first row, the page is not getting refresh. The quite weird thing is when I insert the second row, it returns me the first row as well as the second row. And it works well when I am trying to insert the third row, forth row....
//code in AppModule
ViewObject vo= this.getSampleView();
vo.insertRow(newRow);
vo.setNewRowState(Row.STATUS_INITIALIZED);
vo.setAttribute("STR1", str1);
vo.setAttribute("NUMBER1",new NUMBER(1));
vo.setAttribute("STR2", str2);
getTransaction().postChanges();
getTransaction().commit();
//Note: SampleView is a simply view created from a EnityObject mapping to a single table.
Anybody could help me? Thanks very much!

//The following code is the method in AppModule, which is invoked when clicks on the Add Remarks button on web page.
public void addRemarks(String strCustCode,String strRemarks,String strUserID)
ViewObject voRemarks1 = this.getCrmCustomerRemarksView();
ViewObject voRemarks2 = this.getCrmCustomerRemarksView();
NUMBER newSeq = new NUMBER();
try
voRemarks1.setWhereClause(" CRM_CUST_CODE ='" + strCustCode + "'");
voRemarks1.setOrderByClause(" CRM_SEQ_NO DESC");
voRemarks1.executeQuery();
if (voRemarks1.getEstimatedRowCount()<1)
newSeq = new NUMBER(1);
else
Row row = voRemarks1.first();
NUMBER seq = (NUMBER)row.getAttribute("CrmSeqNo");
newSeq = seq.add(new NUMBER(1));
SimpleDateFormat tmpLocalFormat = new SimpleDateFormat();
Date tmpDate = new Date();
tmpDate = Calendar.getInstance().getTime();
tmpLocalFormat.applyPattern("yyyy-MM-dd");
System.out.println("NGNCM003 add Remarks with " + strCustCode + "," strRemarks "," + strUserID);
Row newRow = voRemarks2.createRow();
voRemarks2.insertRow(newRow);
newRow.setNewRowState(Row.STATUS_INITIALIZED);
newRow.setAttribute("CrmCustCode", strCustCode);
newRow.setAttribute("CrmSeqNo",newSeq);
newRow.setAttribute("CrmCreatedBy", strUserID);
newRow.setAttribute("CrmRemarks", strRemarks);
newRow.setAttribute("CrmLastModifiedBy", strUserID);
newRow.setAttribute("CrmCreationTimestamp",tmpLocalFormat.format(tmpDate));
newRow.setAttribute("CrmLastModificationTime",tmpLocalFormat.format(tmpDate));
getTransaction().postChanges();
getTransaction().commit();
catch (Exception ex)
throw new RuntimeException("Invalid Sequence No.");
}

Similar Messages

  • How do you number pages but start the numbering on the second page, while omitting the page number from the first page (my title page)

    I have recently changed from Word to Pages 5.5. I want to create a document with a title page (no number) and the second page as Page 1. It is quite simple to do in Word, but I cannot find a way to do it in Pages.

    Hi Ryanlipp;
    Insert a section break
    Place cursor in the newly created section (page)
         In the Document panel:
    select Insert page number: 1.
    Under Numbering, select start at: 1
                     It starts numbering from number 1 in the new page (2nd page).
    Now place the cursor in the previous page (Ist page).
    Select Hide on first page section.
                     This hides page number in the first page of the document.
    I hope, this is what you are after.
    Regards,

  • Pop-up allows first pop-up page and the second pop-up page (linked from the first one) but does not open the data in the second pop-up page.

    I want to print my online bank statement.
    Please see screen shots below.
    The webpage has a link that says:
    VIEW STATEMENT
    Click the link and a pop-up opens that warns you about downloading using a public-access computer or sharing a computer with others.
    If you want to continue click OKAY.
    When you click this link another pop-up appears (a pop-up within a pop-up)
    but it is blank.
    When the process used to work, the statement would appear.
    MacBook running OS X 10.6.8
    When I tried it with Safari everything worked as it should so the problem is not with the bank.
    I went back to Firefox (my preferred browser) and did the troubleshooting RESET.
    Nothing changed.
    In the Tools menu - Page Info - Permission - Open Pop-up Windows is set @ Default - Allow
    In Preference - Content - Block pop-up windows is unchecked
    or when it is checked the website is listed in the Allowed column.
    It is the correct url because when I clicked the yellow options bar to Allow it, FireFox automatically chose it.
    I also tried adding the extended url as it appears on the web page which has the first pop-up link.
    Firefox would not accept it.

    Screenshots:
    # Part of bank's webpage with the link to the first pop-up
    # The first pop-up page with link to the statement pop-up page.
    # The second pop-up page - blank where there should be the statement. The page appears but the data doesn't.

  • Slow performance pages when accessing for first time

    Hi Oracle developers,
    Hope this is the right place to ask my question regarding Fusion Applications performance.
    I'm dealing with a hard issue in our Fusion Applications 11.1.7 'test' environment for educational purposes. The thing is that whenever a page is accessed the first time (after a restart) it takes a very long time for the page to appear on the screen.
    When it has been accessed before the page is rendered almost instantly. I suspect this has to with caching/compilation of the pages.
    I already looked at article (Doc ID 1518515.1) and the settings were already set as is described in the solution part of the note.
    My question:
    Is there a fix for this?
    Is there a way to precompile all Fusion Applications JSP pages after a restart.
    Hope you can help me out with this!
    Kind regards,
    Charif

    Hi Charif,
    we are looking into ways to speed this up, but at the moment there is nothing you can do to avoid this delay.  I know this sounds vague, but I cannot discuss future potential features here.
    Thanks,
    Oliver
    Fusion Applications Developer Relations
    @fadevrel
    http://blogs.oracle.com/fadevrel
    http://youtube.com/FADeveloperRelations

  • How come no matter what Stylistic Alternative I double click (salt, salt2, salt3 etc...), it only inserts the first alternative (salt)?

    Using Illustrator CS5 on Windows 7.
    Using an OTF with over 100 alternatives.
    My problem for instance: I can see at least 5 different alternatives for the lowercase "t".  Each one labeled as salt, salt2, salt3, etc...but no matter which one I double click, Illustrator will only insert the first one labeled "salt."  This is becoming super frustrating.
    Thanks in advance!

    randilonimous,
    The update page is here, 15.0.2:
    http://www.adobe.com/support/downloads/product.jsp?product=27&platform=Windows

  • How can i print all the tab pages not just the first page (tab)

    how can i print all the tab pages not just the first page (tab)

    You would need to do this programmatically. Here's one way:
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • "This page contains the following errors: error on line 1 at column 1: error on line 1 at column 1: Encoding error Below is a rendering of the page up to the first error"

    I am getting this error since purchasing my latest book:
    “This page contains the following errors: error on line 1 at column 1: error on line 1 at column 1: Encoding error
    Below is a rendering of the page up to the first error”
    This message also appears on some, but not all books I purchased earlier.
    I've tried to restart my iPhone (5) and downloaded iBooks (and the books itself) again several times but nothing has changed. I’m also synced the iPhone via iTunes without luck.
    It’s the latest version of iBooks from Appstore. The same books on iBooks for iPad and Mac working fine!
    iOS 7.0.6
    iBooks 3.2 (2083)

    Did you Reset your iphone?

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • When were the first Mac Mini's made with two video outputs?

    I'm thinking of getting a used Mac mini but it must have two video outputs, not mirrored.  When were the first ones made?  And what sort of processor did they have?

    One last question.  Will the 2009 Mac Mini support  1366 x 768 resolution?  My other resolution is 1920 x 1080 and I'm pretty sure it supports that, but what abot the 1366 x 768?

  • How do I get Pages to capitalize the first word of a sentence and the letter 'I?"

    How do I get Pages to capitalize the first word of a sentance and the letter "i" automacticly?

    I am also having this problem. Does anyone have an answer?
    I jus upgraded from Pages 4.3 and it's in Preferences. Not so in Pages 5.0.

  • How do I set Pages to capitalise the first word of a new paragraph

    Does anyone know how I set Pages to capitalise the first word of a new paragraph.

    Hi Peter
    That worked, thank you
    However, what I was wanting was to set Pages to start every new paragraph with a capital letter
    Any ideas?
    Thanks

  • Ibooks Error This page contains the following errors: error on line 1 at column 1: Document is empty error on line 1 at column 1: Encoding error Below is a rendering of the page up to the first error

    I am getting this error with my latest Ibook,
    This page contains the following errors:
    error on line 1 at column 1: Document is empty error on line 1 at column 1: Encoding error
    Below is a rendering of the page up to the first error
    Can anyone offer a fix?
    Thanks
    Paul

    I have the same problem. I've tried to restart my Ipad and downloaded the book again several times but nothing has changed. There aren't any reviews on the book with that problem and I've got the latest version of iBook so I don't know what else I can do to get the book which I've paid for. Does anyone have another idea what I could do? (maybe one of the above might help you, Paul)
    Thanks

  • Page Index in the first page of sapscript print out

    Hi
    Can anyone tell me how will I create an Index with section and page numbers in the first page of the sapscript about various sections that I will create dynamically in various page numbers during sapscript processing.
    Thanks and Regards
    Panda

    Hi,
    if you want something like this Page 1 of 10 use this.
    Page &page& of &sapscript-formpages&
    Regards
    Amit
    Reward all helpful replies.

  • Firefox won't open when prompted the first time. Says "Not Responding". I have to hit cntrl/alt/del then try starting again. Sometimes multiple times.

    Firefox won't open when prompted the first time. Says "Not Responding". I have to hit cntrl/alt/del then try starting again. Sometimes multiple times.

    Sounds like a "hang at exit" problem. There are several possible causes for that error. See:
    * How to stop the running Firefox process
    ** In Task Manager, does firefox.exe show in the '''<u>Processes</u>''' tab?
    ** See: http://kb.mozillazine.org/Kill_application
    * What may cause Firefox to hang at exit
    ** http://support.mozilla.com/en-US/kb/Firefox+hangs (see "Hang at exit" section)
    ** http://kb.mozillazine.org/Firefox_hangs
    ** https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding
    * You may need to try Firefox Safe Mode
    ** You may need to use '''Safe Mode''' to locate the problem: http://support.mozilla.com/en-US/kb/Safe+Mode
    **Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes '''<u>before</u>''' starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    ** If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling '''<u>one at a time</u>''' until the problem reappears. '''<u>You MUST close and restart Firefox after EACH change</u>''' via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    ** See the following for more information
    *** http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes
    *** http://support.mozilla.com/en-US/kb/Troubleshooting+plugins
    *** http://support.mozilla.com/en-US/kb/Basic+Troubleshooting

Maybe you are looking for

  • IPhone + Washing Machine = constant reboot??

    Hey Guys, As the title suggests, my iphone had a run in with the washing machine last week... it was in there for 10 or so minutes before i noticed and retrieved it... i dried it using the rice + blow dryer method for 4-5 days and then tried turning

  • Can I use same RAM in a 12" PB G4 as in a 15" PB G4?

    My PB4 died and I may be replacing it with a used 12" for occasional use. I would like to upgrade the RAM using the RAM from my PB 4 15". Is this possible? Second, are the batteries interchangeable between the 2 models? Thank you.

  • How to use the built-in camera and mic for commercial video conferencing

    I would like to use the camera and microphone to join a commercial video conference - not iChat. How do I do that?

  • Printing from my iPad2

    I have just set up a kodak 7.1 printer on our home wifi system, our Mac works fine but how do set up my iPad2 to print using the same wifi system, both the ipad @ printer are on the same system. Thanks for your help Judith

  • Unwanted tabs opening

    How do I stop Safari opening new unwanted add tabs