Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions

#)McoSubmitReport. Copyright © 2012 All rights reserved. GPL3 Open Source Software License.
  package com.tourapp.tour.acctrec.screen.mco;
  import java.util.*;
McoSubmitReport - MCO carrier submission report.
 public class McoSubmitReport extends ReportScreen
Default constructor.
     public McoSubmitReport()

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 McoSubmitReport(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 "MCO carrier submission report";
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 Mco(this);
Override this to open the other files in the query.
     public void openOtherRecords()
         new ArControl(this);
         new TrxStatus(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 McoScreenRecord(this);
Add all the screen listeners.
     public void addListeners()
        TrxStatus recTrxStatus = (TrxStatus)this.getRecord(.);
        this.getMainRecord().addListener(new SubFileFilter(recTrxStatus));
        this.getMainRecord().addListener(new SubCountHandler(this.getScreenRecord().getField(.), .falsetrue));
        this.getMainRecord().addListener(new McoSubmitCalcNetBeh(null));
        this.getMainRecord().addListener(new CompareFileFilter(.this.getScreenRecord().getField(.), "="nullfalse));
Add the toolbars that belong with this screen.

The new toolbar.
    public ToolScreen addToolbars()
        return new McoSubmitToolbar(nullthisnull.null);
Get the Heading for this report.
    public BaseScreen addReportHeading()
        return new McoSubmitHeading(nullnullthisnull.null);
Get the footing for this report.
    public BaseScreen addReportFooting()
        return new McoSubmitFooting(nullnullthisnull.null);
SetupSFields Method.
    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 (..equalsIgnoreCase(strCommand))
            return this.onMcoSubmit();
            return super.doCommand(strCommandsourceSFieldiCommandOptions);
Update the Mco Status to "Submitted".
    public boolean onMcoSubmit()
        try   {
            TrxStatus recTrxStatus = (TrxStatus)this.getRecord(.);
            Object bookmark = recTrxStatus.getHandle(.);
            int iTrxClassID = recTrxStatus.getTrxStatusID(...);
            double dToday = DateTimeField.todaysDate();
            Record recMco = this.getMainRecord();
            // Make sure the A/R trx's status is in sync
            if (this.getMainRecord().getListener(SyncArTrxStatusHandler.class.getName()) == null)
                this.getMainRecord().addListener(new SyncArTrxStatusHandler(null));
            while (recMco.hasNext())
        } catch (DBException ex)    {
            return false;
        return true;
New to GrepCode? Check out our FAQ X