Second row changes show that when I Browse. I want that changes to the show time.

Mr President

There is a problem that changes line second, display in the user interface only, when I navigate back or forward.

I want that changes should show both.

My code is

First line of Code

    public void addNewPurchaseVoucher(ActionEvent actionEvent) {
        // Add event code here...
        
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();        
               DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");        
               RowSetIterator rsi = dciter.getRowSetIterator();        
               Row lastRow = rsi.last();        
               int lastRowIndex = rsi.getRangeIndexOf(lastRow);        
               Row newRow = rsi.createRow();        
               newRow.setNewRowState(Row.STATUS_NEW);        
               rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);         
               rsi.setCurrentRow(newRow);
               
               BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();        
               DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");        
               RowSetIterator rsi1 = dciter1.getRowSetIterator();        
               Row lastRow1 = rsi1.last();        
               int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);        
               Row newRow1 = rsi1.createRow();        
               newRow1.setNewRowState(Row.STATUS_NEW);        
               rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);         
               rsi1.setCurrentRow(newRow1); 
    }
    

Code of the second row

    protected void doDML(int operation, TransactionEvent e) {       
        setAmount(getPurqty().multiply(getUnitpurprice()));
      
        if (operation == DML_INSERT) 
                   {                     
                    
                    
                       insertSecondRowInDatabase(getVid(),getLineitem(),getDebitst(),
                        (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); 
                       }
                      
                       if(operation == DML_UPDATE)
                       {
                           System.out.println("I am in Update with vid= " + getVid());   
                       updateSecondRowInDatabase(getVid(),getLineitem(),getDebitst(),
                         (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); 
                      
                         
                       }                      
               
       
        super.doDML(operation, e);
    }
    private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) 
              { 
                PreparedStatement stat = null; 
                try 
                { 
                  String sql = "Insert into vdet (VID,LINEITEM,DEBITST,AMOUNT) values " +
                      "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "')"; 
                  System.out.println("sql= " + sql);   
                  stat = getDBTransaction().createPreparedStatement(sql, 1); 
                  stat.executeUpdate(); 
                } 
                catch (Exception e) 
                { 
                  e.printStackTrace(); 
                } 
                finally 
                { 
                  try 
                  { 
                    stat.close(); 
                  } 
                  catch (Exception e) 
                  { 
                    e.printStackTrace(); 
                  } 
                } 
              } 
             
              private void updateSecondRowInDatabase(Object value1, Object value2,Object value3, Object value4) 
              { 
                PreparedStatement stat = null; 
                try 
                { 
                  String sql = "update vdet set DEBITST='"+ value3+"',AMOUNT='"+ value4+"' where VID='" + value1 + "'";  
                  System.out.println("sql= " + sql);     
                  stat = getDBTransaction().createPreparedStatement(sql, 1); 
                  stat.executeUpdate(); 
                } 
                catch (Exception e) 
                { 
                  e.printStackTrace(); 
                } 
                finally 
                { 
                  try 
                  { 
                    stat.close(); 
                  } 
                  catch (Exception e) 
                  { 
                    e.printStackTrace(); 
                  } 
                } 
              }


Concerning

The validation on the .jspx page button, try to rerun the query after the operation of posting as:

  public String commitAction()
  {
    OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
    operationBinding.execute();
    DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("ViewObject1Iterator");// write iterator name from pageDef.
    iter.getViewObject().executeQuery();
    return null;
  }

Tags: Java

Similar Questions

  • If I click on "PIN to the browser" the sensitive axis is unselected and vice versa. I need object "PIN at the top of the browser" and 'sensitive pine' work at the same time. Any suggestions?

    In the latest version of muse to adobe, I have me against "PIN at the top of the browser" and 'sensitive pine' work at the same time.

    Now if I choose an object and the axis 'browser', "sensitive pine" is unselected and vice versa.

    The need is for the header with the logo and menu bar to be pinned to the top of the browser, so that the page scrolls in the header bar.

    Now when I click on the sensitive left axis for the logo and the sensitive right pin for the navigation bar, the "pin at the top of the browser" gets deselected.

    Any suggestions or workarounds will be appreciated.

    Kind regards

    Vijay

    Hi all

    Thanks for that bring to our attention. We will consider adding this feature in the future.

    RyanDoyle - it's an interesting hack you have found! Unfortunately, I wouldn't count on that it works like this in the future, as a bug which is to operate. If you drag the screen to change the width of the browser as a Muse, you'll see that the behavior of the elements in the status button (a menu, for example) is different from when exported. However, if you make a small change to your hack, so it should always work: set button "width sensitive" State instead. In addition, I don't see why all parts must be in separate to this job state buttons, but I've only tried a simple example myself.

    An another workaround I used is to create another, more breakpoint. For example, if I have a menu that is pinned to the top left of the browser in the dots stop, then in a breakpoint, I would pin in the center top of the browser. Normally, I wouldn't add more breakpoints, but there is a way that I found to work around the problem. Ryan workaround is perhaps the best way to go if you take my advice and use a status button sensitive width instead of the width of the browser.

    Hope this helps,

    Anna

  • The time on the clock continues to change at the wrong time.

    The time on the clock continues to change at the wrong time.

    First of all, make sure that your clock is set to the correct time zone.

    Right click on the clock.

    Select adjust date and time.

    Then select change time zone.

    If your time zone is correct, you may have a bad CMOS battery but you can get around it by having the system more often with the internet time synchronization.

    1. Go to start
    2. Success and type task entry
    3. Click the arrow on the left next to the Task Scheduler Library
    4. Click the arrow next to Microsoft
    5. Click the arrow next to windows
    6. Click the folder to synchronize the time
    7. At the top right click on Synchronize
    8. Click on properties
    9. Go down and check run with highest privileges
    10. Click the triggers at the top tab
    11. Double-click the trigger that is listed in the box of
    12. On the top of the page task Begin at startup
    13. Uncheck delay task
    14. Check Repeat task (change in 5 minutes)
    15. On the right hand side change indefinitely the duration of
    16. Click OK twice

    Exit Task Scheduler

    Turning the computer off and see if it works

    By clicking on the White Star congratulations on the left is a way of saying thanks!

    I hope this helps!

    Nice day.

  • The clock in the taskbar has set both military, how can I get that back to the normal time display?

    Clock in the taskbar has set both military, how can I get that back to the normal time display?

    You make this kind of adjustments in the regional and Language Options applet.

    Click Start, settings, Control Panel, regional and Language Options.

    On the Regional Options tab, in the section Standards and formats, your language is selected.

    To the right of your selected language, click on the Customize button, the click the time tab.

    Change the Format of the time to your desires.

    Eastern Standard time: h:mm:ss:tt

    Military time would be: HH

    Click OK, OK to save the settings.

    You don't need to restart, but I would reboot in any case to ensure the changes 'stick '.

    Do, or do not. There is no test.

    I need YOUR voice and the points for helpful answers and propose responses. I'm saving for a pony!

  • If I cancel my monthly subscription and re register later, are my files that I created the first time still saved?

    If I cancel my monthly subscription and re register later, are my files that I created the first time still saved? Or did my account from scratch?

    Always save your files on your hard drive or server that you have access to. You control where files are saved. They will be there is you cancel your subscription, and they will be there when you register again.

  • I'm afraid to do the last update because in the past when I update, I always lose something. The last time it was my tabs "pinned". What is the solution?

    I'm afraid to install the last update, because in the past when I update, I always lose something. The last time it was my tabs "pinned". What is the solution?

    No, they are not the same. You really need to put more emphasis on messages displayed by editors / moderators / Admins who have extensive validation "under their belt.

  • How can I change password to get into my computer? I am now in my computer, but want to change for the next time I open it.

    How can I change password to get into my computer?  I am now in my computer, but want to change for the next time I open it.  Thank you.

    Click Start, click your account at the top right picture, click on 'change your password '. You must then enter the old password and a new.

  • Updates the window appear when shutting down, but do not set up the next time you start

    The display shows 15 updates of Windows are loaded (installed?) when the machine is stopped.  To restart Windows, the screen indicates "wait" while the updates are being configured.  The icon indicates that the configuration is current, but the screen always said that "0% are completed.  Then, after a few minutes, the screen indicates something as "installation failed; Revenant.  After the message 'return', the machine moves to the usual Windows 7 start page and asking to connect you as usual (which allows me to work on the machine).   So, the next time I shut down Windows, the screen indicates that the installation of several updates continues and is completed in series.  Then, the next time I turn on the machine it asks to wait while updates are configured;  and finally, it "fails to complete the configuration" and "resets" as described above.  What happened several times in the last two days.  What should I do to get this resolved failure?

    Hi BonnieDoon,

    1. did you of recent changes on the computer?

    2. you receive error message during the update by installing the process?

    Method 1

    See the Microsoft article below as well as try the steps mentioned and check if it works.

    The update is not installed successfully, you receive a message, and the computer restarts when you try to install an update in Windows Vista and Windows 7

    http://support.Microsoft.com/kb/949358

    Method 2

    Restart the computer after you follow the steps above and check if the problem persists, if the problem persists then checks the update is not being properly installed on the computer and then install it manually.

    View update history to know which update is not installing.

    (a) open Windows Update by clicking Start , all programsand then click Windows Update.

    (b) in the left pane, click view update history.

    (c) to view more information about an update, double-click it.

    Once you know the update's KB number then visit the Microsoft Download and put the number in the search box, download and install the update manually.

    http://www.Microsoft.com/downloads/en/default.aspx

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • 17 Firefox always opens the tabs that were open the last time that I closed it. I use NO history of restoration.

    This has started happening since I upgraded to v.17. I close Firefox with the red X or the button to exit the menu drop down. The next time I open, it displays some pages were open when I closed it.

    I've always had Firefox to use my Google account as my home page. He does not appear.

    It seems to me that in your quest to keep updated (how much this year...?) that you have lost a little something. It's very bad behaviour and I will stop just using FF altogether if it is not resolved quickly.

    Well, I drove back two versions to the right FF15 before 16 came out. It still works with the most recent NIS, and does not have the behavior, I complained to my original question.

    It might be that FF17 thought that it had crashed whenever I closed it. And it's true, no matter how I closed it.

    I lost all faith in Mozilla, R & D, but at least they still host their previous versions if/when the current does not work.

  • Does anyone know of a VI or how to write one that will stop the computers time be disabled if an application is run.

    Does anyone know of a VI or how to write one that will stop the computers clock be turned off if an application is run. The time and date can be reset normally while an application is running by clicking on the time in the lower right of the screen of the computer. I have an application that runs over several days and it is essential that the time and date of the computer not be changed. Is there an easy way of this lockout the user? Note that I am what I consider a beginner advanced in LV

    Thank you

    Chuck

    This isn't something that you can from LabVIEW, because this is an operating system operation, and it will depend on the operating system you are using. Under Windows, you can use Group Policy to control this. Please Google on "prevent changing the date and time of windows."

    Also, please try to refrain from stuffing your message in its entirety in the block of material. Keep short, but descriptive enough topic so we can understand what you're asking basically. Thank you.

  • When I try to connect to this URL, the connection times out

    I have always problems, and what was recommended only it solves so here it is again. I can go to this site ==> http://www.themonastery.org. I can in fact without any problems. In this program, The Unvcersal Life of the monastery church, is a link called network of ULC ministers who, when I click on it, should be to bring me here. ===> http://ministers.themonastery.org.<== when="" i="" attempt="" to="" try="" and="" logon="" to="" this="" url,="" the="" connection="" times="" out,="" without="" connecting.="" i="" went="" to="" my="" local="" library,="" and="" logged="" on="" to="" the="" universal="" life="" church="" monastery,="" and="" ulc="" ministers="" network="" with="" the="" greatest="" of="" ease.="" i="" did="" as="" suggested,="" and="" went="" to="" "internet="" options"="" and="" did="" exactly="" what="" i="" was="" told,="" hoping="" to="" fix="" the="" problem,="" but="" unfortunately,="" i="" still="" have="" the="" problem.="" does="" anyone="" think="" my="" reinstalling="" my="" windows="" 7="" would="" make="" my="" problem="" go="" away?="" help!="" does="" anyone="" have="" an="" answer="" to="" my="">

    I hope that you are using Internet Explorer 11, this advice applies to that.

    You need to reset IE.  Launch IE

    1. Tools
    2. Internet Options
    3. Advanced
    4. Reset
    5. Check the other box
    6. Wait
    7. Close IE
    8. Open IE
  • Several scripts that run at the same time?

    Is it possible to have multiple scripts running successfully at the same time?

    For now if I start a second script while one is still ongoing, the other to be completed successfully, but one stops. This seems to be because one is so more the active document, once the other opens so cannot continue.

    Is there another way to anything like that script so that multiples can operate independently at the same time? You might wonder why I don't want to run both at the same time and not just wait, but I install an asp.net web do front end and have problems if two people, click on the button around the same time.

    I'm guessing this won't be possible and I'll have to look for ways to achieve this in asp.net instead and sort queued requests so you will have to wait longer if the script is already running?

    Thank you

    Andy

    I'm guessing this won't be possible and I'll have to look for ways to achieve this in asp.net instead and sort queued requests so you will have to wait longer if the script is already running?

    It is correct. PS script interface is single-threaded, so you'll need requests queued.

  • Recently changed the screen resolution. Said Yes when asked if I wanted larger icons on the new resolution. You want to return to the original settings.

    Sytem restore tells me that no changes.  Which is bullshit as when I went back to smaller resolution icons have been spaced more far and the gray area at the top of the screen did not return to small.  This means that I have to use the first symbol to minimize, and then right-click to get on the net.  The square and the cross are off the screen.

    Hello Elenoe,

    Thank you for visiting the Microsoft answers community.

    Not positive I understand exactly what you are trying to accomplish, however for the two questions you have with the larger icons and minimizing Internet Explorer I'll give you some steps to resolve.

    Large icons

    -Right-click Law Office > click Properties > click on settings tab > click on advanced > click on the general tab (if we by default)
    -Under view > compensates for the ppp settings.

    Internet Explorer minimizing

    From your description, it sounds like your Internet Explorer is beyond the edge of the screen.

    -Right click on the icon to the taskbar for Internet Explorer > click enlarge

    Maximize your screen to the right size?

    If the minimal State, you can't get the edges in order to size the window try:
      
    -Right click on the icon to the taskbar for Internet Explorer > click size > press your up, down, left, or right arrow key to select which edge you need to move.

    For example, if you move the right edge: press your right arrow button > by using the left and right arrow keys move the right edge of the window, and when finished press on enter

    Hope this helps

    Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • problem of storage vmotion - requested storage vmotion would change at the same time

    Shalom everyone!

    How are you? hope, do

    I have the following configuration:

    LIC: 1 vCenter Server 4 Standard 2. company vSpehere 4 Plus 1-12 cores per processor * 8CPUs

    ESXi 4; 1 vCenter Server

    When I try to migrate virtual machines to a store of data to another it gives an error. But if I migrate a virtual computer (from storage to another) it looks ok:

    < the requested storage vmotion would simultaneously change storage location of the virtual machine and the host of execution; However, this is not supported on the host Source "production-host1" >

    < the requested storage vmotion would simultaneously change storage location of the virtual machine and the host of execution; However, this is not supported on the host Destonation "production-host2" >

    Thank you very much in tips!

    This image shows the vm on several hosts of source.

    -KjB

  • Error 150:30 when you try to use an application for the first time after installation

    I have CS 5.5, but need to temporarily install the suite CS4, but when I try to use it after installing a pop-up windows is displayed with the message "Error 150:30" and ask me to restart my computer before using it. I'm sure that there is only one computer using my serial number, but when I try to proof on a second computer it tells me that the serial number is enabled in both computers already.

    Hello

    Error 150:30 refers to licensing. You must contact customer service and verify the number of activation of your software. If it's good, then you can follow these steps as appropriate for your operating system:

    http://kb2.adobe.com/cps/512/cpsid_51260.html for MAC OS

    http://kb2.adobe.com/cps/405/kb405970.html for OS WIN

    I hope this helps.

Maybe you are looking for