Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions

#)RefundCheckPost. Copyright © 2012 All rights reserved. GPL3 Open Source Software License.
  package com.tourapp.tour.acctrec.screen.refund;
  import java.util.*;
RefundCheckPost - Refund check posting.
 public class RefundCheckPost extends BaseArTrxPostScreen
Default constructor.
     public RefundCheckPost()

record The main record for this screen.
itsLocation The location of this component within the parent.
parentScreen The parent screen.
fieldConverter The field this screen field is linked to.
iDisplayFieldDesc Do I display the field desc?
properties Addition properties to pass to the screen.
     public RefundCheckPost(Record recordScreenLocation itsLocationBasePanel parentScreenConverter fieldConverterint iDisplayFieldDescMap<String,Objectproperties)
Initialize class fields.
     public void init(Record recordScreenLocation itsLocationBasePanel parentScreenConverter fieldConverterint iDisplayFieldDescMap<String,Objectproperties)
Get the screen display title.
     public String getTitle()
         return "Refund check posting";
Override this to open the main file.

You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)).

The new record.
     public Record openMainRecord()
         return new ArTrx(this);
Override this to open the other files in the query.
     public void openOtherRecords()
         new BankTrx(this);
         new BankAcct(this);
         new TrxStatus(this);
         new ArControl(this);
         new Booking(this);
Add the screen fields. Override this to create (and return) the screen record for this recordowner.

The screen record.
    public Record addScreenRecord()
        return new RefundScreenRecord(this);
Add all the screen listeners.
    public void addListeners()
        TrxStatus recTrxStatus = (TrxStatus)this.getRecord(.);
        this.getMainRecord().addListener(new SubFileFilter(recTrxStatus.getField(.), .nullnullnullnull));
Set up all the screen fields.
    public void setupSFields()
Process the command.
Step 1 - Process the command if possible and return true if processed.
Step 2 - If I can't process, pass to all children (with me as the source).
Step 3 - If children didn't process, pass to parent (with me as the source).
Note: Never pass to a parent or child that matches the source (to avoid an endless loop).

strCommand The command to process.
sourceSField The source screen field (to avoid echos).
iCommandOptions If this command creates a new screen, create in a new window?
true if success.
    public boolean doCommand(String strCommandScreenField sourceSFieldint iCommandOptions)
        if (strCommand.equalsIgnoreCase(.))
            return this.onPost();
            return super.doCommand(strCommandsourceSFieldiCommandOptions);
Post all the transactions in this batch.

true if successful.
    public boolean onPost()
        try   {
            TrxStatus recTrxStatus = (TrxStatus)this.getRecord(.);
            Object bookmark = recTrxStatus.getHandle(.);
            int iTrxPaidClassID = recTrxStatus.getTrxStatusID(...);
            Record recArTrx = this.getMainRecord();
            while (recArTrx.hasNext())
        } catch (DBException ex)    {
        return true;
New to GrepCode? Check out our FAQ X