CPD Results

The following document contains the results of PMD's CPD 5.3.5.

Duplications

File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFUtilityView.java 258
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFView.java 266
                    text.append(addendum.getAddendumText());


                    if (text.length() > 0) {

                        setLeftStarting(getLeftPageMargin());
                        setRightStarting(getLeftPageMargin());
                        addContent("", text.toString(), theStyle);
                        addContent(" \n", " \n");
                        text = new StringBuffer();


                    }
                }
            }
        }

    }

    /** TODO: DOCUMENT ME! */
    public void addAttendanceNotes() {
        String notes = getNotNullString(getAgendaView().getAgendaHeader()
                .getMeetingAttendanceNotes(), ""
                );

        if (!notes.equals("")) {
            addContent(" \n", " \n");
            addBoldLabelPlainText("Attendance Notes", notes);
        }

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  agendaHeaderOid   TODO: DOCUMENT ME!
     * @param  label             TODO: DOCUMENT ME!
     * @param  businessAttached  TODO: DOCUMENT ME!
     * @param  businessType      TODO: DOCUMENT ME!
     */
    public void addBusinessAttached(long agendaHeaderOid, String label, Vector businessAttached,
        String businessType
        ) {
        int size = businessAttached.size();

        if (size > 0) {
            addContent(" ", " ", theStyle);
            addSectionTitle(label);
            setDataSheetFeature();

            // setHeight(getHeight()-getPDFPage().getStyle().getFontLeading());
            float xyPosition[] = new float[] {};

            int tableSize = 4;

            Vector vLabel = new Vector(tableSize);
            vLabel.add(0, "Protocol Number");
            vLabel.add(1, "Event");
            vLabel.add(2, "PI");
            vLabel.add(3, "Title/Keyword");

            xyPosition = new float[] { unitXy * 15, unitXy * 10, unitXy * 20, unitXy * 55 };

            IrbAgendaEvent currentRow = null;
            Vector vContent = new Vector(tableSize);
            String strEUIRB = "";

            for (int i = 0; i < size; i++) {

                addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                currentRow = (IrbAgendaEvent) businessAttached.elementAt(i);

                IrbProtocolHeader protHeader = null;
                String protocolNumber = "";
                String eventName = currentRow.getEventName();
                long eventOid = currentRow.getEventOid();
                String title = "";

                if (eventName.startsWith("Protocol") || eventName.startsWith("Modification") ||
                        eventName.startsWith("Renewal")
                ) {
                    eventName = "ProtocolHeader";
                    protHeader = ServiceLocator.getIrbProtocolHeaderService().findById(eventOid);
                    protocolNumber = protHeader.getProtocolNumber();
                    title = protHeader.getTitle();
                } else { // adverseEvent, closure, expendedAccess, unanticipate

                    IrbTraceableBusinessObject object = ServiceLocator.getIrbProtocolService()
                        .getParentObject(eventName, eventOid + "", getRascalUser());

                    if (object != null) {
                        protocolNumber = object.getProtocolNumber();
                        protHeader = ServiceLocator.getIrbProtocolService()
                            .getLastApprovedProtocolHeader(object.getIrbProtocol());
                        if (protHeader == null)
                        	protHeader = ServiceLocator.getIrbProtocolService()
                            .getLastExpiredProtocolHeader(object.getIrbProtocol());
                    }

                    if (eventName.equals("AdverseEvent")) {
                        title = "";

                        Long keyWord = ((IrbAdverseEvent) object).getKeywordCode();

                        if (keyWord != null)
                            title = ServiceLocator.getRascalAdverseEventService().findById(keyWord)
                                .getDescription();

                    } else if (eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                        title = "";

                        Long keyWord = ((IrbUnanticipatedProblem) object).getKeywordCode();

                        if (keyWord != null)
                            title = ServiceLocator.getRascalAdverseEventService().findById(keyWord)
                                .getDescription();
                    } else
                        title = protHeader.getTitle();
                }

                strEUIRB = "IRB-" + protocolNumber;

                vContent.add(0, strEUIRB);                                                 // protocolNumber
                vContent.add(1, getNotNullString(currentRow.getEventName(), "")); // event
                vContent.add(2,
                    getNotNullString(
                            ServiceLocator.getRascalUserService().findById(
                                    protHeader.getPI().getRid()
                                    ).getUserFirstLastNameUni(), ""
                        )
                    );                                                                     // pi
                vContent.add(3, getNotNullString(title, ""));                              // title


                addVectorContent(vContent, xyPosition, theStyle);
                vContent.removeAllElements();
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());

                IrbMeetingAttributes attribute = currentRow.getIrbMeetingAttributes();
                addBoldLabelPlainText("Recommendation",
                    getNotNullString(
                        ((attribute == null) ? "" : attribute.getRecommendationText()), ""
                        ), theStyle
                    );
                addBoldLabelPlainText("Follow Up",
                    getNotNullString(((attribute == null) ? "" : attribute.getFollowUp()),
                        ""
                        ), theStyle
                    );

                if (i != (size - 1)) {
                    addContent(getSpaceWithSpots(0, spotsNumber), "");
                }
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  label            TODO: DOCUMENT ME!
     * @param  exEventAttached  TODO: DOCUMENT ME!
     * @param  eventName        TODO: DOCUMENT ME!
     */
    public void addExEventAttached(String label, Vector exEventAttached, String eventName) {

        if (eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED) || eventName.equals(PENDING)) {
            int size = exEventAttached.size();

            if (size > 0) {


                addContent(" \n", " \n", theStyle);
                addSectionTitle(label);
                setDataSheetFeature();

                int tableSize = 4;

                Vector vLabel = new Vector(tableSize);
                vLabel.add(0, "Protocol Number");
                vLabel.add(1, "PI");
                vLabel.add(2, "Title");
                vLabel.add(3, "Reviewer");
                vLabel.add(4, "IRB Approval Date");
                vLabel.add(5, "Expiration Date");
                vLabel.add(6, "Board Notification Date");


                float xyPosition[] = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 25, unitXy * 10, unitXy * 10, unitXy * 10,
                    unitXy * 20
                };
                Vector currentRow = null;
                Vector vContent = new Vector(tableSize);

                for (int i = 0; i < size; i++) {

                    addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);

                    currentRow = (Vector) exEventAttached.elementAt(i);
                    vContent.add(0, getNotNullString("IRB-" + currentRow.elementAt(2), "")); // protocolnumber
                    vContent.add(1, getNotNullString((String) currentRow.elementAt(4), ""));          // PI
                    vContent.add(2, getNotNullString((String) currentRow.elementAt(5), ""));          // title
                    vContent.add(3, getNotNullString((String) currentRow.elementAt(6), ""));          // approver

                    Object dateObj = currentRow.elementAt(8);

                    if (dateObj instanceof java.sql.Date) {
                        vContent.add(4,
                            getNotNullString(CalendarTransformer.formatMMDDYYYY((Date) dateObj), "")
                            );
                    } else {
                        vContent.add(4, getNotNullString("", ""));
                    }

                    dateObj = currentRow.elementAt(9);

                    if (dateObj instanceof java.sql.Date) {
                        vContent.add(5,
                            getNotNullString(CalendarTransformer.formatMMDDYYYY((Date) dateObj), "")
                            );
                    } else {
                        vContent.add(5, getNotNullString("", ""));
                    }

                    dateObj = currentRow.elementAt(10);

                    if (dateObj instanceof java.sql.Date) {
                        vContent.add(6,
                            getNotNullString(CalendarTransformer.formatMMDDYYYY((Date) dateObj), "")
                            );
                    } else {
                        vContent.add(6, getNotNullString("", ""));
                    }

                    addVectorContent(vContent, xyPosition, theStyle);
                    vContent.removeAllElements();
                    setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                    addBoldLabelPlainText("Follow Up",
                        getNotNullString((String) currentRow.elementAt(7), ""), theStyle
                        );

                    if (i != (size - 1)) {
                        addContent(getSpaceWithSpots(0, spotsNumber), "");
                    }
                }
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  meetingAttendants  TODO: DOCUMENT ME!
     */
    public void addMeetingAttendants(Vector meetingAttendants) {

        if (meetingAttendants.size() > 0) {
            setLeftStarting(getDefaultLeftStarting());
            setRightStarting(getDefaultLeftStarting() + 10);
            addContent(" \n", " \n", theStyle);

            IrbMeetingAttendant attendant = null;
            theStyle.setFont(fontTimesB, fontSize12);
            theStyle.setTextUnderline(true);
            addContent("Attendant", "Meeting Role", theStyle);

            theStyle.setFont(fontTimes, fontSize12);
            theStyle.setTextUnderline(false);

            for (int i = 0; i < meetingAttendants.size(); i++) {
                attendant = (IrbMeetingAttendant) meetingAttendants.elementAt(i);
                addContent(ServiceLocator.getRascalUserService().findById(attendant.getRid())
                    .getUserFirstLastNameUni(), attendant.getMeetingRole(), theStyle
                    );
            }
        }
    }

    /** TODO: DOCUMENT ME! */
    public void addMeetingNotes() {

        IrbAgendaHeader agendaHeader = getAgendaView().getAgendaHeader();
        String notes = "";

        if (agendaHeader != null) {
            notes = getNotNullString(agendaHeader.getMeetingNotes(), "");

            if (!notes.equals("")) {
                addContent(" \n", " \n");
                addBoldLabelPlainText("Meeting Notes", notes, theStyle);
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  label               TODO: DOCUMENT ME!
     * @param  nrProtocolAttached  TODO: DOCUMENT ME!
     * @param  eventName           TODO: DOCUMENT ME!
     */
    public void addNRAttached(String label, Vector nrProtocolAttached, String eventName) {
        int size = nrProtocolAttached.size();

        if (size > 0) {

            addContent(" \n", " \n", theStyle);
            addSectionTitle(IrbNameConstants.NON_RASCAL + " " + label);
            setDataSheetFeature();

            Vector vLabel = new Vector(3);
            String firstLabel = "Title";

            if (eventName.equals("AdverseEvent") || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                firstLabel = "Keyword";
            }

            vLabel.add(0, firstLabel);
            vLabel.add(1, "Paper Protocol Number");

            if (!eventName.endsWith(IrbNameConstants.EXEMPT) && !eventName.endsWith(IrbNameConstants.EXPEDITED) &&
                    !eventName.endsWith(PENDING)
            ) {
                vLabel.add(2, "Recommendation");
                vLabel.add(3, "Recommended Status");
            }

            Vector currentRow = null;
            Vector vContent = new Vector(3);

            float xyPosition[] = new float[] { unitXy * 20, unitXy * 15, unitXy * 50, unitXy * 15 };

            for (int i = 0; i < size; i++) {

                addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);

                currentRow = (Vector) nrProtocolAttached.elementAt(i);
                vContent.add(0, getNotNullString((String) currentRow.elementAt(0), "")); // title
                vContent.add(1, getNotNullString((String) currentRow.elementAt(4), "")); // paperProtocolNumber

                if (!eventName.endsWith(IrbNameConstants.EXEMPT) && !eventName.endsWith(IrbNameConstants.EXPEDITED) &&
                        !eventName.endsWith(PENDING)
                ) {
                    vContent.add(2, getNotNullString((String) currentRow.elementAt(1), "")); // recommendation
                    vContent.add(3, getNotNullString((String) currentRow.elementAt(2), "")); // recommendation status
                }

                addVectorContent(vContent, xyPosition, theStyle);
                vContent.removeAllElements();
                addBoldLabelPlainText("Follow Up",
                    getNotNullString((String) currentRow.elementAt(3), ""), theStyle
                    );

                if (i != (size - 1)) {
                    addContent(getSpaceWithSpots(0, spotsNumber), "");
                }
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  label               TODO: DOCUMENT ME!
     * @param  otherEventAttached  TODO: DOCUMENT ME!
     * @param  eventName           TODO: DOCUMENT ME!
     */
    public void addOtherEventAttached(String label, Vector otherEventAttached, String eventName) {

        if (eventName.equalsIgnoreCase("other")) {
            int size = otherEventAttached.size();

            if (size > 0) {

                addContent(" \n", " \n", theStyle);
                addSectionTitle(label);
                setDataSheetFeature();

                int tableSize = 3;

                Vector currentRow = null;

                for (int i = 0; i < size; i++) {

                    currentRow = (Vector) otherEventAttached.elementAt(i);
                    addBoldLabelPlainText("Topic",
                        getNotNullString((String) currentRow.elementAt(2), "")
                        );
                    addBoldLabelPlainText("Recommendation",
                        getNotNullString((String) currentRow.elementAt(6), "")
                        );
                    addBoldLabelPlainText("Follow Up",
                        getNotNullString((String) currentRow.elementAt(8), "")
                        );

                    if (i != (size - 1)) {
                        addContent(getSpaceWithSpots(0, spotsNumber), "");
                    }
                }
            }
        }
    }

    /**
     * Insert the method's description here. Creation date: (11/18/2002 12:23:46 PM)
     *
     * @param  saving  TODO: DOCUMENT ME!
     */
    @Override public void addPageFooter(boolean saving) {

        if (getPDFObject() != null) {
            int totalPageNum = getPDFObject().getNumberOfPages();

            for (int i = 0; i < totalPageNum; i++) {
                PDFStyle style = new PDFStyle();
                style.setLineColor(java.awt.Color.gray);
                style.setFillColor(java.awt.Color.black);
                style.setFont(fontCourier, 8);
                getPDFObject().getPage(i).setStyle(style);

                if (saving)
                    getPDFObject().getPage(i).drawText("Saved On: " +
                        edu.columbia.rascal.common.CalendarTransformer.toDateTimeString(
                            getDocTimeStamp()
                            ) + "     " + "page " + (i + 1) + " of " + totalPageNum,
                        getLeftPageMargin(), 10
                        );
                else
                    getPDFObject().getPage(i).drawText("Printed On: " +
                        edu.columbia.rascal.common.CalendarTransformer.toDateTimeString(
                            getDocTimeStamp()
                            ) + "     " + "page " + (i + 1) + " of " + totalPageNum,
                        getLeftPageMargin(), 10
                        );
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  label             TODO: DOCUMENT ME!
     * @param  protocolAttached  TODO: DOCUMENT ME!
     * @param  eventName         TODO: DOCUMENT ME!
     */
    public void addProtocolAttached(String label, Vector protocolAttached, String eventName) {
        int size = protocolAttached.size();

        if (size > 0) {
            addContent(" ", " ", theStyle);
            addSectionTitle(label);
            setDataSheetFeature();

            // setHeight(getHeight()-getPDFPage().getStyle().getFontLeading());
            String firstLabel = "Protocol Number";
            String thirdLabel = "Title";
            float xyPosition[] = new float[] {};

            if (eventName.equals(IrbNameConstants.ADVERSE_EVENT) || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                thirdLabel = "Keyword";
            }

            int tableSize = 4;

            if (getAgendaView().isProtocol(eventName)) {
                tableSize = 6;
            }

            Vector vLabel = new Vector(tableSize);
            vLabel.add(0, firstLabel);
            vLabel.add(1, "PI");
            vLabel.add(2, thirdLabel);
            vLabel.add(3, "Primary Reviewer");
            vLabel.add(4, "Recommended Status");

            if (getAgendaView().isProtocol(eventName)) {
                xyPosition = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 17, unitXy * 13, unitXy * 15, unitXy * 10,
                    unitXy * 10
                };
                vLabel.add(5, "IRB Approval Date");
                vLabel.add(6, "Expiration Date");
            } else {
                xyPosition = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 17, unitXy * 13, unitXy * 45
                };
            }

            Vector currentRow = null;
            Vector vContent = new Vector(tableSize);
            String strEUIRB = "";


            for (int i = 0; i < size; i++) {

                addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                currentRow = (Vector) protocolAttached.elementAt(i);

                strEUIRB = getNotNullString((String) currentRow.elementAt(2), "");

                strEUIRB = "IRB-" + strEUIRB;

                vContent.add(0, strEUIRB);
                vContent.add(1, getNotNullString((String) currentRow.elementAt(4), "")); // pi
                vContent.add(2, getNotNullString((String) currentRow.elementAt(5), "")); // title

                // reviewer
                StringBuilder revString = new StringBuilder("");

                if (getAgendaView().getEventObject((String) currentRow.elementAt(0), eventName) !=
                        null
                ) {
                    Vector reviewers = IrbAgendaProtocolQuery.getPreMinuteApprovalEventReviewersFor(
                            getAgendaView().getEventObject((String) currentRow.elementAt(0),
                                eventName
                                )
                            );

                    for (int j = 0; j < reviewers.size(); j++) {

                        if (j > 0) {
                            revString.append(", ");
                        }

                        revString.append(ServiceLocator.getRascalUserService().findById(
                                (Integer) reviewers.elementAt(j)
                                ).getUserFirstLastNameUni()
                            );

                    }
                }

                vContent.add(3, revString.toString());

                // status
                vContent.add(4, getNotNullString((String) currentRow.elementAt(7), ""));

                // the two dates only shown in protocol, midification, renewal, etc.
                if (getAgendaView().isProtocol(eventName)) { // effective date

                    IrbProtocolHeader header = ServiceLocator.getIrbProtocolHeaderService()
                        .getProtocolHeaderByOid((String) currentRow.firstElement(),
                            getAgendaView().getRascalUser()
                            );
                    Date cal = null;

                    // String effectiveDate ="";
                    String approvalDate = "";
                    String expirationDate = "";

                    if (header != null) { // cal = header.getEffectiveDate();
                                          // effectiveDate = CalendarTransformer.toString(cal);

                        cal = header.getIrbApprovalDate();
                        approvalDate = CalendarTransformer.formatMMDDYYYY(cal);

                        cal = header.getExpirationDate();
                        expirationDate = CalendarTransformer.formatMMDDYYYY(cal);
                    }

                    // vContent.add(5, effectiveDate);
                    vContent.add(5, approvalDate);

                    // expriation date
                    vContent.add(6, expirationDate);
                }

                addVectorContent(vContent, xyPosition, theStyle);
                vContent.removeAllElements();
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                addBoldLabelPlainText("Recommendation",
                    getNotNullString((String) currentRow.elementAt(6), ""), theStyle
                    );
                addBoldLabelPlainText("Follow Up",
                    getNotNullString((String) currentRow.elementAt(8), ""), theStyle
                    );

                if (i != (size - 1)) {
                    addContent(getSpaceWithSpots(0, spotsNumber), "");
                }
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  agendaHeaderOid   TODO: DOCUMENT ME!
     * @param  label             TODO: DOCUMENT ME!
     * @param  protocolAttached  TODO: DOCUMENT ME!
     * @param  eventName         TODO: DOCUMENT ME!
     */
    public void addProtocolAttached(long agendaHeaderOid, String label, Vector protocolAttached,
        String eventName
        ) {
        int size = protocolAttached.size();

        if (size > 0) {
            addContent(" ", " ", theStyle);
            addSectionTitle(label);
            setDataSheetFeature();

            // setHeight(getHeight()-getPDFPage().getStyle().getFontLeading());
            String firstLabel = "Protocol Number";
            String thirdLabel = "Title";
            float xyPosition[] = new float[] {};

            if (eventName.equals(IrbNameConstants.ADVERSE_EVENT) || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                thirdLabel = "Keyword";
            }

            int tableSize = 4;

            if (getAgendaView().isProtocol(eventName)) {
                tableSize = 6;
            }

            Vector vLabel = new Vector(tableSize);
            vLabel.add(0, firstLabel);
            vLabel.add(1, "PI");
            vLabel.add(2, thirdLabel);
            vLabel.add(3, "Primary Reviewer");
            vLabel.add(4, "Recommended Status");

            if (getAgendaView().isProtocol(eventName)) {
                xyPosition = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 17, unitXy * 13, unitXy * 15, unitXy * 10,
                    unitXy * 10
                };
                vLabel.add(5, "IRB Approval Date");
                vLabel.add(6, "Expiration Date");
            } else {
                xyPosition = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 17, unitXy * 13, unitXy * 45
                };
            }

            Vector currentRow = null;
            Vector vContent = new Vector(tableSize);
            String strEUIRB = "";


            for (int i = 0; i < size; i++) {

                addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                currentRow = (Vector) protocolAttached.elementAt(i);

                strEUIRB = getNotNullString((String) currentRow.elementAt(2), "");

                strEUIRB = "IRB-" + strEUIRB;

                vContent.add(0, strEUIRB);
                vContent.add(1, getNotNullString((String) currentRow.elementAt(4), "")); // pi
                vContent.add(2, getNotNullString((String) currentRow.elementAt(5), "")); // title

                // reviewer
                StringBuilder revString = new StringBuilder("");

                if (getAgendaView().getEventObject((String) currentRow.elementAt(0), eventName) !=
                        null
                ) {
                    Vector reviewers = IrbAgendaProtocolQuery.getPreMinuteApprovalEventReviewersFor(
                            agendaHeaderOid,
                            getAgendaView().getEventObject((String) currentRow.elementAt(0),
                                eventName
                                )
                            );

                    for (int j = 0; j < reviewers.size(); j++) {

                        if (j > 0) {
                            revString.append(", ");
                        }

                        revString.append(ServiceLocator.getRascalUserService().findById(
                                Integer.parseInt((String) reviewers.elementAt(j))
                                ).getUserFirstLastNameUni()
                            );

                    }
                }

                vContent.add(3, revString.toString());

                // status
                vContent.add(4, getNotNullString((String) currentRow.elementAt(7), ""));

                // the two dates only shown in protocol, midification, renewal, etc.
                if (getAgendaView().isProtocol(eventName)) { // effective date

                    IrbProtocolHeader header = ServiceLocator.getIrbProtocolHeaderService()
                        .getProtocolHeaderByOid((String) currentRow.firstElement(),
                            getAgendaView().getRascalUser()
                            );
                    Date cal = null;

                    // String effectiveDate ="";
                    String approvalDate = "";
                    String expirationDate = "";

                    if (header != null) { // cal = header.getEffectiveDate();
                                          // effectiveDate = CalendarTransformer.toString(cal);

                        cal = header.getIrbApprovalDate();
                        approvalDate = CalendarTransformer.formatMMDDYYYY(cal);

                        cal = header.getExpirationDate();
                        expirationDate = CalendarTransformer.formatMMDDYYYY(cal);
                    }

                    // vContent.add(5, effectiveDate);
                    vContent.add(5, approvalDate);

                    // expriation date
                    vContent.add(6, expirationDate);
                }

                addVectorContent(vContent, xyPosition, theStyle);
                vContent.removeAllElements();
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                addBoldLabelPlainText("Recommendation",
                    getNotNullString((String) currentRow.elementAt(6), ""), theStyle
                    );
                addBoldLabelPlainText("Follow Up",
                    getNotNullString((String) currentRow.elementAt(8), ""), theStyle
                    );

                if (i != (size - 1)) {
                    addContent(getSpaceWithSpots(0, spotsNumber), "");
                }
            }
        }
    }

    /** TODO: DOCUMENT ME! */
    public void constructPDF() {

        setPoint(getLeftPageMargin(), getPageHeight() - getTopPageMargin());
        setDataSheetFeature();

        StringBuilder title = new StringBuilder();
        title.append("Columbia University ");

        if (getAgendaView().getProtocolHeader() != null) {

            if (getAgendaView().getProtocolHeader().getIrbProtocol() != null) {
                title.append(getNotNullString(
                        ServiceLocator.getIrbProtocolService().getSubmittingTo(
                            getAgendaView().getProtocolHeader().getIrbProtocol()
                            ), ""
                        )
                    );
            }
        }

        if (!title.toString().endsWith(" ")) {
            title.append(' ');
        }

        title.append("Human Subjects Committee Meeting Minutes");
        addTitle(title.toString());
        title.setLength(0);

        setDataSheetFeature();
        addHeader(getAgendaView());


    }
}
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetUtilityView.java 338
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetView.java 339
        		CalendarTransformer.toDateTimeString(getAgendaHeader().getCreationDate()), getFontSize() + 1,
                true
                )
            );
        t.addRowFor(elements);

        for (int i = 0; i < 4; i++) {
            t.getCell(i, 0).setWidth("25%");
            t.getCell(i, 1).setWidth("25%");
            t.getCell(i, 2).setWidth("25%");
            t.getCell(i, 3).setWidth("25%");
            t.getCell(i, 0).setAlign("right");
            t.getCell(i, 1).setAlign("left");
            t.getCell(i, 2).setAlign("right");
            t.getCell(i, 3).setAlign("left");

        }

        aForm.add(t);
        aForm.add("<br>");

        // form.add(getRuler());
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  tableTitle  TODO: DOCUMENT ME!
     * @param  ps          TODO: DOCUMENT ME!
     * @param  eventName   TODO: DOCUMENT ME!
     */
    public void addEvents(String tableTitle, Vector ps, String eventName) {
        aForm.add("<br>");
        aForm.add(getTableViewTitle(tableTitle));
        aForm.add(buildAttachEventRows(ps, eventName));

    }

    /**
     * This method was created in VisualAge.
     *
     * @param  meetingAttendants  TODO: DOCUMENT ME!
     */
    public void addMeetingAttendants(Vector meetingAttendants) {


        CUHtmlTable t = new CUHtmlTable();
        t.setWidth("300");
        t.setAlign("left");
        t.setBorderWidth(0);
        t.setCellPading(0);
        t.setCellSpacing(0);

        Vector elements;

        elements = new Vector(2);
        elements.addElement(getHeadingLabelFor("Attendant"));
        elements.addElement(getHeadingLabelFor("Meeting Role"));
        t.addRowFor(elements);

        for (int i = 0; i < meetingAttendants.size(); i++) {
            IrbMeetingAttendant attendant = (IrbMeetingAttendant) meetingAttendants.elementAt(i);
            elements = new Vector(2);
            elements.addElement(getWidgetFor(
                    ServiceLocator.getRascalUserService().findById(attendant.getRid())
                        .getUserFirstLastNameUni()
                    )
                );
            elements.addElement(getWidgetFor(attendant.getMeetingRole()));
            t.addRowFor(elements);
        }

        aForm.add("<div align=\"center\">");
        aForm.add(t);
        aForm.add("<br></div>");

        // form.add(getRuler());
    }

    /** This method was created in VisualAge. */
    public void addMeetingNotes() {

        if (!getAgendaHeader().getMeetingNotes().equals("")) {
            CUHtmlTable t = new CUHtmlTable();

            // t.setWidth("300");
            t.setAlign("left");
            t.setBorderWidth(0);
            t.setCellPading(0);
            t.setCellSpacing(0);

            Vector elements;

            elements = new Vector(2);
            elements.addElement(getHeadingLabelFor("Meeting Notes"));
            elements.addElement("");
            t.addRowFor(elements);


            elements = new Vector(2);
            elements.addElement(getWidgetFor(
                    PersistentTextFormatter.insertHtmlTagsForControls(
                        getAgendaHeader().getMeetingNotes()
                        )
                    )
                );
            t.addRowFor(elements);
            t.getCell(1, 0).setColumnsToSpan(2);


            aForm.add(t);
            aForm.add("<br>");
        }

    }

    /**
     * This method was created in VisualAge.
     *
     * @param  tableTitle  TODO: DOCUMENT ME!
     * @param  ps          TODO: DOCUMENT ME!
     * @param  eventName   TODO: DOCUMENT ME!
     */
    public void addNREvents(String tableTitle, Vector ps, String eventName) {
        aForm.add("<br>");
        aForm.add(getTableViewTitle(IrbNameConstants.NON_RASCAL + tableTitle));
        aForm.add(buildNREventRows(ps, eventName));

    }

    /**
     * This method was created in VisualAge.
     *
     * @param   ps         TODO: DOCUMENT ME!
     * @param   eventName  TODO: DOCUMENT ME!
     *
     * @return  java.util.Vector
     */
    public CUHtmlTable buildAttachEventRows(Vector ps, String eventName) {
        CUHtmlTable aTable = new CUHtmlTable();

        if (eventName.equals("Other")) {
            aTable = getTable(1, getColumns().size() - 6);
        } else if (eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED)) {
            aTable = getTable(1, getColumns().size() - 4);
        } else if (isProtocol(eventName)) {
            aTable = getTable(1, getColumns().size());
        } else {

            aTable = getTable(1, getColumns().size() - 2);
        }

        aTable.setBorderWidth(1);
        aTable.setWidth("700");
        aTable.setAlign("left");

        setAttachEventHead(aTable, eventName);

        if (eventName.equals("Other")) {

            for (int i = 0; i < ps.size(); i++) {
                Vector currentRow = (Vector) ps.elementAt(i);

                try {
                    setAttachOtherEventTableDataRow(aTable, currentRow, eventName);

                } catch (Exception e) { }

                aTable.getCell(i, 0).setWidth("40%");
                aTable.getCell(i, 1).setWidth("25%");
                aTable.getCell(i, 2).setWidth("25%");

            }
        } else if (eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED)) {

            for (int i = 0; i < ps.size(); i++) {
                Vector currentRow = (Vector) ps.elementAt(i);

                try {
                    setAttachExEventTableDataRow(aTable, currentRow);

                } catch (Exception e) { }

                aTable.getCell(i, 0).setWidth("10%");
                aTable.getCell(i, 1).setWidth("10%");
                aTable.getCell(i, 2).setWidth("10%");
                aTable.getCell(i, 3).setWidth("25%");
                aTable.getCell(i, 4).setWidth("45%");

            }
        } else {

            for (int i = 0; i < ps.size(); i++) {
                Vector currentRow = (Vector) ps.elementAt(i);

                try {

                    if (isProtocol(eventName)) {
                        setAttachProtocolEventTableDataRow(aTable, currentRow, eventName);
                    } else {
                        setAttachEventTableDataRow(aTable, currentRow, eventName);
                    }

                } catch (Exception e) { }

                aTable.getCell(i, 0).setWidth("40");
                aTable.getCell(i, 1).setWidth("40");
                aTable.getCell(i, 2).setWidth("250");
                aTable.getCell(i, 3).setWidth("100");
                aTable.getCell(i, 4).setWidth("300");
                aTable.getCell(i, 5).setWidth("60");
                aTable.getCell(i, 6).setWidth("250");

                if (isProtocol(eventName)) {
                    aTable.getCell(i, 7).setWidth("100");
                    aTable.getCell(i, 8).setWidth("100");
                }

            }

        }

        return aTable;

    }

    /**
     * This method was created in VisualAge.
     *
     * @param   ps         TODO: DOCUMENT ME!
     * @param   eventName  TODO: DOCUMENT ME!
     *
     * @return  java.util.Vector
     */
    public CUHtmlTable buildNREventRows(Vector ps, String eventName) {
        CUHtmlTable aTable = new CUHtmlTable();

        aTable = getTable(1, 4);

        setNREventHead(aTable, eventName);


        for (int i = 0; i < ps.size(); i++) {
            Vector currentRow = (Vector) ps.elementAt(i);

            setNREventTableDataRow(aTable, currentRow, eventName);


        }


        return aTable;

    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public final CUHtmlForm getAForm() {

        return aForm;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public Vector getColumns() {

        String titles[] = {
            "Number", "PI", "Title", "Reviewer", "Recommendation", "Recommended Status",
            "Follow Up", "IRB Approval Date", "Expiration Date"
        };
        Vector columns = new Vector();

        for (String title : titles) {
            columns.add(getHeadingLabelFor(title));

        }

        return columns;


    }

    /**
     * Insert the method's description here. Creation date: (2/14/2002 5:32:29 PM)
     *
     * @return  int
     */
    public String getFontName() {
        return fontName;
    }

    /**
     * Insert the method's description here. Creation date: (2/15/2002 10:05:24 AM)
     *
     * @return  int
     */
    public int getFontSize() {
        return fontSize;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aTitle  String
     *
     * @return  CUHtmlText
     */
    @Override public CUHtmlText getTableViewTitle(String aTitle) {

        CUHtmlText aText = null;

        if (aTitle instanceof String) {
            aText = new CUHtmlText(aTitle);
            aText.setIsBold(true);
// aText.setFontSize("+1");
            aText.setAlignment("left");
            aText.setFontName(getDefaultFontName());
        }

        return aText;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable     CUHtmlTable
     * @param  eventName  TODO: DOCUMENT ME!
     */
    public void setAttachEventHead(CUHtmlTable aTable, String eventName) {

        CUHtmlText aTitle;
        CUHtmlTableCell header;
        String header1 = "";
        String header2 = "";


        if (eventName.equals("Other")) {
            String titlesOther[] = { "Topic", "Recommendation", "Follow Up" };

            for (int i = 0; i < titlesOther.length; i++) {
                aTitle = new CUHtmlText(titlesOther[i]);
                aTitle.setFontName(getDefaultFontName());
                aTitle.setFontSize("1");
                aTitle.setIsBold(true);
                header = aTable.getCell(0, i);
                header.add(aTitle);
                header.setAlign("left");
            }

        } else if (eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED)) {

            String titlesE[] = { "Protocol Number", "PI", "Approved By", "Title", "Follow Up" };

            for (int i = 0; i < titlesE.length; i++) {
                aTitle = new CUHtmlText(titlesE[i]);
                aTitle.setFontName(getDefaultFontName());
                aTitle.setFontSize("1");
                aTitle.setIsBold(true);
                header = aTable.getCell(0, i);
                header.add(aTitle);
                header.setAlign("left");
            }

        } else {

            header1 = "Protocol Number";

            if (eventName.equals("AdverseEvent") || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                header2 = "Keyword";
            } else {
                header2 = "Title";
            }

            if (isProtocol(eventName)) {
                String titles[] = {
                    "Protocol Number", "PI", "Title", "Reviewer", "Recommendation",
                    "Recommended Status", "Follow Up", "IRB Approcval Date", "Expiration Date"
                };

                for (int i = 0; i < titles.length; i++) {
                    aTitle = new CUHtmlText(titles[i]);
                    aTitle.setFontName(getDefaultFontName());
                    aTitle.setFontSize("1");
                    aTitle.setIsBold(true);
                    header = aTable.getCell(0, i);
                    header.add(aTitle);
                    header.setAlign("left");
                }
            } else {
                String titles[] = {
                    header1, "PI", header2, "Reviewer", "Recommendation", "Recommended Status",
                    "Follow Up"
                };

                for (int i = 0; i < titles.length; i++) {
                    aTitle = new CUHtmlText(titles[i]);
                    aTitle.setFontName(getDefaultFontName());
                    aTitle.setFontSize("1");
                    aTitle.setIsBold(true);
                    header = aTable.getCell(0, i);
                    header.add(aTitle);
                    header.setAlign("left");
                }
            }
        }


    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  anEvent    TODO: DOCUMENT ME!
     * @param  eventName  TODO: DOCUMENT ME!
     */
    public void setAttachEventTableDataRow(CUHtmlTable aTable, Vector anEvent, String eventName) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";


        // protocol Number
        CUHtmlTableCell cell0 = new CUHtmlTableCell();

        cell0.add(getRowLabelLeftFor("IRB-" + anEvent.elementAt(2)));

        cell0.setAlign("left");
        cell0.setVAlign("top");
        cell0.setWidth("200");
        aRow.add(cell0);


        // PI
        CUHtmlTableCell cell1 = new CUHtmlTableCell();
        cell1.add(getWidgetFor((String) anEvent.elementAt(4)));
        cell1.setAlign("left");
        cell1.setVAlign("top");
        cell1.setWidth("100");
        aRow.add(cell1);

        // Title
        CUHtmlTableCell cell2 = new CUHtmlTableCell();
        cell2.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(5))
                )
            );
        cell2.setAlign("left");
        cell2.setVAlign("top");
        cell2.setWidth("450");
        aRow.add(cell2);

        // reviewer
        CUHtmlTableCell cell3 = new CUHtmlTableCell();
        Vector reviewers;

        if (eventName.equals(PENDING))
            reviewers = IrbAgendaProtocolQuery.getPreMinuteApprovalEventReviewersFor(getEventObject(
                        (String) anEvent.elementAt(0),
                        eventName
                        )
                    );
        else
            reviewers = IrbAgendaProtocolQuery.getPreMinuteApprovalEventReviewersFor(
                    getAgendaHeader().getId(),
                    getEventObject((String) anEvent.elementAt(0), eventName)
                    );

        StringBuilder revString = new StringBuilder("");

        for (int i = 0; i < reviewers.size(); i++) {

            if (i > 0) revString.append(", ");

            revString.append(ServiceLocator.getRascalUserService().findById(
                    (Integer) reviewers.elementAt(i)
                    ).getUserLastFirstNameUni()
                );

        }

        cell3.add(getWidgetFor(revString.toString()));
        cell3.setAlign("left");
        cell3.setVAlign("top");
        cell3.setWidth("100");
        aRow.add(cell3);

        // recommendation
        CUHtmlTableCell cell4 = new CUHtmlTableCell();
        cell4.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(6))
                )
            );
        cell4.setAlign("left");
        cell4.setVAlign("top");
        cell4.setWidth("600");
        aRow.add(cell4);

        // recommendedStatus
        CUHtmlTableCell cell5 = new CUHtmlTableCell();
        cell5.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(7))
                )
            );
        cell5.setAlign("left");
        cell5.setVAlign("top");
        cell5.setWidth("60");
        aRow.add(cell5);

        // followUp
        CUHtmlTableCell cell6 = new CUHtmlTableCell();
        cell6.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(8))
                )
            );
        cell6.setAlign("left");
        cell6.setVAlign("top");
        cell6.setWidth("250");
        aRow.add(cell6);

        aTable.add(aRow);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable   TODO: DOCUMENT ME!
     * @param  anEvent  TODO: DOCUMENT ME!
     */
    public void setAttachExEventTableDataRow(CUHtmlTable aTable, Vector anEvent) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";


        // protocol number
        CUHtmlTableCell cell1 = new CUHtmlTableCell();
        cell1.add(getWidgetFor("IRB-" + anEvent.elementAt(2)));
        cell1.setAlign("left");
        cell1.setVAlign("top");
        aRow.add(cell1);

        // PI
        CUHtmlTableCell cell2 = new CUHtmlTableCell();
        cell2.add(getWidgetFor((String) anEvent.elementAt(4)));
        cell2.setAlign("left");
        cell2.setVAlign("top");
        aRow.add(cell2);

        // Approver
        CUHtmlTableCell cell3 = new CUHtmlTableCell();
        cell3.add(getWidgetFor(
                ServiceLocator.getRascalUserService().findById(
                    Integer.parseInt((String) anEvent.elementAt(6))
                    ).getUserFirstLastNameUni()
                )
            );
        cell3.setAlign("left");
        cell3.setVAlign("top");
        aRow.add(cell3);

        // title
        CUHtmlTableCell cell4 = new CUHtmlTableCell();
        cell4.add(getWidgetFor((String) anEvent.elementAt(5)));
        cell4.setAlign("left");
        cell4.setVAlign("top");
        aRow.add(cell4);

        // followUp
        CUHtmlTableCell cell5 = new CUHtmlTableCell();
        cell5.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(7))
                )
            );
        cell5.setAlign("left");
        cell5.setVAlign("top");
        cell5.setWidth("250");
        aRow.add(cell5);


        aTable.add(aRow);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  anEvent    TODO: DOCUMENT ME!
     * @param  eventName  TODO: DOCUMENT ME!
     */
    public void setAttachOtherEventTableDataRow(CUHtmlTable aTable, Vector anEvent, String eventName
        ) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";


        // topic
        CUHtmlTableCell cell1 = new CUHtmlTableCell();
        cell1.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(2))
                )
            );
        cell1.setAlign("left");
        cell1.setVAlign("top");
        aRow.add(cell1);

        // recommendation
        CUHtmlTableCell cell2 = new CUHtmlTableCell();
        cell2.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(6))
                )
            );
        cell2.setAlign("left");
        cell2.setVAlign("top");
        aRow.add(cell2);

        // followUp
        CUHtmlTableCell cell3 = new CUHtmlTableCell();
        cell3.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(8))
                )
            );
        cell3.setAlign("left");
        cell3.setVAlign("top");
        aRow.add(cell3);

        aTable.add(aRow);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  anEvent    TODO: DOCUMENT ME!
     * @param  eventName  TODO: DOCUMENT ME!
     */
    public void setAttachProtocolEventTableDataRow(CUHtmlTable aTable, Vector anEvent,
        String eventName
        ) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";


        // protocol Number
        CUHtmlTableCell cell0 = new CUHtmlTableCell();

        cell0.add(getRowLabelLeftFor("IRB-" + anEvent.elementAt(2)));

        cell0.setAlign("left");
        cell0.setVAlign("top");
        cell0.setWidth("200");
        aRow.add(cell0);


        // PI
        CUHtmlTableCell cell1 = new CUHtmlTableCell();
        cell1.add(getWidgetFor((String) anEvent.elementAt(4)));
        cell1.setAlign("left");
        cell1.setVAlign("top");
        cell1.setWidth("100");
        aRow.add(cell1);

        // Title
        CUHtmlTableCell cell2 = new CUHtmlTableCell();
        cell2.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(5))
                )
            );
        cell2.setAlign("left");
        cell2.setVAlign("top");
        cell2.setWidth("450");
        aRow.add(cell2);

        // reviewer
        CUHtmlTableCell cell3 = new CUHtmlTableCell();
        Vector reviewers = IrbAgendaProtocolQuery.getPreMinuteApprovalEventReviewersFor(
                getAgendaHeader().getId(), getEventObject((String) anEvent.elementAt(0), eventName)
                );
        StringBuilder revString = new StringBuilder("");

        for (int i = 0; i < reviewers.size(); i++) {

            if (i > 0) revString.append(", ");

            revString.append(ServiceLocator.getRascalUserService().findById(
                    Integer.parseInt((String) reviewers.elementAt(i))
                    ).getUserFirstLastNameUni()
                );

        }

        cell3.add(getWidgetFor(revString.toString()));
        cell3.setAlign("left");
        cell3.setVAlign("top");
        cell3.setWidth("100");
        aRow.add(cell3);

        // recommendation
        CUHtmlTableCell cell4 = new CUHtmlTableCell();
        cell4.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(6))
                )
            );
        cell4.setAlign("left");
        cell4.setVAlign("top");
        cell4.setWidth("600");
        aRow.add(cell4);

        // recommendedStatus
        CUHtmlTableCell cell5 = new CUHtmlTableCell();
        cell5.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(7))
                )
            );
        cell5.setAlign("left");
        cell5.setVAlign("top");
        cell5.setWidth("60");
        aRow.add(cell5);

        // followUp
        CUHtmlTableCell cell6 = new CUHtmlTableCell();
        cell6.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(8))
                )
            );
        cell6.setAlign("left");
        cell6.setVAlign("top");
        cell6.setWidth("250");
        aRow.add(cell6);

        // effective date
        /*CUHtmlTableCell cell7 = new CUHtmlTableCell();
         *
         * cell7.add(getWidgetFor(CalendarTransformer.toString((IrbProtocolHeader.getProtocolHeaderByOid((String)anEvent.firstElement(),
         * getRascalUser())).getEffectiveDate()))); cell7.setAlign("left"); cell7.setVAlign("top");
         * cell7.setWidth("100"); aRow.add(cell7);
         */

        // irbapprovaldate
        CUHtmlTableCell cell7 = new CUHtmlTableCell();
        cell7.add(getWidgetFor(
                CalendarTransformer.formatMMDDYYYY(
                    (ServiceLocator.getIrbProtocolHeaderService().getProtocolHeaderByOid(
                            (String) anEvent.firstElement(), getRascalUser()
                            )).getIrbApprovalDate()
                    )
                )
            );
        cell7.setAlign("left");
        cell7.setVAlign("top");
        cell7.setWidth("100");
        aRow.add(cell7);


        // expiration date

        CUHtmlTableCell cell8 = new CUHtmlTableCell();
        cell8.add(getWidgetFor(
                CalendarTransformer.formatMMDDYYYY(
                    (ServiceLocator.getIrbProtocolHeaderService().getProtocolHeaderByOid(
                            (String) anEvent.firstElement(), getRascalUser()
                            )).getExpirationDate()
                    )
                )
            );
        cell8.setAlign("left");
        cell8.setVAlign("top");
        cell8.setWidth("100");
        aRow.add(cell8);

        aTable.add(aRow);
    }

    /**
     * Insert the method's description here. Creation date: (2/14/2002 5:32:29 PM)
     *
     * @param  newFontName  int
     */
    public void setFontName(String newFontName) {
        fontName = newFontName;
    }

    /**
     * Insert the method's description here. Creation date: (2/15/2002 10:05:24 AM)
     *
     * @param  newFontSize  int
     */
    public void setFontSize(int newFontSize) {
        fontSize = newFontSize;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable     CUHtmlTable
     * @param  eventName  TODO: DOCUMENT ME!
     */
    public void setNREventHead(CUHtmlTable aTable, String eventName) {

        CUHtmlText aTitle;
        CUHtmlTableCell header;
        String header1 = "Title";

        if (eventName.equals("AdverseEvent") || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
            header1 = "Keyword";
        }

        String titles[] = { header1, "Recommendation", "Recommended Status", "Follow Up" };
        int count = titles.length;

        for (int i = 0; i < count; i++) {
            aTitle = new CUHtmlText(titles[i]);
            aTitle.setFontName(getDefaultFontName());
            aTitle.setFontSize("1");
            aTitle.setIsBold(true);
            header = aTable.getCell(0, i);
            header.add(aTitle);
            header.setAlign("left");
        }


    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  anEvent    TODO: DOCUMENT ME!
     * @param  eventName  TODO: DOCUMENT ME!
     */
    public void setNREventTableDataRow(CUHtmlTable aTable, Vector anEvent, String eventName) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";


        // Title
        CUHtmlTableCell cell2 = new CUHtmlTableCell();
        cell2.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(0))
                )
            );
        cell2.setAlign("left");
        cell2.setVAlign("top");
        cell2.setWidth("450");
        aRow.add(cell2);

        // recommendation
        CUHtmlTableCell cell4 = new CUHtmlTableCell();
        cell4.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(1))
                )
            );
        cell4.setAlign("left");
        cell4.setVAlign("top");
        cell4.setWidth("600");
        aRow.add(cell4);

        // recommendedStatus
        CUHtmlTableCell cell5 = new CUHtmlTableCell();
        cell5.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(2))
                )
            );
        cell5.setAlign("left");
        cell5.setVAlign("top");
        cell5.setWidth("60");
        aRow.add(cell5);

        // followUp
        CUHtmlTableCell cell6 = new CUHtmlTableCell();
        cell6.add(getWidgetFor(
                PersistentTextFormatter.insertHtmlTagsForControls((String) anEvent.elementAt(3))
                )
            );
        cell6.setAlign("left");
        cell6.setVAlign("top");
        cell6.setWidth("250");
        aRow.add(cell6);


        aTable.add(aRow);
    }

    /**
     * Transform a date to a string.
     *
     * @param   date  TODO: DOCUMENT ME!
     *
     * @return  String
     */
    public String toDateString(Date date) {
        String dateStr = null;

        if (date != null) {
            dateStr = CalendarTransformer.formatMMDDYYYY(date);
        }

        return dateStr;
    }
}
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixGIsotopeEntryView.java 92
edu/columbia/rascal/presentation/appendix/pages/AppendixIsotopeEntryView.java 92
        setAppendixObject((AppendixG) bo);
        setIsotope(aIsotope);
        setParmTable(aTable);
        add(bo);
        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /** This method was created in VisualAge. */
    @Override public void addAppendixHeader() {
        setSubTitle("Radioactive Isotopes<br>" +
            "<font size=\"-2\" color=red> *All fields required</font>"
            );
        add(getSubTitle());
        addFields();
    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     */
    @Override public void addFields() {

        // set the number of cells in the table here:
        // (all "addRow" methods should be set up for this
        // number of cells per row)
        int numCells = 4;

        // Create the overall table for the page:
        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellSpacing(2);

        // Add general fields:
        addGeneralRows(aTable, numCells);
        aTable.getCell(0, 0).setWidth("40%");


        getForm().add(aTable);
        getForm().add(getActionButtons());

        add(getForm());

    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved. Build the drug entry form, using picklists as appropriate.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {
        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();

        Object aWidget;
        Object aWidget1;
        String isotope = "";
        String comp = "";
        String halfLife = "";
        String halfLifeUnit = "";
        String halfLifeInSubject = "";
        String halfLifeInSubjectUnit = "";
        String initActivity = "";
        String initActivityUnit = "";
        String routeOfAdmin = "";
        String otherRouteValue = "";
        String routeLabel = "Route of administration<font color=red>*&nbsp;";

        if (getParmTable() != null) {
            isotope = (String) getParmTable().get(KEY_PARM_RADIO_NAME);
            comp = (String) getParmTable().get(KEY_PARM_RADIO_COMPOUND);
            halfLife = (String) getParmTable().get(KEY_PARM_RADIO_HALFLIFE);
            halfLifeUnit = (String) getParmTable().get(KEY_PARM_RADIO_HALFLIFE_UNIT);

            initActivity = (String) getParmTable().get(KEY_PARM_RADIO_INI_ACTIVE);
            initActivityUnit = (String) getParmTable().get(KEY_PARM_RADIO_INI_ACTIVE_UNIT);
            routeOfAdmin = (String) getParmTable().get(KEY_PARM_RADIO_ROUTE_OF_ADMIN);
            otherRouteValue = (String) getParmTable().get(KEY_PARM_RADIO_OTHER_ROUTE);
        } else if (getIsotope() != null) {
            isotope = getIsotope().getName();
            comp = getIsotope().getCompound();
            halfLife = (getIsotope().getHalfLife()).toString();
            halfLifeUnit = getIsotope().getHalfLifeUnit();

            initActivity = (getIsotope().getInitialActivity()).toString();
            initActivityUnit = getIsotope().getInitialActivityUnit();
            routeOfAdmin = getIsotope().getRouteOfAdministration();

        }


        // isotope name
        aWidget = getMultilineTextWidgetFor("isotope", "2", "50", isotope);
// aWidget = getEditWidgetFor("isotope", isotope, "5", "5");
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Isotope Name<font color=red>*&nbsp;"));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Compound
        aWidget = getMultilineTextWidgetFor("compound", "2", "50", comp);
// aWidget = getEditWidgetFor("compound", comp, "30", "30");
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Compound<font color=red>*&nbsp;"));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // half life
        aWidget = getEditWidgetFor("halfLife", halfLife, "10", "30");
        ((CUHtmlEntryField) aWidget).setOnKeyPress("return restrictFieldToNumbersOrDecimal(event)");
        columns.setElementAt(aWidget, 1);
        aWidget1 = getHalfLifeUnitValue(halfLifeUnit);
        columns.setElementAt(aWidget1, 3);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Physical Half Life<font color=red>*&nbsp;"));
        aTable.getCell(row, 2).add(getRowLabelFor("Unit<font color=red>*&nbsp;"));
        row++;
        columns.setElementAt("", 3);

/*
 *      // half life in subject if (halfLifeInSubject == null          ||
 * halfLifeInSubject.trim().length() < 1         || !(Float.parseFloat(halfLifeInSubject) > 0)) {
 *  halfLifeInSubject = ""; }     aWidget = getEditWidgetFor("halfLifeInSubject", halfLifeInSubject,
 * "10", "30");     ((CUHtmlEntryField)aWidget).setOnKeyPress("return
 * restrictFieldToNumbersOrDecimal(event)");     columns.setElementAt(aWidget, 1);     aWidget1 =
 * getHalfLifeInSubjectUnitValue();     columns.setElementAt(aWidget1, 3);
 * aTable.addRowFor(columns);     aTable.getCell(row, 0).add(getRowLabelFor("Estimated
 * Effective<br>Half Life in animal &nbsp;"));     aTable.getCell(row, 2).add(getRowLabelFor("Unit
 * &nbsp;"));     row++;     columns.setElementAt("", 3);
 */
        // initial activity
        aWidget = getEditWidgetFor("initialActivity", initActivity, "10", "30");
        ((CUHtmlEntryField) aWidget).setOnKeyPress("return restrictFieldToNumbersOrDecimal(event)");
        columns.setElementAt(aWidget, 1);
        aWidget1 = getInitialActivityUnitValue(initActivityUnit);
        columns.setElementAt(aWidget1, 3);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor(
                "Initial Activity Level<br>Per Animal<font color=red>*&nbsp;"
                )
            );
        aTable.getCell(row, 2).add(getRowLabelFor("Unit<font color=red>*&nbsp;"));
        row++;
        columns.setElementAt("", 3);


        // route of admin
        aWidget = getRouteOfAdminValue(routeOfAdmin);
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor(routeLabel));
        aTable.getCell(row, 1).setColumnsToSpan(2);
        row++;

        // other route -- route not on list.  Comment out if not
        // appropriate
        if (getOtherRoute() && (getParmTable() == null)) {
            otherRouteValue = routeOfAdmin;
        }

        aWidget = getEditWidgetFor("otherRoute", otherRouteValue, "30", "30");
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Route (if not listed above&nbsp)"));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Save");
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
            aCell.setAlign("center");
        }

        return aTable;
    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   overrideUnit  TODO: DOCUMENT ME!
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */

    public Object getHalfLifeInSubjectlUnitValue(String overrideUnit) {

        Vector<String> list = new Vector<String>(11);
        list.addElement("~Select time~");
        list.addElement("minutes");
        list.addElement("hours");
        list.addElement("days");
        list.addElement("years");

        getLabel("halfLifeInSubjectUnit");

        String unit = null;

        if ((overrideUnit == null) || (overrideUnit.trim().length() < 1)) {
            AppendixIsotope myIsotope = getIsotope();

            if (myIsotope != null) {
                unit = myIsotope.getHalfLifeInSubjectUnit();
            }
        } else {
            unit = overrideUnit;
        }

        if ((unit == null) || (unit.length() == 0)) {
            unit = "";
        }

        return getSingleSelectWidgetFor(list, unit);

    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */

    public Object getHalfLifeInSubjectUnitValue() {

        Vector<String> list = new Vector<String>(11);
        list.addElement("~Select time~");
        list.addElement("minutes");
        list.addElement("hours");
        list.addElement("days");
        list.addElement("years");

        getLabel("halfLifeInSubjectUnit");

        AppendixIsotope myIsotope = getIsotope();
        String unit = null;

        if (myIsotope != null) {
            unit = myIsotope.getHalfLifeInSubjectUnit();
        }

        if ((unit == null) || (unit.length() == 0)) {
            unit = "";
        }

        return getSingleSelectWidgetFor(list, unit);

    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */

    public Object getHalfLifeUnitValue() {

        Vector<String> list = new Vector<String>(11);
        list.addElement("~Select Time~");
        list.addElement("minutes");
        list.addElement("hours");
        list.addElement("days");
        list.addElement("years");

        getLabel("halfLifeUnit");

        AppendixIsotope myIsotope = getIsotope();
        String unit = null;

        if (myIsotope != null) {
            unit = myIsotope.getHalfLifeUnit();
        }

        if ((unit == null) || (unit.length() == 0)) {
            unit = "";
        }

        return getSingleSelectWidgetFor(list, unit);

    }

    /**
     * This method was created in VisualAge. @2002 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   overrideUnit  TODO: DOCUMENT ME!
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */

    public Object getHalfLifeUnitValue(String overrideUnit) {

        Vector<String> list = new Vector<String>(11);
        list.addElement("~Select Time~");
        list.addElement("minutes");
        list.addElement("hours");
        list.addElement("days");
        list.addElement("years");

        getLabel("halfLifeUnit");

        String unit = null;

        if ((overrideUnit == null) || (overrideUnit.trim().length() < 1)) {
            AppendixIsotope myIsotope = getIsotope();

            if (myIsotope != null) {
                unit = myIsotope.getHalfLifeUnit();
            }
        } else {
            unit = overrideUnit;
        }

        if ((unit == null) || (unit.length() == 0)) {
            unit = "";
        }

        return getSingleSelectWidgetFor(list, unit);

    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   overrideUnit  TODO: DOCUMENT ME!
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public Object getInitialActivityUnitValue(String overrideUnit) {
        Vector<String> list = new Vector<String>(11);
        list.addElement("~Select Value~");
        // CPM 20120310 - Per Bug 26905, now using total microcuries, millicuries, or Bq 
        // and not including weight (g,kg)
        list.addElement("microcuries");
        list.addElement("millicuries");
        list.addElement("Bq");
        
        getLabel("initialActivityUnit");

        String unit = "";
        
        // CPM 20120310 - Per at2582 re: Bug 26905 - Force selection of new units
        AppendixIsotope myIsotope = getIsotope();
        if (myIsotope != null) {
            unit = myIsotope.getInitialActivityUnit();
            // If we do not have the unit in the list, do not allow it
            if ( StringUtils.isBlank(unit) || (StringUtils.isNotBlank(unit) && !list.contains(unit)) ) {
            	unit = "";
            }
        }

        return getSingleSelectWidgetFor(list, unit);
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  AppendixIsotope
     */
    public AppendixIsotope getIsotope() {
        return isotope;
    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public boolean getOtherRoute() {
        return this.otherRoute;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  Hashtable
     */
    public Hashtable getParmTable() {
        return parmTable;
    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   routeOfAdmin  TODO: DOCUMENT ME!
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public Object getRouteOfAdminValue(String routeOfAdmin) {
        Vector<String> list = new Vector<String>(11);
        list.addElement("~Select Route~");
        list.addElement("Intravenous");
        list.addElement("Oral");
        // list.addElement("Other");

        if (list.indexOf(routeOfAdmin) == -1)
            setOtherRoute(true);
        else
            setOtherRoute(false);

        getLabel("routeOfAdmin");

        return getSingleSelectWidgetFor(list, routeOfAdmin);
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aIsotope  AppendixIsotope
     */
    public void setIsotope(AppendixIsotope aIsotope) {
        this.isotope = aIsotope;
    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  b  TODO: DOCUMENT ME!
     */
    public void setOtherRoute(boolean b) {
        this.otherRoute = b;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable  TODO: DOCUMENT ME!
     */
    public void setParmTable(Hashtable aTable) {

        parmTable = aTable;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    @Override protected Vector getDefaultMainFooter() {
        return new Vector();
    }
}
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetUtilityView.java 76
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetView.java 78
    public IrbAgendaMinutesDataSheetUtilityView(Object bo, RascalUser aUser, Vector protocolAttached,
        Vector modificationAttached, Vector renewalAttached, Vector adverseEventAttached,
        Vector closureAttached,
        Vector exemptAttached, Vector expeditableAttached, Vector pendingAttached,
        Vector NRprotocolAttached, Vector NRmodificationAttached, Vector NRrenewalAttached,
        Vector NRadverseEventAttached, 
        Vector NRclosureAttached, Vector NRexemptAttached,
        Vector NRexpeditableAttached, Vector NRpendingAttached, Vector otherTopics,
        Vector meetingAttendants, Vector unanticipateAttached, Vector NRunanticipateAttached,
        boolean inFrames
        ) {
        super();
        setMainTitle("Human Subjects");
        setPageTitle("RASCAL Human Subjects - Data Sheet ");

        setAgendaHeader((IrbAgendaHeader) bo);
        setRascalUser(aUser);

        if (inFrames) {
            setOnLoad(
                "parent.frames[1].location='edu.columbia.rascal.presentation.agenda.servlets.IrbAgendaLinkFrameServlet?agendaHeaderOid=" +
                getAgendaHeader().getId().toString() + "'"
                );
        }

        add(bo);

        setSubTitle("Columbia University Human Subjects Committee Meeting Minutes");

        CUHtmlForm aForm = getAForm();
        aForm.add(getSubTitle());
        aForm.add(getRuler());

        setFontName("MS Comic Sans");
        setFontSize(1);

        addDataAgendaHeader();

        if (meetingAttendants.size() > 0) {
            addMeetingAttendants(meetingAttendants);
        }

        addAttendanceNotes();
// aForm.add(getRuler());

        int numCells = 4;

        add("<br>");

        // add attached events
        if (protocolAttached.size() > 0) {
            addEvents("New Protocols", protocolAttached, IrbNameConstants.PROTOCOL_HEADER);
        }

        if (NRprotocolAttached.size() > 0) {
            addNREvents("New Protocols", NRprotocolAttached, IrbNameConstants.PROTOCOL_HEADER);
        }

        if (modificationAttached.size() > 0) {
            addEvents("Modifications", modificationAttached, IrbNameConstants.MODIFICATION);
        }

        if (NRmodificationAttached.size() > 0) {
            addNREvents("Modifications", NRmodificationAttached, IrbNameConstants.MODIFICATION);
        }

        if (renewalAttached.size() > 0) {
            addEvents("Renewals", renewalAttached, IrbNameConstants.RENEWAL);
        }

        if (NRrenewalAttached.size() > 0) {
            addNREvents("Renewals", NRrenewalAttached, IrbNameConstants.RENEWAL);
        }

        if (adverseEventAttached.size() > 0) {
            addEvents("Advese Event Reports", adverseEventAttached, IrbNameConstants.ADVERSE_EVENT);
        }

        if (NRadverseEventAttached.size() > 0) {
            addNREvents("Advese Event Reports", NRadverseEventAttached, IrbNameConstants.ADVERSE_EVENT);
        }

        if (closureAttached.size() > 0) {
            addEvents("Closure Reports", closureAttached, IrbNameConstants.CLOSURE);
        }

        if (NRclosureAttached.size() > 0) {
            addNREvents("Closure Reports", NRclosureAttached, IrbNameConstants.CLOSURE);
        }

        if (unanticipateAttached.size() > 0) {
            addEvents("Unanticipated Problems", unanticipateAttached, IrbNameConstants.UNANTICIPATED_PROBLEM);
        }

        if (NRunanticipateAttached.size() > 0) {
            addNREvents("Unanticipated Problems", NRunanticipateAttached, IrbNameConstants.UNANTICIPATED_PROBLEM);
        }

        if (otherTopics.size() > 0) {
            addEvents("Other Topics", otherTopics, "Other");
        }

        if (exemptAttached.size() > 0) {
            addEvents("Previously Approved Exempt Protocols", exemptAttached, IrbNameConstants.EXEMPT);
        }

        if (NRexemptAttached.size() > 0) {
            addNREvents("Previously Approved Exempt Protocols", NRexemptAttached, IrbNameConstants.EXEMPT);
        }

        if (expeditableAttached.size() > 0) {
            addEvents("Previously Approved Expedited Protocols", expeditableAttached, IrbNameConstants.EXPEDITED);
        }

        if (NRexpeditableAttached.size() > 0) {
            addNREvents("Previously Approved Expedited Protocols", NRexpeditableAttached, IrbNameConstants.EXPEDITED);
        }

        if (expeditableAttached.size() > 0) {
            addEvents("Previously Approved Pending", pendingAttached, PENDING);
        }

        if (NRexpeditableAttached.size() > 0) {
            addNREvents("Previously Approved Pending", NRpendingAttached, PENDING);
        }

        addMeetingNotes();

        aForm.add("<br>");

        add(aForm);

        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   date  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static String toTimeString(Date date) {

        String dateStr = null;

        if (date != null) {
            dateStr = CalendarTransformer.toTimeString(date);
        }

        return dateStr;
    }

    /** This method was created in VisualAge. */
    public void addAttendanceNotes() {

        if (!getAgendaHeader().getMeetingAttendanceNotes().equals("")) {
            CUHtmlTable t = new CUHtmlTable();

            // t.setWidth("300");
            t.setAlign("left");
            t.setBorderWidth(0);
            t.setCellPading(0);
            t.setCellSpacing(0);

            Vector elements;

            elements = new Vector(2);
            elements.addElement(getHeadingLabelFor("Attendance Notes"));
            elements.addElement("");
            t.addRowFor(elements);


            elements = new Vector(2);
            elements.addElement(getWidgetFor(
                    PersistentTextFormatter.insertHtmlTagsForControls(
                        getAgendaHeader().getMeetingAttendanceNotes()
                        )
                    )
                );
            t.addRowFor(elements);
            t.getCell(1, 0).setColumnsToSpan(2);


            aForm.add(t);
            aForm.add("<br>");
        }


    }

    /** This method was created in VisualAge. */
    public void addDataAgendaHeader() {


        CUHtmlTable t = new CUHtmlTable();
        t.setBorderWidth(1);
        t.setCellPading(0);
        t.setCellSpacing(0);
        t.setBgColor("gray1");

        Vector elements;


        String agendaNumber = getPrefix() +
            ((getAgendaHeader().getAgendaNumber() == null) ? ""
                                                           : getAgendaHeader().getAgendaNumber());

        elements = new Vector(5);
        elements.addElement(getTextWidgetFor("Agenda Number: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(agendaNumber, getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor("Agenda Status: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(
                ((ServiceLocator.getIrbAgendaHeaderService().getCurrentStatus(getAgendaHeader()) ==
                        null)
                    ? ""
                    : ServiceLocator.getIrbAgendaHeaderService().getCurrentStatus(getAgendaHeader())
                        .getStatusName()), getFontSize() + 1, true
                )
            );
        t.addRowFor(elements);


        elements = new Vector(5);
        elements.addElement(getTextWidgetFor("Date Created: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(toDateString(getAgendaHeader().getCreationDate()),
                getFontSize() + 1, true
                )
            );
        elements.addElement(getTextWidgetFor("Meeting Date: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(toDateString(getAgendaHeader().getMeetingDate()),
                getFontSize() + 1, true
                )
            );
        t.addRowFor(elements);

        elements = new Vector(5);

        String meetingBeg = ((getAgendaHeader().getMeetingBeginTime() == null)
                ? "00:00" : getTimeString(getAgendaHeader().getMeetingBeginTime()));
        String meetingEnd = ((getAgendaHeader().getMeetingEndTime() == null)
                ? "00:00" : getTimeString(getAgendaHeader().getMeetingEndTime()));
        elements.addElement(getTextWidgetFor("Meeting Begin Time: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(meetingBeg, getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor("Meeting End Time: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(meetingEnd, getFontSize() + 1, true));
        t.addRowFor(elements);


        elements = new Vector(5);

        IrbCommittee aCommittee = ServiceLocator.getIrbCommitteeService().findById(getAgendaHeader()
                .getCommitteeId()
                );
        String aName = aCommittee.getCommitteeName();
        elements.addElement(getTextWidgetFor("Committee: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(aName, getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor("Timestamp: ", getFontSize() + 1, true));
        elements.addElement(getTextWidgetFor(
                //CalendarTransformer.toDateTimeString(Calendar.getInstance()), getFontSize() + 1,
        		CalendarTransformer.toDateTimeString(getAgendaHeader().getCreationDate()), getFontSize() + 1,
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 71
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 70
        setSubTitle("Appendix B - Safety Officer Approval");

        setOnLoad(getOnLoadForOwnerType(anOwnerSurrogate.getOwnerType()));

        if (anOwnerSurrogate.getOwnerType().equals(IRB_OWNER)) {
            addJavaScriptElement(new CUHtmlText(getJSCodeFrom("irbSafetyOfficerReturnConfirm.js")));
        }

        addJavaScriptElement(CURascalHmJavascript.getJavascriptCheckRecipient());

        setAppendixObject(anAppendixObject);
        setOwnerSurrogate(anOwnerSurrogate);
        setTracker(aTracker);

        setRascalUser(aUser);
        add(anAppendixObject);
        render();

    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected void addGeneralFields() throws Exception {
        CUHtmlTableCell aCell1;
        CUHtmlTableCell aCell2;

        CUHtmlTable aTable = utilGetHtmlTable("100%", 0, 4);

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(fieldGet_1_ReviewAndApproveText(), "40%", getTitleAlign());
        aCell1.setColumnsToSpan(3);

        aRow.add(aCell1);
        aTable.add(aRow);

        addSpacerRows(aTable, 2, 1, "10");

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(REC_ANIMAL_HOUSING, defaultFontSize, true,
                        false
                        ), "40%", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell("", "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            Iterator bpList = getBoilerPlateList(KEY_PARM_REC_HOUSE_REF_ID).iterator();

            while (bpList.hasNext()) {
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
                aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(fieldGet_2_RecommendedHousing("2"), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        String ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                                                                             : REC_PPE_IACUC;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetHtmlText(ppeLabel, defaultFontSize, true, false),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("", "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        Iterator bpList = getBoilerPlateList(KEY_PARM_REC_PPE_REF_ID).iterator();

        while (bpList.hasNext()) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell(fieldGet_3_RecommendedPpe("3"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVER_NOTES + "</b>"),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_7_ApproverNotes("7"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval number
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_NUMBER + "</b>"),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_6_EHSNumber("6"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            String recipientsLabel =
                "Send Approval Notice to:</b><br>(UNIs and/or email addresses separated by commas)";

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(recipientsLabel, defaultFontSize, true,
                        false
                        ), "300", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell(fieldGet_NoticeRecipients("recipients"), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        // set up safety officer approval information
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();

                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);

        getForm().add(getHiddenWidgetFor("action"));

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlItem
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected CUHtmlItem fieldGet_1_ReviewAndApproveText() throws Exception {
        String bioSafeLevel = ((AppendixB) getAppendixObject()).getBiosafetyLevel();
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 71
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 70
edu/columbia/rascal/presentation/appendix/pages/AppendixESafetyOfficerApprovalView.java 73
        setSubTitle("Appendix B - Safety Officer Approval");

        setOnLoad(getOnLoadForOwnerType(anOwnerSurrogate.getOwnerType()));

        if (anOwnerSurrogate.getOwnerType().equals(IRB_OWNER)) {
            addJavaScriptElement(new CUHtmlText(getJSCodeFrom("irbSafetyOfficerReturnConfirm.js")));
        }

        addJavaScriptElement(CURascalHmJavascript.getJavascriptCheckRecipient());

        setAppendixObject(anAppendixObject);
        setOwnerSurrogate(anOwnerSurrogate);
        setTracker(aTracker);

        setRascalUser(aUser);
        add(anAppendixObject);
        render();

    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected void addGeneralFields() throws Exception {
        CUHtmlTableCell aCell1;
        CUHtmlTableCell aCell2;

        CUHtmlTable aTable = utilGetHtmlTable("100%", 0, 4);

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(fieldGet_1_ReviewAndApproveText(), "40%", getTitleAlign());
        aCell1.setColumnsToSpan(3);

        aRow.add(aCell1);
        aTable.add(aRow);

        addSpacerRows(aTable, 2, 1, "10");

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(REC_ANIMAL_HOUSING, defaultFontSize, true,
                        false
                        ), "40%", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell("", "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            Iterator bpList = getBoilerPlateList(KEY_PARM_REC_HOUSE_REF_ID).iterator();

            while (bpList.hasNext()) {
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
                aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(fieldGet_2_RecommendedHousing("2"), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        String ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                                                                             : REC_PPE_IACUC;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetHtmlText(ppeLabel, defaultFontSize, true, false),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("", "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        Iterator bpList = getBoilerPlateList(KEY_PARM_REC_PPE_REF_ID).iterator();

        while (bpList.hasNext()) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell(fieldGet_3_RecommendedPpe("3"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVER_NOTES + "</b>"),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_7_ApproverNotes("7"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval number
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_NUMBER + "</b>"),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_6_EHSNumber("6"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            String recipientsLabel =
                "Send Approval Notice to:</b><br>(UNIs and/or email addresses separated by commas)";

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(recipientsLabel, defaultFontSize, true,
                        false
                        ), "300", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell(fieldGet_NoticeRecipients("recipients"), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        // set up safety officer approval information
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();

                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
File Line
edu/columbia/rascal/presentation/irb/pages/HzAttestationSearchView.java 94
edu/columbia/rascal/presentation/irb/pages/IrbProtocolAdminChairSearchView.java 170
        getAForm().add(buildSearchFields());

        getAForm().add(getButtons());


        add(getAForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable buildSearchFields() {

        // set main table for page:
        Vector columns = new Vector(2);
        columns.addElement("");
        columns.addElement("");

        int row = 0;

        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellPading(0);
        aTable.setCellSpacing(0);


        columns.setElementAt(new CUHtmlEntryField("RascalUserUni", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Uni  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelLeftFor("OR"), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("RascalUser", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Last Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelFor("&nbsp "), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("&nbsp  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;


        columns.setElementAt(new CUHtmlEntryField("paperProtocolNumber", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Paper Protocol Number  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("previousProtocolNumber", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Previous Protocol Number  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("OriginatingDepartment", "5", "3", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Originating Department Code  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("OriginatingDepartmentName", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Originating Department Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("DrugDeviceBiologic", "30", "30", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Drug, Device, or Biologic  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("HumanSpecimen", "30", "30", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Human Specimen  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("Title", "50", "50", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Title  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getBooleanWidgetFor(INVALID, false), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Exclude Invalid Requests "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getBooleanWidgetFor(EXPIRED, false), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Exclude Expired Protocols "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getBooleanWidgetFor(CLOSURED, false), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Exclude Closured Protocols "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;
        
        columns.setElementAt(getBooleanWidgetFor(CREATING, false), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Exclude Created Protocols "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;       

        aTable.getCell(0, 0).setWidth("40%");
        aTable.getCell(0, 1).setWidth("60%");

        return aTable;

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    protected CUHtmlForm getAForm() {

        if (aForm == null) {
            aForm = new CUHtmlForm("Form1", HzAttestationSearchServlet.class.getName(), "POST");
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixFSafetyOfficerApprovalView.java 72
edu/columbia/rascal/presentation/appendix/pages/AppendixGSafetyOfficerApprovalView.java 72
        setSubTitle("Appendix F - Safety Officer Approval");

        setOnLoad(getOnLoadForOwnerType(anOwnerSurrogate.getOwnerType()));

        if (anOwnerSurrogate.getOwnerType().equals(IRB_OWNER)) {
            addJavaScriptElement(new CUHtmlText(getJSCodeFrom("irbSafetyOfficerReturnConfirm.js")));
        }

        addJavaScriptElement(CURascalHmJavascript.getJavascriptCheckRecipient());

        setAppendixObject(anAppendixObject);
        setOwnerSurrogate(anOwnerSurrogate);
        setTracker(aTracker);

        setRascalUser(aUser);
        add(anAppendixObject);
        render();

    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected void addGeneralFields() throws Exception {
        CUHtmlTableCell aCell1;
        CUHtmlTableCell aCell2;

        CUHtmlTable aTable = utilGetHtmlTable("100%", 0, 4);

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(fieldGet_1_ReviewAndApproveText(), "40%", getTitleAlign());
        aCell1.setColumnsToSpan(3);

        aRow.add(aCell1);
        aTable.add(aRow);

        addSpacerRows(aTable, 2, 1, "10");

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(REC_ANIMAL_HOUSING, defaultFontSize, true,
                        false
                        ), "40%", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell("", "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            Iterator bpList = getBoilerPlateList(KEY_PARM_REC_HOUSE_REF_ID).iterator();

            while (bpList.hasNext()) {
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
                aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(fieldGet_2_RecommendedHousing("2"), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        String ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                                                                             : REC_PPE_IACUC;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetHtmlText(ppeLabel, defaultFontSize, true, false),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("", "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        Iterator bpList = getBoilerPlateList(KEY_PARM_REC_PPE_REF_ID).iterator();

        while (bpList.hasNext()) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell(fieldGet_3_RecommendedPpe("3"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + RADIATION_APPROVER_NOTES + "</b>"
                    ), "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_7_ApproverNotes("7"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            String recipientsLabel =
                "Send Approval Notice to:</b><br>(UNIs and/or email addresses separated by commas)";

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(recipientsLabel, defaultFontSize, true,
                        false
                        ), "300", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell(fieldGet_NoticeRecipients("recipients"), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        // set up safety officer approval information
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_RADIATION_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();

                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
    }

    /**
     * NOTE: method name is not desciptive of its function in this view
     *
     * <p>This method was created in VisualAge.</p>
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlItem
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected CUHtmlItem fieldGet_1_ReviewAndApproveText() throws Exception {
        StringBuffer aIsotBuffer = new StringBuffer(500);
        Set<AppendixIsotope> isots = ((AppendixF) getAppendixObject()).getAppendixIsotopes();
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportDeviceStudyView.java 189
edu/columbia/rascal/presentation/irb/pages/IrbReportDrugDeviceStudyView.java 188
            description.setIsBold(false);
            description.setAlignment("center");
            description.setFontName(getDefaultFontName());

            aForm.add(description);
            aForm.add("<br>");
        }

        if ((format != null) && format.equalsIgnoreCase("normal")) {
            CUHtmlTable table = new CUHtmlTable();
            Vector moreButtons = new Vector();

            table.setBorderWidth(0);

            // Sorting is complicated by one-to-many relationships, sorting defaulted to Protocol
            // Number. Developing a *useful* means to sort data will consume time. Will develop if
            // sorting becomes a demand. moreButtons.add(getSortHeaderForColumnNames(columns, "",
            // ""));
            CUHtmlText text = new CUHtmlText("Sorted&nbsp;by&nbsp;Protocol&nbsp;Number");
            text.setFontSize("1");
            moreButtons.add(text);
            table.add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell(getReportHelpFor("").getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "print", "Printable Form",
                    "return openNew('" + getServletName() +
                    "?format=print','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            pb = new CUHtmlPushButton("BUTTON", "download", "Downloadable Form",
                    "return openNew('" + getServletName() +
                    "?format=download','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);
            table.getRowAt(0).getCell(2).setWidth("90%");
            table.getRowAt(0).getCell(5).setAlign("right");

            aForm.add(table);
            aForm.add("<br>");
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aPackage  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String createFlatTable(CUSortVector aPackage) {

        String nbsp = "&nbsp;";
        String var = null;
        String key = "";
        boolean newRow = false;
        Hashtable hash = null;

        String objectKey = "";

        int size = aPackage.size();
        int counter = 0;
        Vector used = new Vector();

        removeAllJavaScript();

        Vector headerList = (Vector) aPackage.elementAt(0);          // lists all used OIDs
        CUSortVector keyList = (CUSortVector) aPackage.elementAt(1); // lists hashTablekeys
        int keySize = keyList.size();
        Vector subSubtables = (Vector) aPackage.elementAt(2);        // contains all subtable
                                                                     // objects that have a one to
                                                                     // many relationship
        int subs = subSubtables.size();

        Vector columns = keyList.getColumnNames();
        int cols = columns.size();

        StringBuilder html = new StringBuilder(0);

        html.append("<style>.special{font-family: 'Arial';}</style>\n");
        html.append("<table border=\"1\" cellspacing=\"0\">\n<tbody>\n<tr>");

        for (int i = 0; i < cols; i++) {
            var = (String) columns.elementAt(i);

            if ((var == null) || (var.length() < 2)) var = "&nbsp;";

            html.append("<th bgcolor=\"#cccccc\" class=\"special\">");
            html.append(var);
            html.append("</th>");
        }

        for (int i = 0; i < subs; i++) {

            Vector subSubtable = (Vector) subSubtables.elementAt(i);

            CUSortVector objectKeys = (CUSortVector) subSubtable.elementAt(1);
            Vector objCols = objectKeys.getColumnNames();
            int oCols = objCols.size();

            for (int x = 0; x < oCols; x++) {
                var = (String) objCols.elementAt(x);

                if ((var == null) || (var.length() < 2)) var = "&nbsp;";

                html.append("<th bgcolor=\"#cccccc\" class=\"special\">");
                html.append(var);
                html.append("</th>");
            }

        }

        html.append("</tr>\n");

        for (int i = 3; i < size; i++) {
            hash = (Hashtable) aPackage.elementAt(i);
            html.append("<tr>");

            for (int j = 2; j < keySize; j++) {
                var = (String) hash.get(keyList.elementAt(j));

                if ((var == null) || (var.length() < 2)) var = "&nbsp;";

                html.append("<td bgcolor=\"#ffffff\" class=\"special\">");
                html.append(var);
                html.append("</td>");
            }

            for (int j = 0; j < subs; j++) {
                Vector subSubtable = (Vector) subSubtables.elementAt(j);
                CUSortVector objectKeys = (CUSortVector) subSubtable.elementAt(1);
                int oCols = objectKeys.size();
                int num = -1 + i;
                hash = (Hashtable) subSubtable.elementAt(num);

                for (int y = 2; y < oCols; y++) {
                    var = (String) hash.get(objectKeys.elementAt(y));

                    if ((var == null) || (var.length() < 2)) var = "&nbsp;";

                    html.append("<td width=\"64\" bgcolor=\"#ffffff\" class=\"special\">");
                    html.append(var);
                    html.append("</td>");
                }
            }

            html.append("</tr>\n");
        }

        html.append("</tbody>\n</table>\n");

        return html.toString();
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aPackage  TODO: DOCUMENT ME!
     * @param   phOID     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String createNestedChildTable(Vector aPackage, String phOID) {

        int size = aPackage.size();
        boolean newRow = false;
        String key = "";
        int num = 0;
        String var = "";
        String nbsp = "&nbsp;";

        Vector objectList = (Vector) aPackage.elementAt(0);          // lists all used OIDs
        int obs = objectList.size();
        CUSortVector keyList = (CUSortVector) aPackage.elementAt(1); // lists hashTablekeys
        Vector used = new Vector();

        StringBuilder html = new StringBuilder(0);

        Vector columns = keyList.getColumnNames();
        int cols = columns.size();
        Hashtable hash = null;

        html.append("<table bgcolor=\"#aaaaaa\" cellspacing=\"1\" width=\"100%\">\n<thead>\n<tr>");

        for (int i = 0; i < cols; i++) {
            html.append("<th bgcolor=\"#dfdfdf\"><font face=\"Verdana\" size=\"1\">");
            html.append(columns.elementAt(i));
            html.append("</font></th>");
        }

        html.append("</tr>\n</thead>\n<tbody>\n");

        for (int i = 2; i < obs; i++) {
            newRow = false;
            hash = (Hashtable) aPackage.elementAt(i);

            if (!used.contains(hash.get(keyList.elementAt(1)))) {

                if (phOID.equalsIgnoreCase((String) hash.get("hid"))) {
File Line
edu/columbia/rascal/presentation/irb/pages/HzAttestationSearchView.java 52
edu/columbia/rascal/presentation/irb/pages/IrbProtocolSearchView.java 51
    public HzAttestationSearchView(String aMode) {
        super();

        setMainTitle("Protocol Search");
        addJavaScriptElement(new CUHtmlText(getJSCodeFrom("srchHelp.js")));
        addItems();
        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /** IrbSearchMenuView constructor comment. */
    public void addItems() {


        setTitle("RASCAL Human Subjects Protocol Search");


        CUHtmlText txtSpaces = new CUHtmlText("");
        txtSpaces.addSpaces(10);
        getAForm().add(txtSpaces);

        CUHtmlText txt1 = new CUHtmlText(
                "To retrieve all protocols that you have access to, simply press"
                );
        txt1.setFontName(getDefaultFontName());
        txt1.setIsBold(true);
        txt1.setFontSize("2");
        getAForm().add(txt1);

        CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "    Search     ");
        getAForm().add(pb1);

        CUHtmlText txt2 = new CUHtmlText(
                "&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp OR to narrow down your results, include any of the fields below:"
                );
        txt2.setFontName(getDefaultFontName());
        txt2.setFontSize("-2");
        txt2.addBreaks(2);
        getAForm().add(txt2);
        getAForm().add("<BR> <BR>");

        getAForm().add(buildSearchFields());

        getAForm().add(getButtons());


        add(getAForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable buildSearchFields() {

        // set main table for page:
        Vector columns = new Vector(2);
        columns.addElement("");
        columns.addElement("");

        int row = 0;

        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellPading(0);
        aTable.setCellSpacing(0);


        columns.setElementAt(new CUHtmlEntryField("RascalUserUni", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Uni  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelLeftFor("OR"), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("RascalUser", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Last Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelFor("&nbsp "), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("&nbsp  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;


        columns.setElementAt(new CUHtmlEntryField("paperProtocolNumber", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Paper Protocol Number  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("previousProtocolNumber", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Previous Protocol Number  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("OriginatingDepartment", "5", "3", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Originating Department Code  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("OriginatingDepartmentName", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Originating Department Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("DrugDeviceBiologic", "30", "30", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Drug, Device, or Biologic  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("HumanSpecimen", "30", "30", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Human Specimen  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("Title", "50", "50", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Title  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getBooleanWidgetFor(INVALID, false), 1);
File Line
edu/columbia/rascal/presentation/irb/pages/IrbProtocolAdminChairSearchView.java 170
edu/columbia/rascal/presentation/irb/pages/IrbProtocolSearchView.java 93
        getAForm().add(buildSearchFields());

        getAForm().add(getButtons());


        add(getAForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable buildSearchFields() {

        // set main table for page:
        Vector columns = new Vector(2);
        columns.addElement("");
        columns.addElement("");

        int row = 0;

        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellPading(0);
        aTable.setCellSpacing(0);


        columns.setElementAt(new CUHtmlEntryField("RascalUserUni", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Uni  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelLeftFor("OR"), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("RascalUser", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Last Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelFor("&nbsp "), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("&nbsp  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;


        columns.setElementAt(new CUHtmlEntryField("paperProtocolNumber", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Paper Protocol Number  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("previousProtocolNumber", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Previous Protocol Number  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("OriginatingDepartment", "5", "3", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Originating Department Code  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("OriginatingDepartmentName", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Originating Department Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("DrugDeviceBiologic", "30", "30", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Drug, Device, or Biologic  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("HumanSpecimen", "30", "30", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Human Specimen  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("Title", "50", "50", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Title  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getBooleanWidgetFor(INVALID, false), 1);
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaPDFUtilityView.java 212
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaPDFView.java 203
        		timeStamp, styleLeft, theStyle
            );

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  secTitle  TODO: DOCUMENT ME!
     */
    public void addSectionTitle(String secTitle) {

        if (needNextPage(getHeight(), theStyle)) {
            setHeight(getPageHeight() - getTopPageMargin());
            newPage(getPageLayout());
        }

        drawFrame();
        addSectionTitleLabel(secTitle);

        setHeight(getHeight());
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  secTitle  TODO: DOCUMENT ME!
     */
    public void addSectionTitleLabel(String secTitle) {

        secTitle = getPDFPage().getStyle().getFont().requote(secTitle, Locale.getDefault());
        theStyle.setFont(fontTimes.versionBold(), fontSize12);
        theStyle.setTextAlign(PDFStyle.TEXTALIGN_CENTER);
        theStyle.setFillColor(java.awt.Color.black);
        theStyle.setTextUnderline(false);

        int numPage = getPDFObject().getNumberOfPages();

        setLeftStarting(getPageWidth() - getRightPageMargin());
        setRightStarting(getLeftStarting());

        addContent(secTitle, "", theStyle);
        setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());

    }

    /** @see  edu.columbia.rascal.presentation.common.pdf.CURascalPDFFormConstruction#addSpecialOnNewPage() */
    @Override public void addSpecialOnNewPage() {

        if (getPDFPage() != null) { /*PDFStyle style = new PDFStyle();
                                     * style.setLineColor(java.awt.Color.gray);
                                     * style.setFillColor(java.awt.Color.black);
                                     * style.setFont(fontCourier, 8); getPDFPage().setStyle(style);
                                     * getPDFPage().drawText("Agenda Number: " +
                                     * getAgendaNumberForDataSheet() + "     Committee: " +
                                     * IrbCommittee.getByOid(getAgendaView().getAgendaHeader().getCommitteeId()).getCommitteeName()
                                     * ,getLeftPageMargin(), 19);style = null;*/
        }

    }

    /**
     * @see  edu.columbia.rascal.presentation.common.pdf.CURascalPDFFormConstruction#addTitle(java.lang.String)
     */
    @Override public void addTitle(String title) {
        theStyle.setFont(fontTimes.versionBold(), fontSize18);
        addTitle(title, theStyle);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  vLabel    TODO: DOCUMENT ME!
     * @param  xy        TODO: DOCUMENT ME!
     * @param  theStyle  TODO: DOCUMENT ME!
     */
    public void addUnderLinedLabel(Vector vLabel, float xy[], PDFStyle theStyle) {
        theStyle.setTextUnderline(true);
        theStyle.setFont(ttfFontTimesB, fontDefaultSize);
        addVectorContent(vLabel, xy, theStyle);
        theStyle.setTextUnderline(false);
        theStyle.setFont(fontDefault, fontDefaultSize);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  vLabel         TODO: DOCUMENT ME!
     * @param  xy             TODO: DOCUMENT ME!
     * @param  theStyle       TODO: DOCUMENT ME!
     * @param  labelFontSize  TODO: DOCUMENT ME!
     * @param  textFontSize   TODO: DOCUMENT ME!
     */
    public void addUnderLinedLabel(Vector vLabel, float xy[], PDFStyle theStyle, int labelFontSize,
        int textFontSize
        ) {
        theStyle.setTextUnderline(true);
        theStyle.setFont(ttfFontTimesB, labelFontSize);
        addVectorContent(vLabel, xy, theStyle);
        theStyle.setTextUnderline(false);
        theStyle.setFont(fontDefault, textFontSize);
        setHeight(getHeight() - 10);
    }

    /**
     * @see  edu.columbia.rascal.presentation.common.pdf.CURascalPDFFormConstruction#addVectorContentWithCellPadding(java.util.Vector,
     *       float[], org.faceless.pdf2.PDFStyle, int)
     */
    @Override public void addVectorContentWithCellPadding(Vector v, float p[], PDFStyle style,
        int cellPad
        ) {
        super.addVectorContentWithCellPadding(v, p, style, cellPad);
        setHeight(getHeight() + (PDFPage.UNITS_POINTS / 2));
    }

    /** TODO: DOCUMENT ME! */
    public void drawFrame() {
        setFrameStyle(Color.lightGray, Color.black);
        getPDFPage().setStyle(theStyle);
        getPDFPage().drawRectangle(getLeftPageMargin(), getHeight() + theStyle.getFontSize(),
            getPageWidth() - getRightPageMargin(), getHeight() - (theStyle.getFontSize() / 4)
            );

    }

    /**
     * Insert the method's description here. Creation date: (8/25/2005 1:32:14 PM)
     *
     * @return  edu.columbia.rascal.presentation.agenda.models.IrbAgendaHeader
     */
    public IrbAgendaHeader getAgendaHeader() {
        return agendaHeader;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String getAgendaNumberForDataSheet() {
        return agendaNumber;
    }

    /**
     * Insert the method's description here. Creation date: (5/22/2003 11:25:00 AM)
     *
     * @return  edu.columbia.rascal.presentation.agenda.pages.IrbAgendaHtmlView
     *
     * @author  Frances Wang
     */
    public IrbAgendaHtmlView getAgendaView() {
        return agendaView;
    }

    /**
     * Insert the method's description here. Creation date: (2/12/2004 2:09:52 PM)
     *
     * @param   eventName  TODO: DOCUMENT ME!
     *
     * @return  java.lang.String
     */
    public String getDisplayStringFor(String eventName) {
        String displayString = "";
        boolean nr = false;

        if (eventName.startsWith(IrbNameConstants.NON_RASCAL)) {
            nr = true;
            eventName = eventName.substring(11);
        }

        if (eventName.equals(IrbNameConstants.PROTOCOL_HEADER))
            displayString = "New Protocol";
        else if (eventName.equals(IrbNameConstants.ADVERSE_EVENT))
            displayString = "Adverse Event";
        else if (eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED))
            displayString = eventName + " Protocol";
        else if (eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM))
            displayString = "Unanticipated Problem";
        else
            displayString = eventName;

        if (nr) displayString = IrbNameConstants.NON_RASCAL + displayString;

        return displayString;
    }

    /**
     * Insert the method's description here. Creation date: (9/19/2005 12:33:07 PM)
     *
     * @return  boolean
     */
    public boolean isDatabase() {
        return database;
    }

    /**
     * Insert the method's description here. Creation date: (11/4/2002 1:42:31 PM)
     *
     * @param   eventName  TODO: DOCUMENT ME!
     *
     * @return  boolean
     */
    public boolean isProtocol(String eventName) {

        return eventName.equals(IrbNameConstants.PROTOCOL_HEADER) || eventName.equals(IrbNameConstants.EXPEDITED) ||
                eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.RENEWAL) ||
                eventName.equals(IrbNameConstants.MODIFICATION) || eventName.equals(PENDING);

    }

    /**
     * Insert the method's description here. Creation date: (8/25/2005 1:32:14 PM)
     *
     * @param  newAgendaHeader  edu.columbia.rascal.presentation.agenda.models.IrbAgendaHeader
     */
    public void setAgendaHeader(IrbAgendaHeader newAgendaHeader) {
        agendaHeader = newAgendaHeader;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  agendaNumber  TODO: DOCUMENT ME!
     */
    public void setAgendaNumberForDataSheet(String agendaNumber) {
        this.agendaNumber = agendaNumber;
    }

    /**
     * Insert the method's description here. Creation date: (5/22/2003 11:25:00 AM)
     *
     * @param   newAgendaView  edu.columbia.rascal.presentation.agenda.pages.IrbAgendaHtmlView
     *
     * @author  Frances Wang
     */
    public void setAgendaView(IrbAgendaHtmlView newAgendaView) {
        agendaView = newAgendaView;
    }

    /**
     * Insert the method's description here. Creation date: (9/19/2005 12:33:07 PM)
     *
     * @param  newDatabase  boolean
     */
    public void setDatabase(boolean newDatabase) {
        database = newDatabase;
    }

    /**
     * Insert the method's description here. Creation date: (05/21/2003 12:43:37 PM)
     *
     * @author  Frances Wang
     */
    public void setDataSheetFeature() {

        fontDefault = ttfFontTimes;
        fontDefaultSize = fontSize12;
        theStyle.setFont(ttfFontTimes, fontSize12);
        theStyle.setFillColor(java.awt.Color.black);
        theStyle.setTextAlign(PDFStyle.TEXTALIGN_LEFT);
        setPageFeature(theStyle);

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  fillColor  TODO: DOCUMENT ME!
     * @param  lineColor  TODO: DOCUMENT ME!
     */
    public void setFrameStyle(Color fillColor, Color lineColor) {
        theStyle.setFillColor(fillColor);
        theStyle.setLineColor(lineColor);
    }
}
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 494
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 226
                toString((Date) queueItem.get(KEY_RELEASE_FOR_VIEW_DATE))
                )
            );
        aCell.setAlign("center");
        colNum++;

        // P.I.
        aCell = aTable.getCell(rowCount, colNum);
        aCell.add(getTableCellData((String) queueItem.get(KEY_NAME_UNI)));
        aCell.setAlign("left");
        colNum++;

        // Species
        aCell = aTable.getCell(rowCount, colNum);
        aCell.add(getTableCellData((String) queueItem.get(KEY_SPECIES)));
        aCell.setAlign("left");
        colNum++;

        // Primary Site
        aCell = aTable.getCell(rowCount, colNum);
        aCell.add(getTableCellData(
                decodeAnimalCarePrimarySite((String) queueItem.get(KEY_PRIMARY_SITE))
                )
            );
        aCell.setAlign("left");
        colNum++;

        // Current Status
        aCell = aTable.getCell(rowCount, colNum);

        String param1 = (String) queueItem.get(KEY_CURRENT_STATUS);
        String convert1 = getAnimalCareStatusDisplayValue(param1.trim());

        if (convert1 == null) convert1 = "Still Creating...";

        aCell.add(getTableCellData(convert1));
        aCell.setAlign("left");
        colNum++;

        // Highest Pain Level
        aCell = aTable.getCell(rowCount, colNum);

        String level = "n/a";

        if (((String) queueItem.get(KEY_PAIN_LEVEL4)).equalsIgnoreCase("y")) {
            level = "4";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL3)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "3";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL2)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "2";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL1)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "1";
        }

        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix F
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_ISO_REQ) != null) &&
                (queueItem.get(KEY_RADIO_ISO_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // Strong Radio Frequencies
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_FREQ_REQ) != null) &&
                (queueItem.get(KEY_RADIO_FREQ_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // XRay
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_XRAY_REQ) != null) &&
                (queueItem.get(KEY_XRAY_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBReportView.java 232
edu/columbia/rascal/presentation/appendix/pages/AppendixCReportView.java 288
        aCell2 = utilGetHtmlTableCell("", "500", "left");
        aCell1.setColumnsToSpan(2);

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // gather safety officer approval data
            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = approvalDate.toString();

                if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
            }

            // spacer
            addSpacerRows(aTable, 1, 2, "8");

            // Biosafety Officer
            aRow = new CUHtmlTableRow();

            String name = NOT_YET_APPROVED;

            if (approver > 0)
                name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_SAFETY_OFFICER), "300",
                    getTitleAlign()
            );
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(name), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            // Biosafety approval date
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                    getTitleAlign()
            );
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(approvalDateStr), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            // Biosafety approval number
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_NUMBER), "300",
                    getTitleAlign()
            );
            textValue = (getTracker().getEhsNumber() == null) ? "" : getTracker().getEhsNumber();
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
File Line
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 239
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 416
        Vector columns = new Vector(3);
        columns.addElement(formatLabel("Available"));
        columns.addElement(formatLabel("Move"));
        columns.addElement(formatLabel("Selected (maximum " + maxSelect + ")"));
        getTable().addRowFor(columns);

        int listSize = available.size() + selected.size();
        int maxLength = 30;
        String dummy = "X";
        String spaceString = "";
        StringBuffer cellBuffer = new StringBuffer(200);

        // set up cell 0:
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(availableName);
        cellBuffer.append("\">\n");

        if (available.size() == 0) { // construct a "stretcher" record to
                                     // make the list box wide enough in
                                     // Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < available.size(); i++) {
                String availableString = (String) available.elementAt(i);
                int index = availableString.indexOf(";");
                String key = availableString.substring(0, index);
                String value = availableString.substring(index + 1);

                if (value.length() > maxLength) maxLength = value.length();

                cellBuffer.append("<option value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</option>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 0);

        // set up cell 1:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append(
            "<INPUT VALUE=\">>\" TYPE=\"BUTTON\" NAME=\"availableToSelected\" onClick=\"moveToSelected('"
            );
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("','");
        cellBuffer.append(maxSelect);
        cellBuffer.append("')\">");
        cellBuffer.append("\n<br>\n");
        cellBuffer.append(
            "<INPUT VALUE=\"<<\" TYPE=\"BUTTON\" NAME=\"selectedToAvailable\" onClick=\"moveFromTo('"
            );
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("')\">\n");

        columns.setElementAt(cellBuffer.toString(), 1);

        // set up cell 2:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(selectedName);
        cellBuffer.append("\">\n");

        if (selected.size() == 0) { // construct a "stretcher" record to make
                                    // the list box wide enough in Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < selected.size(); i++) {
                String selectedString = (String) selected.elementAt(i);
                int index = selectedString.indexOf(";");
                String key = selectedString.substring(0, index);
                String value = selectedString.substring(index + 1);
                cellBuffer.append("<OPTION value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</OPTION>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 2);
        getTable().addRowFor(columns);

        for (int i = 0; i < 2; i++) {
            getTable().getCell(i, 0).setAlign("CENTER");
            getTable().getCell(i, 0).setWidth("45%");
            getTable().getCell(i, 1).setAlign("CENTER");
            getTable().getCell(i, 1).setWidth("10%");
            getTable().getCell(i, 2).setAlign("CENTER");
            getTable().getCell(i, 2).setWidth("45%");
        }

    }

    /**
     * Creates a new $class.name$ object.
     *
     * @param  availableName  TODO: DOCUMENT ME!
     * @param  available      TODO: DOCUMENT ME!
     * @param  selectedName   TODO: DOCUMENT ME!
     * @param  selected       TODO: DOCUMENT ME!
     * @param  fontName       TODO: DOCUMENT ME!
     * @param  formName       TODO: DOCUMENT ME!
     * @param  maxSelect      TODO: DOCUMENT ME!
     * @param  tableWidth     TODO: DOCUMENT ME!
     */
    public CUHtmlMoveToSelectList(String availableName, // unique name for
                                                        // available items
                                                        // list
        Vector available,                               // available items
                                                        // list
        String selectedName,                            // unique name for
                                                        // selected items
                                                        // list
        Vector selected,                                // selected items
                                                        // list
        String fontName,                                // name of font for
                                                        // labels
        String formName,                                // name of form in
File Line
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 242
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 419
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 594
        columns.addElement(formatLabel("Selected (maximum " + maxSelect + ")"));
        getTable().addRowFor(columns);

        int listSize = available.size() + selected.size();
        int maxLength = 30;
        String dummy = "X";
        String spaceString = "";
        StringBuffer cellBuffer = new StringBuffer(200);

        // set up cell 0:
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(availableName);
        cellBuffer.append("\">\n");

        if (available.size() == 0) { // construct a "stretcher" record to
                                     // make the list box wide enough in
                                     // Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < available.size(); i++) {
                String availableString = (String) available.elementAt(i);
                int index = availableString.indexOf(";");
                String key = availableString.substring(0, index);
                String value = availableString.substring(index + 1);

                if (value.length() > maxLength) maxLength = value.length();

                cellBuffer.append("<option value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</option>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 0);

        // set up cell 1:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append(
            "<INPUT VALUE=\">>\" TYPE=\"BUTTON\" NAME=\"availableToSelected\" onClick=\"moveToSelected('"
            );
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("','");
        cellBuffer.append(maxSelect);
        cellBuffer.append("')\">");
        cellBuffer.append("\n<br>\n");
        cellBuffer.append(
            "<INPUT VALUE=\"<<\" TYPE=\"BUTTON\" NAME=\"selectedToAvailable\" onClick=\"moveFromTo('"
            );
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("')\">\n");

        columns.setElementAt(cellBuffer.toString(), 1);

        // set up cell 2:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(selectedName);
        cellBuffer.append("\">\n");

        if (selected.size() == 0) { // construct a "stretcher" record to make
                                    // the list box wide enough in Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < selected.size(); i++) {
                String selectedString = (String) selected.elementAt(i);
                int index = selectedString.indexOf(";");
                String key = selectedString.substring(0, index);
                String value = selectedString.substring(index + 1);
                cellBuffer.append("<OPTION value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</OPTION>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 2);
        getTable().addRowFor(columns);

        for (int i = 0; i < 2; i++) {
            getTable().getCell(i, 0).setAlign("CENTER");
            getTable().getCell(i, 0).setWidth("45%");
            getTable().getCell(i, 1).setAlign("CENTER");
            getTable().getCell(i, 1).setWidth("10%");
            getTable().getCell(i, 2).setAlign("CENTER");
            getTable().getCell(i, 2).setWidth("45%");
        }

    }

    /**
     * Creates a new $class.name$ object.
     *
     * @param  availableName  TODO: DOCUMENT ME!
     * @param  available      TODO: DOCUMENT ME!
     * @param  selectedName   TODO: DOCUMENT ME!
     * @param  selected       TODO: DOCUMENT ME!
     * @param  fontName       TODO: DOCUMENT ME!
     * @param  formName       TODO: DOCUMENT ME!
     * @param  maxSelect      TODO: DOCUMENT ME!
     * @param  tableWidth     TODO: DOCUMENT ME!
     */
    public CUHtmlMoveToSelectList(String availableName, // unique name for
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingHistoryView.java 183
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingView.java 1242
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // budget end date
        var = "00/00/0000";

        Date end = ptBudget.getProjectBudgetEndDate();

        if (end != null) {
            cal = Calendar.getInstance();
            cal.setTime(end);
            var = CalendarTransformer.toString(cal);
        }

        aWidget = getWidgetFor(var);
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Project End Date"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // direct Cost
        aWidget = getWidgetFor(getLongToDollarStringFor(ptBudget.getProjectBudgetDirectCost()));
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Total Direct Cost"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // total MTDC amount
        aWidget = getWidgetFor(getLongToDollarStringFor(ptBudget.getProjectBudgetMtdcamount()));
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Modified Total Direct Costs (the amount on which the F&A rate can be applied.)"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // indirect Cost
        aWidget = getWidgetFor(getLongToDollarStringFor(ptBudget.getProjectBudgetIndirectCost()));
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Total Indirect Cost"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // total  amount
        aWidget = getWidgetFor(getLongToDollarStringFor(ptBudget.getProjectBudgetTotalAmount()));
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Total Project Amount (Direct + Indirect)"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // if cost share match
        aWidget = getWidgetFor(ptBudget.getCostShareMatch());
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Agency Cost Share/Match Required"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // cost share / match amount
        aWidget = getWidgetFor(getLongToDollarStringFor(ptBudget.getProjectBudgetTotalCostShare()));
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Agency Cost Share/Match Amount"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // Anticipated Award type
        var = "";
        temp = ptBudget.getExpenseType();

        if (temp != null) var = temp;

        aWidget = getWidgetFor(var);
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Anticipated Award Type"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // current Account
        var = "";
        temp = ptBudget.getCurrentAccount();

        if (temp != null) var = temp;

        aWidget = getWidgetFor(var);
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Current Account # (9-99999)"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 146
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 145
edu/columbia/rascal/presentation/appendix/pages/AppendixDSafetyOfficerApprovalView.java 103
edu/columbia/rascal/presentation/appendix/pages/AppendixESafetyOfficerApprovalView.java 148
        String ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                                                                             : REC_PPE_IACUC;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetHtmlText(ppeLabel, defaultFontSize, true, false),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("", "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        Iterator bpList = getBoilerPlateList(KEY_PARM_REC_PPE_REF_ID).iterator();

        while (bpList.hasNext()) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell(fieldGet_3_RecommendedPpe("3"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVER_NOTES + "</b>"),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_7_ApproverNotes("7"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval number
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_NUMBER + "</b>"),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(fieldGet_6_EHSNumber("6"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            String recipientsLabel =
                "Send Approval Notice to:</b><br>(UNIs and/or email addresses separated by commas)";

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(recipientsLabel, defaultFontSize, true,
                        false
                        ), "300", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell(fieldGet_NoticeRecipients("recipients"), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        // set up safety officer approval information
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);
File Line
edu/columbia/rascal/presentation/irb/pages/IrbQueueCancerCenterCorrespondenceView.java 240
edu/columbia/rascal/presentation/irb/pages/IrbQueueChairCorrespondenceView.java 303
    }


    /**
     * Insert the method's description here. Creation date: (2/3/2003 4:22:12 PM)
     *
     * @param  newResultVector  java.util.Vector
     */
    public void setResultVector(java.util.Vector newResultVector) {
        resultVector = newResultVector;
    }

    /**
     * Insert the method's description here. Creation date: (2/3/2003 4:22:12 PM)
     *
     * @param  newResultVector  java.util.Vector
     */
    public void setResultVectorAE(java.util.Vector newResultVector) {
        resultVectorAE = newResultVector;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  row       TODO: DOCUMENT ME!
     * @param  rowColor  TODO: DOCUMENT ME!
     */
    public void setTableDataRow(Vector row, String rowColor) {

        StringBuffer parmString = new StringBuffer();
        StringBuffer buff = new StringBuffer();
        String element0 = (String) row.elementAt(0);
        String element1 = (String) row.elementAt(1);
        String element2 = (String) row.elementAt(2);
        String protocolNumber = element1.substring(0, 8);

        getAForm().add("<TR BGCOLOR=\"" + rowColor + "\" >");

        // 1 protocol link
        getAForm().add("<TD ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\"><A ");
        buff.append("HREF=");
        buff.append(getProtocolLinkStringFor(element1));
        buff.append('>');
        buff.append(getPrefix());
        buff.append(element1);
        buff.append("</FONT></A></TD>");
        getAForm().add(buff.toString());

        // 2 event Name -- data sheet Link
        String eventName = element2;

        if (element2.equals(IrbNameConstants.PROTOCOL_HEADER)) {
            eventName = IrbNameConstants.PROTOCOL;
        }

        buff = new StringBuffer();
        buff.append("<TD ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\"><A ");
        buff.append("HREF=");
        buff.append(getObjectLinkStringFor(eventName, (String) row.elementAt(5), element2, element0)
            );
        buff.append("</FONT></A></TD>");
        getAForm().add(buff.toString());

        // 3 a link to the pop up window for view all correspondence
        CUHtmlImage i = new CUHtmlImage("/images/popup.gif");

        i.setBorderWidth(0);
        i.setAlt("Review All");
        i.setLink("''");
        i.setOnClick("return openNew('" + IrbTreeMainServlet.class.getName() + "?parentOid=" +
                        row.elementAt(5) + "&&parentName=" + element2 +
            "', 'ReviewAllCorrespondence', 'toolbar=no,scrollbars=yes,location=no,directories=no,status=no,menubar=yes,resizable=yes,copyhistory=no,width=700,height=500')"
            );

        getAForm().add("<TD ALIGN=\"center\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">");
        getAForm().add(i);
        getAForm().add("</FONT></A></TD>");

        // Disposition Action cell 4
        getAForm().add("<TD ALIGN=\"center\"><A ");

        parmString = new StringBuffer();
        parmString.append("Javascript:onClick=parent.frames[1].location='");
        parmString.append(IrbLinkFrameServlet.class.getName());
        parmString.append("';parent.frames[2].location='");
        parmString.append(IrbCorrespondenceDispositionServlet.class.getName());
        parmString.append("?correspondenceOid=");
        parmString.append((String) row.elementAt(7));
        parmString.append("&&recipientOid=");
        parmString.append((String) row.elementAt(8));
        parmString.append('\'');

        buff = new StringBuffer();
        buff.append("HREF=");
        buff.append(parmString.toString());
        buff.append('>');
        buff.append("<IMG BORDER=\"0\" ALT=\"Action\" SRC=\"/images/popup.gif\"></A></IMG></TD>");
        getAForm().add(buff.toString());

        // 5 title
        String title = (String) row.elementAt(3);
        String aTitle = "";

        if (title != null) {
            aTitle = title;
            aTitle = ((aTitle.length() > 30) ? aTitle.substring(0, 30) : aTitle);
        }

        buff = new StringBuffer();
        buff.append("<TD ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">");
        buff.append(aTitle);
        buff.append("</FONT></TD>");

        // 6 PI/Initiator
        buff.append("<TD ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">");
        buff.append((String) row.elementAt(4));
        buff.append("</FONT></TD>");

        // 7 Correspondence Author
        buff.append("<TD ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">");
        buff.append((String) row.elementAt(9));
        buff.append("</FONT></TD>");

        // 8 notify date
        buff.append("<TD ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">");
        buff.append(CalendarTransformer.toDateTimeString((String) row.elementAt(6)));
        buff.append("</FONT></TD>");

        buff.append("</TR>");

        getAForm().add(buff.toString());
    }

    /**
     * Insert the method's description here. Creation date: (2/3/2003 4:22:12 PM)
     *
     * @return  java.util.Vector
     */
    protected java.util.Vector getResultVector() {
        return resultVector;
    }

    /**
     * Insert the method's description here. Creation date: (2/3/2003 4:22:12 PM)
     *
     * @return  java.util.Vector
     */
    protected java.util.Vector getResultVectorAE() {
        return resultVectorAE;
    }
}
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingView.java 872
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingView.java 1002
            i.setOnClick("return agencyOpenSearchWindow('agencyName','agencyCode','none')");
            i.setLink("RascalAgencyLookup");
            i.setBorderWidth(0);
            columns.setElementAt(i, 3);
            columns.setElementAt(t, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Select a Sponsor ", "pt27.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;
            columns.setElementAt("", 2); // clear these cells
            columns.setElementAt("", 3);

            // agency code
            aWidget = getHiddenWidgetFor("agencyCode", "");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor(""));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;


            // agency address line 1
            var = "";
            temp = ptBudget.getAddressLine1();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyAddress1", var, "40", "60");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Mailing Address 1", "pt38.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;

            // agency address line 2
            var = "";
            temp = ptBudget.getAddressLine2();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyAddress2", var, "40", "60");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Mailing Address 2", "pt39.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;

            // agency address line 3
            var = "";
            temp = ptBudget.getAddressLine3();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyAddress3", var, "40", "60");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Mailing Address 3", "pt40.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;

            // agency city
            var = "";
            temp = ptBudget.getCity();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyCity", var, "40", "60");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("City", "pt41.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;

            // agency state
            var = "";
            temp = ptBudget.getState();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyState", var, "2", "2");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("State", "pt42.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;

            // agency zip
            var = "";
            temp = ptBudget.getZip();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyZip", var, "10", "10");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Postal Code", "pt43.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;

            // agency country
            var = "";
            temp = ptBudget.getCountry();

            if (temp != null) var = temp;

            aWidget = getEditWidgetFor("agencyCountry", var, "40", "60");
            columns.setElementAt(aWidget, 1);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Country", "pt44.html"));
            aTable.getCell(row, 1).setColumnsToSpan(3);
            row++;
        } else {
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaPDFUtilityView.java 71
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaPDFView.java 70
    public IrbAgendaPDFUtilityView(String layout, boolean database) {
        super(layout, database);

    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  label  TODO: DOCUMENT ME!
     * @param  text   TODO: DOCUMENT ME!
     */
    public void addBoldLabelPlainText(String label, String text) {
        theStyle.setFont(ttfFontTimesB, fontSize12);
        addBoldLabelPlainText(label, text, theStyle);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  label  TODO: DOCUMENT ME!
     * @param  text   TODO: DOCUMENT ME!
     * @param  style  TODO: DOCUMENT ME!
     */
    public void addBoldLabelPlainText(String label, String text, PDFStyle style) {
        setLeftStarting(getPageWidth() - getRightPageMargin());
        setRightStarting(getPageWidth() - getRightPageMargin());

        if (!label.equalsIgnoreCase("")) {
            theStyle.setFont(ttfFontTimesB, theStyle.getFontSize());
            addContent(label, "", theStyle);
        }

        theStyle.setFont(fontDefault, theStyle.getFontSize());

        if (!text.equals("")) {
            addContent(text, "", theStyle);
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  agendaView  TODO: DOCUMENT ME!
     */
    public void addHeader(IrbAgendaHtmlView agendaView) {

        setFrameStyle(Color.lightGray, Color.lightGray);
        getPDFPage().setStyle(theStyle);

        float oriHeight = getHeight();
        addContent(".", ".", theStyle);


        if (!getClass().getName().contains("IrbAgendaPDFDataSheetView")) {
            getPDFPage().drawRectangle(getLeftPageMargin(), getHeight() + 11,
                getPageWidth() - getRightPageMargin(),
                getHeight() + 11 - (theStyle.getFontLeading() * 4)
                );
        } else {
            getPDFPage().drawRectangle(getLeftPageMargin(), getHeight() + 11,
                getPageWidth() - getRightPageMargin(),
                getHeight() + 11 - (theStyle.getFontLeading() * 3)
                );
        }

        theStyle.setFont(fontTimesB, fontSize12);
        theStyle.setFillColor(java.awt.Color.black);
        theStyle.setLineColor(java.awt.Color.black);
        theStyle.setTextAlign(PDFStyle.TEXTALIGN_LEFT);

        PDFStyle styleLeft = (PDFStyle) theStyle.clone();
        styleLeft.setTextAlign(PDFStyle.TEXTALIGN_RIGHT);
        oriHeight = getHeight();

        setLeftStarting(getPageWidth() / 4);
        setRightStarting(getLeftStarting() + 10);

        String agendaNum = getNotNullString(agendaView.getAgendaHeader().getAgendaNumber(), "");
        setAgendaNumberForDataSheet("AG-" + agendaNum);
        addContent("Agenda Number: ", "AG-" + agendaNum, styleLeft, theStyle);

        String createdDate = getNotNullString(CalendarTransformer.formatMMDDYYYY(
                    agendaView.getAgendaHeader().getCreationDate()
                    ), ""
                );
        addContent("Date Created: ", createdDate, styleLeft, theStyle);

        if (!getClass().getName().contains("IrbAgendaPDFDataSheetView")) {
            String beginTime = getNotNullString(CalendarTransformer.toTimeString(
                        agendaView.getAgendaHeader().getMeetingBeginTime()
                        ), ""
                    );
            addContent("Meeting Begin Time: ", beginTime, styleLeft, theStyle);
        }

        addContent("Committee: ",
            ServiceLocator.getIrbCommitteeService().findById(
                agendaView.getAgendaHeader().getCommitteeId()
                ).getCommitteeName(), styleLeft, theStyle
            );


        // right part
        setLeftStarting(getPageWidth() * 2 / 3);
        setRightStarting(getLeftStarting() + 10);
        setHeight(oriHeight);

        String status = getNotNullString(ServiceLocator.getIrbAgendaHeaderService()
                .getCurrentStatus(agendaView.getAgendaHeader()).getStatusName(), ""
                );

        if (!getClass().getName().contains("IrbAgendaPDFDataSheetView")) {
            addContent("Minutes Status: ", status, styleLeft, theStyle);
        } else {
            addContent("Agenda Status: ", status, styleLeft, theStyle);
        }

        String meetingDate = getNotNullString(CalendarTransformer.formatMMDDYYYY(
                    agendaView.getAgendaHeader().getMeetingDate()
                    ), ""
                );
        addContent("Meeting Date: ", meetingDate, styleLeft, theStyle);

        if (!getClass().getName().contains("IrbAgendaPDFDataSheetView")) {
            String endTime = getNotNullString(CalendarTransformer.toTimeString(
                        agendaView.getAgendaHeader().getMeetingEndTime()
                        ), ""
                    );
            addContent("Meeting End Time: ", endTime, styleLeft, theStyle);
        }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsDateRangeView.java 59
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsFirstSubmissionDateRangeView.java 57
        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /** Insert the method's description here. Creation date: (1/2/2003 11:34:23 AM) */
    public void addFields() {


        // set the number of cells in the table here:
        // (all "addRow" methods should be set up for this
        // number of cells per row)
        int numCells = 4;

        CUHtmlForm aForm = getAForm();

        // Create the overall table for the page:
        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);

        // Add general fields:
        addGeneralRows(aTable, numCells);
        aTable.getCell(0, 0).setWidth("30%");

        aForm.add(aTable);
        aForm.add("<BR>");
        aForm.add(performMethod("getActionButtons", null));
        aForm.add("<BR>");

        CUHtmlTable anOutputTable = new CUHtmlTable();
        anOutputTable.setBorderWidth(0);

        Vector aRow = new Vector(2);

        aRow.addElement("");

        // aRow.addElement("<font face = \"Comic Sans MS\" size = \"1\">*Hold down the Command key
        // (MAC) or Control key (Windows) to select multiple fields.</font>");
        aRow.addElement("");
        anOutputTable.addRowFor(aRow);
        anOutputTable.getCell(0, 0).setWidth("5%");
        anOutputTable.getCell(0, 1).setWidth("95%");


        aForm.add(anOutputTable);
        getAForm().add(getHiddenWidgetFor("dateValid", "true"));

        add(aForm);

    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {
        Calendar start = Calendar.getInstance();
        start.add(Calendar.MONTH, -6); // Go back 6 months

        String startDate = CalendarTransformer.toString(start);
        String endDate = CalendarTransformer.toString(Calendar.getInstance());

        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        Object aWidget;

        aTable.setCellSpacing(15);


        aWidget = getWidgetFor("You may select a date range of up to 6 months in length.");
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        columns.setElementAt(getDateTable(startDate, "startDate", "startDateMonth", "startDateDay",
                "startDateYear"
                ), 1
            );
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Submitted Between "));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;


        columns.setElementAt(getDateTable(endDate, "endDate", "endDateMonth", "endDateDay",
                "endDateYear"
                ), 1
            );
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("And "));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;


        // affiliated institution- multi select list
        aWidget = getFieldMultiSelectWidget();
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Select Fields *"));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        aWidget = getWidgetFor(
                "*Hold down the Command key (MAC) or Control key (Windows) to select multiple fields."
                );
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

    }

    /**
     * Insert the method's description here. Creation date: (1/2/2003 11:43:27 AM)
     *
     * @return  java.lang.String
     */
    public String getAction() {
        return action;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Submit",
                    "checkDateForSubmit(startDate);checkDateForSubmit(endDate);return isDateValid()"
                    );
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
        }


        return aTable;
    }

    /**
     * Insert the method's description here. Creation date: (1/2/2003 11:41:52 AM)
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public final CUHtmlForm getAForm() {
        return aForm;
    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  CUHtmlList
     */
    public Object getFieldMultiSelectWidget() {

        EVector list = new EVector();


        list.addElement("ProtocolNumber");
        list.addElement("ProductType");
        list.addElement("ProductName");
        list.addElement("Manufacturer");
        list.addElement("PI");

        // list.addElement("Committee");

        list.addElement("Submitted");
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixESafetyOfficerApprovalView.java 219
edu/columbia/rascal/presentation/appendix/pages/AppendixISafetyOfficerApprovalView.java 140
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();


                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
    }

    /**
     * NOTE: method name is not desciptive of its function in this view
     *
     * <p>This method was created in VisualAge.</p>
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlItem
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected CUHtmlItem fieldGet_1_ReviewAndApproveText() throws Exception {
        StringBuffer aChemBuffer = new StringBuffer(500);
        Set<AppendixChemical> chems = ((AppendixE) getAppendixObject()).getAppendixChemicals();
        int siz = chems.size();
        int i = 0;
        Iterator it = chems.iterator();

        while (it.hasNext()) {
            AppendixChemical chem = (AppendixChemical) it.next();
            aChemBuffer.append((String) chem.getName());

            if ((i + 1) < siz) {
                aChemBuffer.append(", ");
            }

            i++;
        }

        if (siz < 1) aChemBuffer.append("&nbsp;&nbsp; n/a &nbsp;&nbsp;");

        return new CUHtmlText("<font face=\"" + getDefaultFontName() + "\" size=\"2\"color=black>" + APPROVAL_TEXT1 + "&nbsp;<b><u>" + aChemBuffer.toString() + "</u>.</b>");
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  String value of the Appendix letter, e.g. "A", "C", etc. This letter appears in the
     *          Appendix title - "APPENDIX A".
     */
    @Override protected String infoGetAppendixLetter() {
        return APPENDIX_LETTER;
File Line
edu/columbia/rascal/presentation/agenda/jdbc/IrbAgendaReportQuery.java 1060
edu/columbia/rascal/presentation/agenda/jdbc/IrbAgendaReportQuery.java 1187
    public static Vector getProtocolChildrenFor(String protocolNumber) {

        Vector results = new Vector(0);
        Vector row = new Vector(2);


        try { // protocols

            java.sql.ResultSet res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getNewProtocolsForProtNumberSql(protocolNumber, "N", "not in")
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.PROTOCOL_HEADER);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


            // expedited
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getExProtForProtNumberSql(protocolNumber, "N", "in")
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.EXPEDITED);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


            // exempt
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getExProtForProtNumberSql(protocolNumber, "Y", "not in")
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.EXEMPT);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


            // renewals
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getRenewalsForProtNumberSql(protocolNumber)
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.RENEWAL);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


            // modifications
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getModificationsForProtNumberSql(protocolNumber)
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.MODIFICATION);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


            // adverse events
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getAdverseEventsForProtNumberSql(protocolNumber)
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.ADVERSE_EVENT);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


            // unanticipate
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getUnanticipateForProtNumberSql(protocolNumber)
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.UNANTICIPATED_PROBLEM);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }



            // closure
            res = ServiceLocator.getCURascalJdbcAccessorService().executeQuery(
                    getClosureForProtNumberSql(protocolNumber)
                    );

            while (res.next()) {
                row.addElement(IrbNameConstants.CLOSURE);
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString());
                results.addElement(row);
                row = new Vector(2);
            }


        } catch (Exception e) {
            log.error(e);
        }

        return results;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   protocolNumber  TODO: DOCUMENT ME!
     * @param   acc             TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static Vector getProtocolChildrenFor(String protocolNumber, CURascalJdbcAccessor acc) {
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingHistoryView.java 342
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingView.java 1393
            var = "";
            temp = ptBudget.getAgencyName();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Agency Name"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency address line 1
            var = "";
            temp = ptBudget.getAddressLine1();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Address Line 1"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency address line 2
            var = "";
            temp = ptBudget.getAddressLine2();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Address Line 2"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency address line 3
            var = "";
            temp = ptBudget.getAddressLine3();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Address Line 3"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency city
            var = "";
            temp = ptBudget.getCity();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("City"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency state
            var = "";
            temp = ptBudget.getState();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("State"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency zip
            var = "";
            temp = ptBudget.getZip();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Zip"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;

            // agency country
            var = "";
            temp = ptBudget.getCountry();

            if (temp != null) var = temp;

            aWidget = getWidgetFor(var);
            columns.setElementAt(aWidget, 2);
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).add(getRowLabelFor("Country"));
            aTable.getCell(row, 1).add("");
            aTable.getCell(row, 2).setColumnsToSpan(2);
            row++;
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovedCountView.java 334
edu/columbia/rascal/presentation/irb/pages/IrbReportSubmissionCountView.java 331
        aTable.getCell(0, 6).setWidth("10%");


    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  results  TODO: DOCUMENT ME!
     * @param  aTable   TODO: DOCUMENT ME!
     */
    public void getReportWidget(Vector results, CUHtmlTable aTable) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        CUHtmlTableCell aCell = new CUHtmlTableCell();


        String aTitle;
        CUHtmlTableCell header;
        String avgValue = null;

        Vector columns = getColumns();
        int colSize = columns.size();

        for (int i = 0; i < colSize; i++) {
            aTitle = ((String) columns.elementAt(i));
            aCell = new CUHtmlTableCell();
            aCell.add(getTextWidgetFor(aTitle, 2, false));
            aCell.setAlign("right");
            aRow.add(aCell);
        }

        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        columns = getSecondRows();

        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("", 1, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        for (int i = 1; i < 4; i++) {
            aTitle = ((String) columns.elementAt(i));
            aCell = new CUHtmlTableCell();
            aCell.add(getThreeElementsTable("FB", "EXE", "EXP"));
            aCell.setAlign("right");
            aRow.add(aCell);
        }

        for (int i = 4; i < colSize; i++) {
            aTitle = ((String) columns.elementAt(i));
            aCell = new CUHtmlTableCell();
            aCell.add(getTextWidgetFor(aTitle, 1, false));
            aCell.setAlign("right");
            aRow.add(aCell);
        }

        aTable.add(aRow);

        Vector committeIds = ServiceLocator.getIrbCommitteeService().getCommitteeNames();

        int rows = results.size();

        for (int i = 0; i < rows; i++) {
            aRow = new CUHtmlTableRow();

            Vector currentRow = (Vector) results.elementAt(i);

            // committeeId
            aCell = new CUHtmlTableCell();
            aCell.add(getTextWidgetFor((String) committeIds.elementAt(i), 2, false));
            aCell.setAlign("right");
            aRow.add(aCell);


            // new protocols
            aCell = new CUHtmlTableCell();
            aCell.add(getThreeElementsTable(currentRow.elementAt(0) + "",
                    currentRow.elementAt(1) + "", currentRow.elementAt(2) + ""
                    )
                );
            aCell.setAlign("right");
            aRow.add(aCell);

            // renewals
            aCell = new CUHtmlTableCell();
            aCell.add(getThreeElementsTable(currentRow.elementAt(3) + "",
                    currentRow.elementAt(4) + "", currentRow.elementAt(5) + ""
                    )
                );
            aCell.setAlign("right");
            aRow.add(aCell);

            // mods
            aCell = new CUHtmlTableCell();
            aCell.add(getThreeElementsTable(currentRow.elementAt(6) + "",
                    currentRow.elementAt(7) + "", currentRow.elementAt(8) + ""
                    )
                );
            aCell.setAlign("right");
            aRow.add(aCell);

            // AE
            aCell = new CUHtmlTableCell();
            aCell.add(getTextWidgetFor((String) currentRow.elementAt(9), 2, false));
            aCell.setAlign("right");
            aRow.add(aCell);

            // Term
            aCell = new CUHtmlTableCell();
            aCell.add(getTextWidgetFor((String) currentRow.elementAt(10), 2, false));
            aCell.setAlign("right");
            aRow.add(aCell);

            // UP
            aCell = new CUHtmlTableCell();
            aCell.add(getTextWidgetFor((String) currentRow.elementAt(11), 2, false));
            aCell.setAlign("right");
            aRow.add(aCell);

            aTable.add(aRow);
        }

        aTable.getCell(0, 0).setWidth("9%");
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFUtilityView.java 83
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFView.java 84
        setAgendaView(new IrbAgendaMinutesDataSheetUtilityView());
        getAgendaView().setAgendaHeader((IrbAgendaHeader) bo);
        getAgendaView().setRascalUser(aUser);


        unitXy = (getPageWidth() - getLeftPageMargin() - getRightPageMargin()) / 100;

        try {
            constructPDF();
            addMeetingAttendants(meetingAttendants);
            addAttendanceNotes();

            long agendaHeaderOid = ((IrbAgendaHeader) bo).getId();

            // add protocol
            if (protocolAttached.size() > 0) {
                addProtocolAttached(agendaHeaderOid, "New Protocols", protocolAttached,
                		IrbNameConstants.PROTOCOL_HEADER
                    );
            }

            if (NRprotocolAttached.size() > 0) {
                addNRAttached("New Protocols", NRprotocolAttached, IrbNameConstants.PROTOCOL_HEADER);
            }

            // add modification
            if (modificationAttached.size() > 0) {
                addProtocolAttached(agendaHeaderOid, "Modifications", modificationAttached,
                		IrbNameConstants.MODIFICATION
                    );
            }

            if (NRmodificationAttached.size() > 0) {
                addNRAttached("Modifications", NRmodificationAttached, IrbNameConstants.MODIFICATION);
            }

            // add renewal
            if (renewalAttached.size() > 0) {
                addProtocolAttached(agendaHeaderOid, "Renewals", renewalAttached, IrbNameConstants.RENEWAL);
            }

            if (NRrenewalAttached.size() > 0) {
                addNRAttached("Renewals", NRrenewalAttached, IrbNameConstants.RENEWAL);
            }

            // add adverseEvent
            if (adverseEventAttached.size() > 0) {
                addProtocolAttached(agendaHeaderOid, "Adverse Event Reports", adverseEventAttached,
                		IrbNameConstants.ADVERSE_EVENT
                    );
            }

            if (NRadverseEventAttached.size() > 0) {
                addNRAttached("Adverse Event Reports", NRadverseEventAttached, IrbNameConstants.ADVERSE_EVENT);
            }


            // add closure
            if (closureAttached.size() > 0) {
                addProtocolAttached(agendaHeaderOid, "Closure Reports", closureAttached,
                		IrbNameConstants.CLOSURE
                    );
            }

            if (NRclosureAttached.size() > 0) {
                addNRAttached("Closure Reports", NRclosureAttached, IrbNameConstants.CLOSURE);
            }

            // add unanticipate
            if (unanticipateAttached.size() > 0) {
                addProtocolAttached(agendaHeaderOid, "Unanticipated Problems", unanticipateAttached,
                		IrbNameConstants.UNANTICIPATED_PROBLEM
                    );
            }

            if (NRunanticipateAttached.size() > 0) {
                addNRAttached("Unanticipated Problems", NRunanticipateAttached,
                		IrbNameConstants.UNANTICIPATED_PROBLEM
                    );
            }

            // add other topics
            if (otherTopics.size() > 0) {
                addOtherEventAttached("Other Topics", otherTopics, "Other");
            }

            Vector oldBusinessAttached = ((IrbAgendaHeader) bo).getAllAgendaEventsByType(
                    "OldBusiness"
                    );

            // add Old Business
            if (oldBusinessAttached.size() > 0) {
                addBusinessAttached(agendaHeaderOid, "Old Business", oldBusinessAttached,
                    "OldBusiness"
                    );
            }

            Vector newBusinessAttached = ((IrbAgendaHeader) bo).getAllAgendaEventsByType(
                    "NewBusiness"
                    );

            // add New Business
            if (newBusinessAttached.size() > 0) {
                addBusinessAttached(agendaHeaderOid, "New Business", newBusinessAttached,
                    "NewBusiness"
                    );
            }

            String pa = "Previously " + APPROVED + " ";

            // add exemptions
            if (exemptAttached.size() > 0) {
                addExEventAttached(pa + "Exempt Protocols", exemptAttached, IrbNameConstants.EXEMPT);
            }

            if (NRexemptAttached.size() > 0) {
                addNRAttached(pa + "Exempt Protocols", NRexemptAttached, IrbNameConstants.EXEMPT);
            }

            // add expeditable
            if (expeditableAttached.size() > 0) {
                addExEventAttached(pa + "Expedited Protocols", expeditableAttached, IrbNameConstants.EXPEDITED);
            }

            if (NRexpeditableAttached.size() > 0) {
                addNRAttached(pa + "Expedited Protocols", NRexpeditableAttached, IrbNameConstants.EXPEDITED);
            }

            // add pending
            if (pendingAttached.size() > 0) {
                addExEventAttached(pa + "Pending", pendingAttached, PENDING);
            }

            if (NRpendingAttached.size() > 0) {
                addNRAttached(pa + "Pending", NRpendingAttached, PENDING);
            }

            addMeetingNotes();
            addAddendums();
        } catch (Exception ne) {
            throw new NullPointerException("constructPDF() " + ne.getMessage());
        }
    }

    //~ Methods ------------------------------------------------------------------------------------


	/** TODO: DOCUMENT ME! */
    public void addAddendums() {

        IrbAgendaHeader agendaHeader = getAgendaView().getAgendaHeader();
        StringBuffer text = new StringBuffer();


        if (agendaHeader != null) {
            List<IrbAgendaAddendum> addendums = agendaHeader.getIrbAgendaAddendums();

            if (addendums != null) {
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 618
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 713
    public static Vector buildStipulatedApprovalResults(java.sql.ResultSet res, String name,
        Vector v
        ) {
        Hashtable row = new Hashtable();
        int modify = 0;

        try {

            if (isProtocol(name)) {

                while (res.next()) {
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()
                        );                                      // protocol oid
                    modify = res.getInt(4);
                    row.put("ProtocolNumber",
                        res.getString(2) + " (Y" + res.getInt(3) + " M" +
                        ((modify < 10) ? ("0" + (Integer.valueOf(modify)).toString())
                                       : (Integer.valueOf(modify)).toString()) + ")"
                        );                                      // protocol number
                    row.put("EventName", name);
                    row.put("Title", res.getString(6));         // title
                    row.put("PI", res.getString(5));            // PI
                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()
                        );                                      // event oid
                    row.put("StatusName", res.getString(8));
                    row.put("ApprovalOid",
                        Integer.valueOf((new Float(res.getFloat(9))).intValue()).toString()
                        );                                      // approvalOid
                    row.put("ApprovalCode", res.getString(10)); // approval code

                    if (res.getDate(11) == null) {
                        row.put("StatusDate", "");
                    } else {
                        row.put("StatusDate", CalendarTransformer.formatMMDDYYYY(res.getDate(11)));
                    }

                    row.put("WesternIRB", res.getString(12)); // Western IRB

                    v.addElement(row);
                    row = new Hashtable();

                } // end while
            } else {

                while (res.next()) {
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()
                        );                                                                // protocol oid
                    row.put("ProtocolNumber", res.getString(2));
                    row.put("EventName", name);
                    row.put("Title", (res.getString(4) == null) ? "" : res.getString(4)); // title
                    row.put("PI", res.getString(3));                                      // PI
                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(5))).intValue()).toString()
                        );                                                                // event oid
                    row.put("StatusName", res.getString(6));
                    row.put("ApprovalOid",
                        Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()
                        );                                                                // ApprovalOid
                    row.put("ApprovalCode", res.getString(8));                            // approval code

                    if (res.getDate(9) == null) {
                        row.put("StatusDate", "");
                    } else {

                        if (name.equals("AdverseEvent"))
                            row.put("StatusDate", res.getString(9));
                        else
                            row.put("StatusDate", CalendarTransformer.formatMMDDYYYY(res.getDate(9))
                                );
                    }

                    v.addElement(row);
                    row = new Hashtable();

                } // end while
            }
        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return v;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   res   TODO: DOCUMENT ME!
     * @param   name  TODO: DOCUMENT ME!
     * @param   v     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static Vector buildStipulatedApprovedResults(java.sql.ResultSet res, String name,
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixAReportView.java 275
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 697
        aBuffer.append("</b></u>.");

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(aBuffer.toString(), "100%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell("", "500", "left");
        aCell1.setColumnsToSpan(2);
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = CalendarTransformer.toString(approvalDate);

                if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
            }

            // spacer
            addSpacerRows(aTable, 1, 2, "8");

            // Biosafety Officer
            aRow = new CUHtmlTableRow();

            String name = NOT_YET_APPROVED;

            if (approver > 0)
                name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

            aCell1 = utilGetHtmlTableCell(
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 436
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 527
    public static Vector buildCTSAApprovalResults(java.sql.ResultSet res, String name, Vector v) {
        Hashtable row = new Hashtable();
        int modify = 0;

        try {

            if (isProtocol(name)) {

                while (res.next()) {
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()
                        );                                      // protocol oid
                    modify = res.getInt(4);
                    row.put("ProtocolNumber",
                        res.getString(2) + " (Y" + res.getInt(3) + " M" +
                        ((modify < 10) ? ("0" + (Integer.valueOf(modify)).toString())
                                       : (Integer.valueOf(modify)).toString()) + ")"
                        );                                      // protocol number
                    row.put("EventName", name);
                    row.put("Title", res.getString(6));         // title
                    row.put("PI", res.getString(5));            // PI
                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()
                        );                                      // event oid
                    row.put("StatusName", res.getString(8));
                    row.put("ApprovalOid",
                        Integer.valueOf((new Float(res.getFloat(9))).intValue()).toString()
                        );                                      // approvalOid
                    row.put("ApprovalCode", res.getString(10)); // approval code

                    if (res.getDate(11) == null) {
                        row.put("StatusDate", "");
                    } else {
                        row.put("StatusDate", CalendarTransformer.formatMMDDYYYY(res.getDate(11)));
                    }

                    v.addElement(row);
                    row = new Hashtable();

                } // end while
            } else {

                while (res.next()) {
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()
                        );                                                                // protocol oid
                    row.put("ProtocolNumber", res.getString(2));
                    row.put("EventName", name);
                    row.put("Title", (res.getString(4) == null) ? "" : res.getString(4)); // title
                    row.put("PI", res.getString(3));                                      // PI
                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(5))).intValue()).toString()
                        );                                                                // event oid
                    row.put("StatusName", res.getString(6));
                    row.put("ApprovalOid",
                        Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()
                        );                                                                // ApprovalOid
                    row.put("ApprovalCode", res.getString(8));                            // approval code

                    if (res.getDate(9) == null) {
                        row.put("StatusDate", "");
                    } else {

                        if (name.equals("AdverseEvent"))
                            row.put("StatusDate", res.getString(9));
                        else
                            row.put("StatusDate", CalendarTransformer.formatMMDDYYYY(res.getDate(9))
                                );
                    }

                    v.addElement(row);
                    row = new Hashtable();

                } // end while
            }
        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return v;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   res   TODO: DOCUMENT ME!
     * @param   name  TODO: DOCUMENT ME!
     * @param   v     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static Vector buildCTSAApprovedResults(java.sql.ResultSet res, String name, Vector v) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbUnanticipatedAttachmentInternalView.java 248
edu/columbia/rascal/presentation/irb/pages/IrbUnanticipatedAttachmentView.java 242
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString    is the ProtocolNumber
     * @param   aLocation  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getLinkWidgetFor(String aString, String aLocation) {

        if ((aString == null) || aString.equals("")) {
            return new CUHtmlText("");
        }

        CUHtmlText text = new CUHtmlText(aString);
        text.setLink("'" + aLocation + "'");
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        return text;
    }

    /** @see  edu.columbia.rascal.presentation.irb.pages.IrbHtmlView#getProtocolGeneralHeaderHtml() */
    @Override public String getProtocolGeneralHeaderHtml() {

        String s = "";
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";
        IrbProtocolHeader ph = getProtocol().getLastProtocolHeader();
        setProtocolHeader(ph);

// String department = (getProtocolHeader().getOriginatingDepartment().trim().equals("") ? blank :
// getProtocolHeader().getOriginatingDepartment());

        String departmentCode = (getProtocolHeader().getOriginatingDepartment().trim().equals("")
                ? blank : getProtocolHeader().getOriginatingDepartment());
        String department = "";

        if (!departmentCode.equals(blank))
            department = ServiceLocator.getRascalDepartmentService().findById(departmentCode)
                .getName() + "&nbsp" + "(" + departmentCode + ")";
        else
            department = blank;

        add(getSubTitle());
        s += "<table width=\"100%\" border=\"1\" bgcolor=\"#CCCCCC\">";
        s += "<tr> ";
        s += "<td colspan=\"2\"> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Protocol Number</font> </div>";
        s += "</td> <td colspan=\"2\"> <font face=\"Comic Sans MS\" size=\"1\"> ";
        s += getPrefix() +
            ((getProtocolHeader().getIrbProtocol().getProtocolNumber() == null)
                ? "" : getProtocolHeader().getIrbProtocol().getProtocolNumber());
        s += "</font></td> </tr> <tr> <td width=\"25%\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">You are</font></div>";
        s += "</td> <td><font face=\"Comic Sans MS\" size=\"1\">";
        s += getRascalUser().getUserFirstLastNameUni();
        s += "</font></td> <td width=\"25%\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Department</font></div>";
        s += "</td> <td width=\"25%\"> <font face=\"Comic Sans MS\" size=\"1\"> ";
        s += department + "</font></td> </tr> <tr> <td> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Principal Investigator</font></div></td><td>";
        s +=
            (((CUHtmlItem) getWidgetFor(
                        ServiceLocator.getIrbProtocolHeaderService().getParticipantString(
                            "Principal Investigator", getProtocolHeader()
                            )
                        )).getHtml());
        s += "</td> <td> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Initiator</font></div>";
        s += "</td> <td>";

        if ((getUnanticipate() != null) && (getUnanticipate().getCreatedBy() != 0)) {
            s +=
                (((CUHtmlItem) getWidgetFor(
                            ServiceLocator.getRascalUserService().findById(
                                getUnanticipate().getCreatedBy()
                                ).getUserFirstLastNameUni()
                            )).getHtml());
        } else
            s +=
                (((CUHtmlItem) getWidgetFor(
                            getRascalUser().getNameFirst() + " " + getRascalUser().getNameLast() +
                            "(" + getRascalUser().getUserId() + ")"
                            ))).getHtml();

        s += "</font></td> </tr> <tr> <td> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Date Created</font></div>";
        s += "</td> <td> ";

        if (getUnanticipate() != null)
            s +=
                (((CUHtmlItem) getWidgetFor(
                            CalendarTransformer.toDateTimeString(getUnanticipate()
                                .getCreationDate()
                                )
                            )).getHtml());
        else
            s += blank;

        s += "</td><td colspan=\"2\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\"> " + blank +
            "</font> </div>";
        s += "</table> <br>";

        return s;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public IrbUnanticipatedProblem getUnanticipate() {
        return unanticipatedProblem;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable  CUHtmlTable
     */
    public void setAttachmentHead(CUHtmlTable aTable) {

        CUHtmlText aTitle;
        CUHtmlTableCell header;
        String statusName = ServiceLocator.getIrbStatusService().getCurrentStatus(getUnanticipate()
                .getId(), getUnanticipate().classNameWithoutPrefix()
                ).getStatusName();
        String titles[] = { "View Document", "File Name", "Date Attached", "Edit" };

        int titleLen = titles.length;

        for (int i = 0; i < titleLen; i++) {
            aTitle = new CUHtmlText(titles[i]);
            aTitle.setFontName(getDefaultFontName());
            aTitle.setFontSize("1");
            aTitle.setIsBold(true);
            header = aTable.getCell(0, i);
            header.add(aTitle);
            header.setAlign("center");
        }

        

        if (CURascalGuardian.hasIrbRascal()) {
File Line
edu/columbia/rascal/presentation/irb/auxilliary/objects/IrbSearchParametersParser.java 62
edu/columbia/rascal/presentation/irb/auxilliary/objects/IrbSearchParametersParser.java 274
    public IrbSearchParameters parseIrbSearchParameters(IrbProtocolAdminChairSearchServlet servlet)
        throws CURascalParseException {

        IrbSearchParameters srchParams;

        String rascalUser = servlet.getRequestParameter("RascalUser");
        String rascalUserUni = servlet.getRequestParameter("RascalUserUni");
        String originatingDepartment = servlet.getRequestParameter("OriginatingDepartment");
        String originatingDepartmentName = servlet.getRequestParameter("OriginatingDepartmentName");
        String product = servlet.getRequestParameter("DrugDeviceBiologic");
        String humanSpecimen = servlet.getRequestParameter("HumanSpecimen");
        String previousProtocolNumber = servlet.getRequestParameter("previousProtocolNumber");
        String paperProtocolNumber = servlet.getRequestParameter("paperProtocolNumber");
        String title = servlet.getRequestParameter("Title");
        String excludeExpired = servlet.getRequestParameter(IrbStatusConstants.EXPIRED);
        String excludeInvalid = servlet.getRequestParameter(IrbStatusConstants.INVALID);
        String excludeClosured = servlet.getRequestParameter(IrbStatusConstants.CLOSURED);
        String excludeCreated = servlet.getRequestParameter(IrbStatusConstants.CREATING);

        String userId = servlet.getUser().getUserId();

        boolean emptySearch = true;

        srchParams = new IrbSearchParameters();

        String searchType = servlet.getRequestParameter("anyAll");
        srchParams.setSearchType(searchType);


        try {
            CURascalBasicSearchParser parser = CURascalBasicSearchParser.getInstance();

            if (!isEmpty(rascalUserUni)) {
                parser.initParser(rascalUserUni);
                srchParams.setRascalUserUni(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(rascalUser)) {
                parser.initParser(rascalUser);
                srchParams.setRascalUser(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(userId)) {
                parser.initParser(userId);
                srchParams.setUserId(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(paperProtocolNumber)) {
                parser.initParser(paperProtocolNumber);
                srchParams.setPaperProtocolNumber(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(previousProtocolNumber)) {
                parser.initParser(previousProtocolNumber);
                srchParams.setPreviousProtocolNumber(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(originatingDepartment)) {
                parser.initParser(originatingDepartment);
                srchParams.setOriginatingDepartment(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(originatingDepartmentName)) {
                parser.initParser(originatingDepartmentName);
                srchParams.setOriginatingDepartmentName(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(product)) {
                parser.initParser(product);
                srchParams.setDrugDeviceBiologic(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(humanSpecimen)) {
                parser.initParser(humanSpecimen);
                srchParams.setHumanSpecimen(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(title)) {
                parser.initParser(title);
                srchParams.setTitle(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(excludeExpired)) {
                parser.initParser(excludeExpired);
                srchParams.setExcludeExpired(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(excludeInvalid)) {
                parser.initParser(excludeInvalid);
                srchParams.setExcludeInvalid(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(excludeClosured)) {
                parser.initParser(excludeClosured);
                srchParams.setExcludeClosured(parser.parse());
                emptySearch = false;
            }
            
            if (!isEmpty(excludeCreated)) {
                parser.initParser(excludeCreated);
                srchParams.setExcludeCreated(parser.parse());
                emptySearch = false;
            }            
        } catch (CURascalParseException e) {
            srchParams = null;
            throw e;
        }

        return (!(emptySearch)) ? srchParams : null;
    }

    /**
     * Parses search parameters such as agency name, title, category, fromDate and toDate into a
     * FoasSearchParameters.
     *
     * @param      servlet  a FoasDocumentSearchServlet
     *
     * @return     TODO: DOCUMENT ME!
     *
     * @exception  CURascalParseException  if any one of search parameters cannot be parsed.
     */
    public IrbSearchParameters parseIrbSearchParameters(IrbProtocolRascalSearchServlet servlet)
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderFormQuestionChildEntryView.java 87
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderFormQuestionEntryView.java 96
        getForm().add(getHiddenWidgetFor("parentQuestionOid", String.valueOf(questionOid)));
        getForm().add(aTable);

        getForm().add("<br>");
        getForm().add(getActionButtons());

        add(getForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  numCells   TODO: DOCUMENT ME!
     * @param  aQuestion  TODO: DOCUMENT ME!
     */
    public void addFormatTypeWidget(CUHtmlTable aTable, int numCells,
        HipaaHeaderFormQuestion aQuestion
        ) {

        int row = aTable.elements.size();
        Object aWidget;
        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        addSpacerRows(aTable, numCells, 1, "10");
        row++;

        // format types
        String radioLabels[] = new String[] {
            "0 - No Answer", "1 - Short String (60 characters or less)",
            "2 - Multi-line String (unlimited length)", "3 - Date (mm/dd/yyyy)", "4 - Yes/No",
            "5 - Number"
        };

        Vector radioGroup = utilGetRadioButtonVector(radioLabels, "formatType");

        int formatType = 0;

        if (aQuestion != null) {
            formatType = aQuestion.getAnswerFormat();
        }

        switch (formatType) {

            case 0: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(0))).setChecked(true);
                break;
            }

            case 1: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(1))).setChecked(true);
                break;
            }

            case 2: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(2))).setChecked(true);
                break;
            }

            case 3: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(3))).setChecked(true);
                break;
            }

            case 4: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(4))).setChecked(true);
                break;
            }

            case 5: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(5))).setChecked(true);
                break;
            }

            default: {
                break;
            }
        }

        // radio button group label
        columns.setElementAt(radioGroup.elementAt(0), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Format of the intended answer "));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

/*
 *      // No Answer (default)
 * columns.setElementAt((CUHtmlRadioButton)radioGroup.elementAt(1),1);
 * aTable.addRowFor(columns);     aTable.getCell(row,1).setColumnsToSpan(3);     row++;
 */
        // Short String
        columns.setElementAt(radioGroup.elementAt(1), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Multi-line String
        columns.setElementAt(radioGroup.elementAt(2), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Date
        columns.setElementAt(radioGroup.elementAt(3), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // boolean
        columns.setElementAt(radioGroup.elementAt(4), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Number
        columns.setElementAt(radioGroup.elementAt(5), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        addSpacerRows(aTable, numCells, 1, "10");
        row++;

        columns.setElementAt("", 0);

    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {
        HipaaHeaderFormQuestion aQuestion = null;

        boolean answerable = false;
        boolean answerRequired = false;
        boolean notQuestion = false;
        String text = "";
        String helpFileName = "";
File Line
edu/columbia/rascal/presentation/irb/auxilliary/objects/IrbSearchParametersParser.java 62
edu/columbia/rascal/presentation/irb/auxilliary/objects/IrbSearchParametersParser.java 274
edu/columbia/rascal/presentation/irb/auxilliary/objects/IrbSearchParametersParser.java 406
    public IrbSearchParameters parseIrbSearchParameters(IrbProtocolAdminChairSearchServlet servlet)
        throws CURascalParseException {

        IrbSearchParameters srchParams;

        String rascalUser = servlet.getRequestParameter("RascalUser");
        String rascalUserUni = servlet.getRequestParameter("RascalUserUni");
        String originatingDepartment = servlet.getRequestParameter("OriginatingDepartment");
        String originatingDepartmentName = servlet.getRequestParameter("OriginatingDepartmentName");
        String product = servlet.getRequestParameter("DrugDeviceBiologic");
        String humanSpecimen = servlet.getRequestParameter("HumanSpecimen");
        String previousProtocolNumber = servlet.getRequestParameter("previousProtocolNumber");
        String paperProtocolNumber = servlet.getRequestParameter("paperProtocolNumber");
        String title = servlet.getRequestParameter("Title");
        String excludeExpired = servlet.getRequestParameter(IrbStatusConstants.EXPIRED);
        String excludeInvalid = servlet.getRequestParameter(IrbStatusConstants.INVALID);
        String excludeClosured = servlet.getRequestParameter(IrbStatusConstants.CLOSURED);
        String excludeCreated = servlet.getRequestParameter(IrbStatusConstants.CREATING);

        String userId = servlet.getUser().getUserId();

        boolean emptySearch = true;

        srchParams = new IrbSearchParameters();

        String searchType = servlet.getRequestParameter("anyAll");
        srchParams.setSearchType(searchType);


        try {
            CURascalBasicSearchParser parser = CURascalBasicSearchParser.getInstance();

            if (!isEmpty(rascalUserUni)) {
                parser.initParser(rascalUserUni);
                srchParams.setRascalUserUni(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(rascalUser)) {
                parser.initParser(rascalUser);
                srchParams.setRascalUser(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(userId)) {
                parser.initParser(userId);
                srchParams.setUserId(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(paperProtocolNumber)) {
                parser.initParser(paperProtocolNumber);
                srchParams.setPaperProtocolNumber(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(previousProtocolNumber)) {
                parser.initParser(previousProtocolNumber);
                srchParams.setPreviousProtocolNumber(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(originatingDepartment)) {
                parser.initParser(originatingDepartment);
                srchParams.setOriginatingDepartment(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(originatingDepartmentName)) {
                parser.initParser(originatingDepartmentName);
                srchParams.setOriginatingDepartmentName(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(product)) {
                parser.initParser(product);
                srchParams.setDrugDeviceBiologic(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(humanSpecimen)) {
                parser.initParser(humanSpecimen);
                srchParams.setHumanSpecimen(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(title)) {
                parser.initParser(title);
                srchParams.setTitle(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(excludeExpired)) {
                parser.initParser(excludeExpired);
                srchParams.setExcludeExpired(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(excludeInvalid)) {
                parser.initParser(excludeInvalid);
                srchParams.setExcludeInvalid(parser.parse());
                emptySearch = false;
            }

            if (!isEmpty(excludeClosured)) {
                parser.initParser(excludeClosured);
                srchParams.setExcludeClosured(parser.parse());
                emptySearch = false;
            }
            
            if (!isEmpty(excludeCreated)) {
                parser.initParser(excludeCreated);
                srchParams.setExcludeCreated(parser.parse());
                emptySearch = false;
            }            
        } catch (CURascalParseException e) {
            srchParams = null;
            throw e;
        }

        return (!(emptySearch)) ? srchParams : null;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 530
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 262
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovalQueueView.java 412
        aCell.setAlign("left");
        colNum++;

        // Highest Pain Level
        aCell = aTable.getCell(rowCount, colNum);

        String level = "n/a";

        if (((String) queueItem.get(KEY_PAIN_LEVEL4)).equalsIgnoreCase("y")) {
            level = "4";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL3)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "3";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL2)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "2";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL1)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "1";
        }

        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix F
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_ISO_REQ) != null) &&
                (queueItem.get(KEY_RADIO_ISO_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // Strong Radio Frequencies
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_FREQ_REQ) != null) &&
                (queueItem.get(KEY_RADIO_FREQ_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // XRay
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_XRAY_REQ) != null) &&
                (queueItem.get(KEY_XRAY_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixFReportView.java 267
edu/columbia/rascal/presentation/appendix/pages/AppendixGReportView.java 451
        aCell2 = utilGetHtmlTableCell(fieldGet_0d_NumberOfSubjects(), "500",
                "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // spacer
        addSpacerRows(aTable, 1, 2, "8");

        getForm().add(aTable);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   isotopeList  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable buildIsotopeRows(Set<AppendixIsotope> isotopeList) {
        CUHtmlTable aTable = getTable(0, getNumberOfCells());

        aTable.setBorderWidth(1);
        aTable.setWidth("95%");
        aTable.setAlign("center");

        setIsotopeTableHead(aTable);

        Iterator it = isotopeList.iterator();

        while (it.hasNext()) {
            AppendixIsotope anIsotope = null;

            try {
                anIsotope = (AppendixIsotope) it.next();

                if (anIsotope != null) {
                    setIsotopeTableDataRow(aTable, anIsotope);
                }

            } catch (Exception e) {
                log.error("Exception building table.", e);
            }

        }


        return aTable;

    }

    /** @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDefaultFontName() */
    @Override public String getDefaultFontName() {

        return "Times New Roman";
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aLocationType  TODO: DOCUMENT ME!
     * @param   ownerOid       TODO: DOCUMENT ME!
     * @param   ownerType      TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public AppendixLocation getLocationEntry(String aLocationType, Long ownerOid, String ownerType) {
        AppendixLocation locus = null;

        Vector entries = ServiceLocator.getAppendixLocationService().getAllByOwnerOidAndType(
                ownerOid, ownerType
                );
        int siz = entries.size();

        for (int i = 0; i < siz; i++) {
            locus = (AppendixLocation) entries.elementAt(i);

            if (locus.getLocationType().equals(aLocationType)) {
                return locus;
            }
        }

        return null;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable  TODO: DOCUMENT ME!
     * @param  isot    TODO: DOCUMENT ME!
     */
    public void setIsotopeTableDataRow(CUHtmlTable aTable, AppendixIsotope isot) {
        CUHtmlTableRow aRow = new CUHtmlTableRow();
        String textValue;
        CUHtmlTableCell cell;

        String stringVal2 = Float.toString(isot.getHalfLife());
        String stringVal2a = isot.getHalfLifeUnit();
/*
 *      String stringVal3 = Float.toString(isot.getHalfLifeInSubject()); if
 * (!(isot.getHalfLifeInSubject() > 0)) {         stringVal3 = ""; }     String stringVal3a =
 * isot.getHalfLifeInSubjectUnit();
 */
        String stringVal4 = Float.toString(isot.getInitialActivity());
        String stringVal4a = isot.getInitialActivityUnit();

        // Isotope name
        textValue = isot.getName();

        if ((textValue != null) && (textValue.trim().length() > 0)) {
            textValue = APPENDIX_HTML_SPACE + textValue;
        }

        cell = new CUHtmlTableCell();
        cell.add(getTableCellData(textValue));
        cell.setAlign("left");
        aRow.add(cell);

        // Compound
        textValue = isot.getCompound();

        if ((textValue != null) && (textValue.trim().length() > 0)) {
            textValue = APPENDIX_HTML_SPACE + textValue;
        }

        cell = new CUHtmlTableCell();
        cell.add(getTableCellData(textValue));
        cell.setAlign("left");
        aRow.add(cell);

        // Half Life & Unit
        cell = new CUHtmlTableCell();
        cell.add(getTableCellData(
                APPENDIX_HTML_SPACE + stringVal2 + APPENDIX_HTML_SPACE + stringVal2a
                )
            );
        cell.setAlign("left");
        aRow.add(cell);

        // Initial Activity & Unit
        cell = new CUHtmlTableCell();
        cell.add(getTableCellData(
                APPENDIX_HTML_SPACE + stringVal4 + APPENDIX_HTML_SPACE + stringVal4a
                )
            );
        cell.setAlign("left");
        aRow.add(cell);

        // route of admin
        cell = new CUHtmlTableCell();
        cell.add(getTableCellData(
                APPENDIX_HTML_SPACE + isot.getRouteOfAdministration()
                )
            );
        cell.setAlign("left");
        aRow.add(cell);

        aTable.add(aRow);
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable  TODO: DOCUMENT ME!
     */
    public void setIsotopeTableHead(CUHtmlTable aTable) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        CUHtmlText aTitle;
        CUHtmlTableCell header;


        String titles[] = {
            "Isotope", "Compound", "Physical<br>Half Life",
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 708
edu/columbia/rascal/presentation/appendix/pages/AppendixFReportView.java 480
        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = CalendarTransformer.toString(approvalDate);

                if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
            }

            // spacer
            addSpacerRows(aTable, 1, 2, "8");

            // Biosafety Officer
            aRow = new CUHtmlTableRow();

            String name = NOT_YET_APPROVED;

            if (approver > 0)
                name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_SAFETY_OFFICER), "300",
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixOwnerAbstractSummaryView.java 255
edu/columbia/rascal/presentation/lab/pages/HzHistoryView.java 521
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable          CUHtmlTable
     * @param  rowCount        int
     * @param  approvalKind    String
     * @param  appendixLetter  String
     * @param  approvalStatus  String
     * @param  approvals       TODO: DOCUMENT ME!
     */
    public void setHazardTableDataRow(CUHtmlTable aTable, int rowCount, String approvalKind,
        String appendixLetter, String approvalStatus, Vector approvals
        ) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();

        // Hazard
        CUHtmlTableCell cell0 = new CUHtmlTableCell(getWidgetFor(approvalKind));
        cell0.setVAlign("top");
        cell0.setAlign("left");
        cell0.setWidth("35%");
        aRow.add(cell0);

        // Requirement
        CUHtmlTableCell cell1 = new CUHtmlTableCell(getWidgetFor(appendixLetter));

        if (appendixLetter.equals("n/a")) {
            cell1.setVAlign("center");
            cell1.setAlign("center");
        } else {
            cell1.setVAlign("top");
            cell1.setAlign("left");
        }

        aRow.add(cell1);

        // Status
        CUHtmlTableCell cell2;

        if ((approvalStatus != null) && !approvalStatus.trim().equals("")) {
            CUHtmlText aText = (CUHtmlText) getWidgetFor(approvalStatus);

            if (approvalStatus.equals(NOT_APPROVED) || approvalStatus.equals(HOLD) ||
                    approvalStatus.equals(NO_ACTION)
            ) {
                aText.setFgColor("red");
            }

            cell2 = new CUHtmlTableCell(aText);
        } else {
            cell2 = new CUHtmlTableCell(getWidgetFor(approvalStatus));
        }

        cell2.setVAlign("top");
        cell2.setAlign("left");
        aRow.add(cell2);

        // Approvals
        StringBuffer aBuffer = new StringBuffer(100);

        for (int i = 0; i < approvals.size(); i++) {
            String aString = (String) approvals.elementAt(i);
            aBuffer.append(aString);
            aBuffer.append("<br>");
        }

        CUHtmlTableCell cell3 = new CUHtmlTableCell(getWidgetFor(aBuffer.toString()));
        cell3.setVAlign("top");
        cell3.setAlign("left");
        cell3.setWidth("45%");
        aRow.add(cell3);
        aTable.add(aRow);
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable  CUHtmlTable
     */
    public void setHazardTableHead(CUHtmlTable aTable) {

        CUHtmlText aTitle;
        CUHtmlTableRow aRow = new CUHtmlTableRow();

        aTitle = new CUHtmlText("Hazardous Materials");
        aTitle.setFontSize("-1");
        aTitle.setFontName(getDefaultFontName());

        CUHtmlTableCell header = new CUHtmlTableCell(aTitle);
        header.setIsHeader(true);
        header.setColumnsToSpan(getColumnSizeForHazardTable());
        header.setAlign("center");
        aRow.add(header);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();

        // Hazardous Agent
        aTitle = new CUHtmlText("Hazard");
        aTitle.setFontSize("-2");
        aTitle.setFontName(getDefaultFontName());

        CUHtmlTableCell header0 = new CUHtmlTableCell(aTitle);
        header0.setIsHeader(true);
        aRow.add(header0);

        // Requirement
        aTitle = new CUHtmlText("Appendix");
        aTitle.setFontSize("-2");
        aTitle.setFontName(getDefaultFontName());

        CUHtmlTableCell header1 = new CUHtmlTableCell(aTitle);
        header1.setIsHeader(true);
        aRow.add(header1);

        // Status
        aTitle = new CUHtmlText("Status");
        aTitle.setFontSize("-2");
        aTitle.setFontName(getDefaultFontName());

        CUHtmlTableCell header2 = new CUHtmlTableCell(aTitle);
        header2.setIsHeader(true);
        aRow.add(header2);

        // Approval History
        aTitle = new CUHtmlText("Approval History");
        aTitle.setFontSize("-2");
        aTitle.setFontName(getDefaultFontName());

        CUHtmlTableCell header3 = new CUHtmlTableCell(aTitle);
        header3.setIsHeader(true);
        aRow.add(header3);

        aTable.add(aRow);

    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixAReportView.java 285
edu/columbia/rascal/presentation/appendix/pages/AppendixFReportView.java 480
        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = CalendarTransformer.toString(approvalDate);

                if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
            }

            // spacer
            addSpacerRows(aTable, 1, 2, "8");

            // Biosafety Officer
            aRow = new CUHtmlTableRow();

            String name = NOT_YET_APPROVED;

            if (approver > 0)
                name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

            aCell1 = utilGetHtmlTableCell(
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 353
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovalQueueView.java 237
        aTitle = getTableColumnName("Release");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        aTitle1 = getTableColumnName("Date");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // P.I.
        aTitle = getTableColumnName("Principal Investigator", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        colNum++;

        // Species
        aTitle = getTableColumnName("Species", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        colNum++;

        // Primary Site
        aTitle1 = getTableColumnName("Primary Site", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Current Status
        aTitle1 = getTableColumnName("Current Status", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Highest Pain Level
        aTitle = getTableColumnName("Maximum");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        aTitle1 = getTableColumnName("Pain");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendices
        aTitle = getTableColumnName("Appendices");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        header.setColumnsToSpan(6);

        // Appendix A
        aTitle1 = getTableColumnName("A");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix B
        aTitle1 = getTableColumnName("B");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix C
        aTitle1 = getTableColumnName("C");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix D
        aTitle1 = getTableColumnName("D");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix E
        aTitle1 = getTableColumnName("E");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix F
        aTitle1 = getTableColumnName("F");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Strong Radio Frequency
        aTitle1 = getTableColumnName("SRF");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // XRay
        aTitle1 = getTableColumnName("XRay");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable     CUHtmlTable
     * @param  rowCount   int
     * @param  queueItem  Hashtable
     */
    public void setAnimalCareQueueViewTableDataRow(CUHtmlTable aTable, int rowCount,
        Hashtable queueItem
        ) {

        int colNum = 0;
        CUHtmlTableCell aCell;

        // Protocol Number
        aCell = aTable.getCell(rowCount, colNum);

        String protocolNumb = (String) queueItem.get(KEY_PROTOCOL_NO);
        String protocolOid = (String) queueItem.get(KEY_PROTOCOL_OID);
        CUHtmlText protocolNumbTxt = getLinkToReviewIacucProtocol("AC-" + protocolNumb, protocolOid);
File Line
edu/columbia/rascal/presentation/tc/servlets/TCReportByDeptFilterByJobCodeServlet.java 101
edu/columbia/rascal/presentation/tc/servlets/TCReportByDeptServlet.java 113
                row = new Vector<Object>(5);
            } // end while

        } catch (Exception e) {
            log.error("Exception constructing vector.", e);
        } finally { 
        }

        /// set results by user
        courses.sort();

        Vector<Object> resultsByUser = new Vector<Object>();
        int counter = 0;
        userNumber = allUser.size();

        int recordSize = results.size();
        int coursesize = courses.size();

        Vector<Object> tempRow = new Vector<Object>();
        Vector<Object> currentRow = new Vector<Object>();
        String currentUser = null;

        for (int i = 0; i < userNumber; i++) {
            currentUser = (String) allUser.elementAt(i);

            if (counter < recordSize) currentRow = (Vector) results.elementAt(counter);

            allUser.addElement(currentRow.elementAt(0)); // add user

            // name

            tempRow.addElement(String.valueOf(currentRow.elementAt(1)) + ' ' + currentRow.elementAt(2) + '(' + currentRow.elementAt(0) + ')');

            for (int j = 0; j < coursesize; j++) // build couses columns
            {

                if (counter < recordSize)
                    currentRow = (Vector) results.elementAt(counter);
                else
                    currentRow.setElementAt(null, 3);

                if ((counter < recordSize) && currentRow.elementAt(0).equals(currentUser) &&
                        currentRow.elementAt(3).equals(courses.elementAt(j))
                ) // build this column
                {
                    tempRow.addElement(currentRow.elementAt(4));
                    counter++;
                } else
                    tempRow.addElement(null);
            }

            resultsByUser.addElement(tempRow);
            tempRow = new Vector<Object>();

        }

        resultsByUser.add(0, courses);

        return resultsByUser;
    }
    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  this method was created in VisualAge.
     */
    @Override public TCHtmlView getPage() {

        TCHtmlView view = null;
        Vector<Object> allCourses = null;
        
        List<String> selectedDeparments = (List<String>) getSession().getAttribute(TCAbstractServlet.DEPT_CODE);
        
        Vector<Object> allData = getAllData(selectedDeparments);

        allCourses = (Vector) allData.elementAt(0);
        allData.removeElementAt(0);

        CUSortVector rows = new CUSortVector(allData);
        String sortBy = getLineParameter("sortBy");


        if (sortBy != null) {
            String sortColumns[] = new String[allCourses.size() + 1];
            sortColumns[0] = "name";

            for (int i = 0; i < allCourses.size(); i++)
                sortColumns[i + 1] = ((String) allCourses.elementAt(i)).substring(0, 6);

            rows.setColumnNames(sortColumns);
            rows.sortByColumn(sortBy.replace('+', ' '));
        } else {
            sortBy = "";
        }

        boolean printable = false;
        boolean downloadable = false;
        String printableString = getLineParameter("printable");
        String downloadableString = getLineParameter("downloadable");

        if ((printableString != null) && (!printableString.equals(""))) {
            printable = printableString.equalsIgnoreCase("true");
        }

        if ((downloadableString != null) && (!downloadableString.equals(""))) {
            downloadable = downloadableString.equalsIgnoreCase("true");
        }

        view = new TCReportByDeptFilterByJobCodeView(rows, printable, sortBy, downloadable, selectedDeparments, allCourses);
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixAReportView.java 275
edu/columbia/rascal/presentation/appendix/pages/AppendixBReportView.java 228
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 697
        aBuffer.append("</b></u>.");

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(aBuffer.toString(), "100%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell("", "500", "left");
        aCell1.setColumnsToSpan(2);
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = CalendarTransformer.toString(approvalDate);
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentHtmlView.java 334
edu/columbia/rascal/presentation/irb/pages/IrbHtmlView.java 376
    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = new Long(currentDate.substring(0, 2)).intValue();
        int dayIndex = new Long(currentDate.substring(3, 5)).intValue();
        int year = new Long(currentDate.substring(6)).intValue();

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {


        EVector list = new EVector();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");


        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);


    }


    /** TODO: DOCUMENT ME! */
    public void getDefaultMainHeader() {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 71
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 70
edu/columbia/rascal/presentation/appendix/pages/AppendixESafetyOfficerApprovalView.java 73
edu/columbia/rascal/presentation/appendix/pages/AppendixFSafetyOfficerApprovalView.java 72
edu/columbia/rascal/presentation/appendix/pages/AppendixGSafetyOfficerApprovalView.java 72
        setSubTitle("Appendix B - Safety Officer Approval");

        setOnLoad(getOnLoadForOwnerType(anOwnerSurrogate.getOwnerType()));

        if (anOwnerSurrogate.getOwnerType().equals(IRB_OWNER)) {
            addJavaScriptElement(new CUHtmlText(getJSCodeFrom("irbSafetyOfficerReturnConfirm.js")));
        }

        addJavaScriptElement(CURascalHmJavascript.getJavascriptCheckRecipient());

        setAppendixObject(anAppendixObject);
        setOwnerSurrogate(anOwnerSurrogate);
        setTracker(aTracker);

        setRascalUser(aUser);
        add(anAppendixObject);
        render();

    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected void addGeneralFields() throws Exception {
        CUHtmlTableCell aCell1;
        CUHtmlTableCell aCell2;

        CUHtmlTable aTable = utilGetHtmlTable("100%", 0, 4);

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(fieldGet_1_ReviewAndApproveText(), "40%", getTitleAlign());
        aCell1.setColumnsToSpan(3);

        aRow.add(aCell1);
        aTable.add(aRow);

        addSpacerRows(aTable, 2, 1, "10");

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(REC_ANIMAL_HOUSING, defaultFontSize, true,
                        false
                        ), "40%", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell("", "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            Iterator bpList = getBoilerPlateList(KEY_PARM_REC_HOUSE_REF_ID).iterator();

            while (bpList.hasNext()) {
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
                aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(fieldGet_2_RecommendedHousing("2"), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        String ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                                                                             : REC_PPE_IACUC;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetHtmlText(ppeLabel, defaultFontSize, true, false),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("", "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        Iterator bpList = getBoilerPlateList(KEY_PARM_REC_PPE_REF_ID).iterator();

        while (bpList.hasNext()) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
        aCell2 = utilGetHtmlTableCell(fieldGet_3_RecommendedPpe("3"), "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVER_NOTES + "</b>"),
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentHtmlView.java 334
edu/columbia/rascal/presentation/irb/pages/IrbHtmlView.java 376
edu/columbia/rascal/presentation/propTrak/pages/PtHtmlView.java 309
    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = new Long(currentDate.substring(0, 2)).intValue();
        int dayIndex = new Long(currentDate.substring(3, 5)).intValue();
        int year = new Long(currentDate.substring(6)).intValue();

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {


        EVector list = new EVector();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");


        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);


    }


    /** TODO: DOCUMENT ME! */
    public void getDefaultMainHeader() {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixAReportView.java 279
edu/columbia/rascal/presentation/appendix/pages/AppendixCReportView.java 288
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 701
        aCell2 = utilGetHtmlTableCell("", "500", "left");
        aCell1.setColumnsToSpan(2);
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = CalendarTransformer.toString(approvalDate);
File Line
edu/columbia/rascal/presentation/myRascal/views/MyRascalMainMenuView.java 56
edu/columbia/rascal/presentation/myRascal/views/MyRascalMainMenuView.java 240
    @Override public void addFields() {

        CUHtmlForm form = new CUHtmlForm("form1", MyRascalMainMenuServlet.class.getName(), "POST");
        setPageTitle("MyRASCAL Main Menu");

        Vector<Object> menuItems = new Vector<Object>();
        CUHtmlText t;


        // ANIMAL CARE===================================================================

        t = new CUHtmlText("Animal Care");
        t.setIsBold(true);
        t.setFontName("Verdana");
        form.add(t);

        t = new CUHtmlText("My Protocols");
        t.setLink(
          //  "Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myAnimalCareProtocols';parent.frames[2].document.forms[0].submit();"
        		"Javascript:onClick=window.parent.location='/iacuc/search/myProtocols';"
        		);
        t.setIsBold(true);
        t.setFontName(getDefaultFontName());
        menuItems.addElement(t);
        form.add(new CUHtmlBulletList(menuItems, "BULLET"));
        menuItems = new Vector<Object>();

        // CONFLICT OF INTEREST===================================================================

        t = new CUHtmlText("Conflict Of Interest");
        t.setIsBold(true);
        t.setFontName("Verdana");
        form.add(t);

        t = new CUHtmlText("My Disclosures");
        t.setLink(
            //"Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myCoiDisclosures';parent.frames[2].document.forms[0].submit();"
        	"Javascript:onClick=window.parent.location='/coi/filingHistory';"
            );
        //t.setLinkTarget("top");
        t.setIsBold(true);
        t.setFontName(getDefaultFontName());
        menuItems.addElement(t);
        form.add(new CUHtmlBulletList(menuItems, "BULLET"));
        menuItems = new Vector<Object>();

        // CONSENT FORMS ===================================================================

        t = new CUHtmlText("Consent Forms");
        t.setIsBold(true);
        t.setFontName("Verdana");
        form.add(t);

        t = new CUHtmlText("My Consent Forms");
        t.setLink(
            "Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myConsentForms';parent.frames[1].location='" +
            ConsentLinkFrameServlet.class.getName() +
            "?consentNumber=XXXX9999';parent.frames[2].document.forms[0].submit();"
            );
        t.setIsBold(true);
        t.setFontName(getDefaultFontName());
        menuItems.addElement(t);
        form.add(new CUHtmlBulletList(menuItems, "BULLET"));
        menuItems = new Vector<Object>();

        // CONTRACTS AND GRANTS ===================================================================

        t = new CUHtmlText("Contracts and Grants");
        t.setIsBold(true);
        t.setFontName("Verdana");
        form.add(t);

        t = new CUHtmlText("My Contracts and Grants");
        t.setLink(
            "Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myContractsGrants';parent.frames[1].location='" +
            PtLinkFrameServlet.class.getName() +
            "?trakId=XXXX9999';parent.frames[2].document.forms[0].submit();"
            );
        t.setIsBold(true);
        t.setFontName(getDefaultFontName());
        menuItems.addElement(t);
        form.add(new CUHtmlBulletList(menuItems, "BULLET"));
        menuItems = new Vector<Object>();

        t = new CUHtmlText("My Approvals");
        t.setLink(
            "Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myContractGrantApprovals';parent.frames[1].location='" +
            PtLinkFrameServlet.class.getName() +
            "?trakId=XXXX9999';parent.frames[2].document.forms[0].submit();"
            );
        t.setIsBold(true);
        t.setFontName(getDefaultFontName());
        menuItems.addElement(t);
        form.add(new CUHtmlBulletList(menuItems, "BULLET"));
        menuItems = new Vector<Object>();

        // CV BUILDER ===================================================================
/* TODO Remove references to CV Builder
 *      t = new CUHtmlText("CV Builder");     t.setIsBold(true);     t.setFontName("Verdana");
 * form.add(t);
 *
 * t = new CUHtmlText("My CVs");
 * t.setLink("Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myCVs';parent.frames[1].location='"
 * + CvLinkFrameServlet.class.getName() + "';parent.frames[2].document.forms[0].submit();");
 * t.setIsBold(true);     t.setFontName(getDefaultFontName());     menuItems = new Vector();
 * menuItems.addElement(t);     form.add(new CUHtmlBulletList(menuItems, "BULLET"));
 */
        // HAZARDOUS MATERIALS ===================================================================

        t = new CUHtmlText("Hazardous Materials");
        t.setIsBold(true);
        t.setFontName("Verdana");
        form.add(t);

        t = new CUHtmlText("My Appendices");
        t.setLink(
            "Javascript:onClick=parent.frames[2].document.forms[0].reportNameHF.value='myHazMatAppendices';parent.frames[2].document.forms[0].submit();"
            );
        t.setIsBold(true);
        t.setFontName(getDefaultFontName());
        menuItems.addElement(t);
        form.add(new CUHtmlBulletList(menuItems, "BULLET"));
        menuItems = new Vector<Object>();

        // HUMAN SUBJECTS ===================================================================

        t = new CUHtmlText("Human Subjects");
        t.setIsBold(true);
        t.setFontName("Verdana");
        form.add(t);
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaFormQuestionEntryView.java 116
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderFormQuestionChildEntryView.java 105
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderFormQuestionEntryView.java 114
    public void addFormatTypeWidget(CUHtmlTable aTable, int numCells, HipaaQuestionLookup aQuestion) {

        int row = aTable.elements.size();
        Object aWidget;
        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        addSpacerRows(aTable, numCells, 1, "10");
        row++;

        // format types
        String radioLabels[] = new String[] {
            "0 - No Answer", "1 - Short String (60 characters or less)",
            "2 - Multi-line String (unlimited length)", "3 - Date (mm/dd/yyyy)", "4 - Yes/No",
            "5 - Number"
        };

        Vector radioGroup = utilGetRadioButtonVector(radioLabels, "formatType");

        int formatType = 0;

        if (aQuestion != null) {
            formatType = aQuestion.getAnswerFormat();
        }

        switch (formatType) {

            case 0: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(0))).setChecked(true);
                break;
            }

            case 1: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(1))).setChecked(true);
                break;
            }

            case 2: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(2))).setChecked(true);
                break;
            }

            case 3: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(3))).setChecked(true);
                break;
            }

            case 4: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(4))).setChecked(true);
                break;
            }

            case 5: {
                ((CUHtmlRadioButton) (radioGroup.elementAt(5))).setChecked(true);
                break;
            }

            default: {
                break;
            }
        }

        // radio button group label
        columns.setElementAt(radioGroup.elementAt(0), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Format of the intended answer "));
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

/*
 *      // No Answer (default)
 * columns.setElementAt((CUHtmlRadioButton)radioGroup.elementAt(1),1);
 * aTable.addRowFor(columns);     aTable.getCell(row,1).setColumnsToSpan(3);     row++;
 */
        // Short String
        columns.setElementAt(radioGroup.elementAt(1), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Multi-line String
        columns.setElementAt(radioGroup.elementAt(2), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Date
        columns.setElementAt(radioGroup.elementAt(3), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // boolean
        columns.setElementAt(radioGroup.elementAt(4), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // Number
        columns.setElementAt(radioGroup.elementAt(5), 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        addSpacerRows(aTable, numCells, 1, "10");
        row++;

        columns.setElementAt("", 0);

    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovedCountView.java 241
edu/columbia/rascal/presentation/irb/pages/IrbReportSubmissionCountView.java 237
        aCell.add(getTextWidgetFor("", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // Term
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // UP
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        aTable.add(aRow);

        // total
        aRow = new CUHtmlTableRow();

        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("Totals", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);


        // new protocols
        sum = 0;

        for (int i = 0; i < 3; i++) {
            aNumber = Integer.valueOf((String) (total.elementAt(i)));
            sum += aNumber;
        }

        aCell = new CUHtmlTableCell();
        aCell.add(getThreeElementsTable("", sum + "", ""));
        aCell.setAlign("right");
        aRow.add(aCell);

        // renewals
        sum = 0;

        for (int i = 0; i < 3; i++) {
            aNumber = Integer.valueOf((String) (total.elementAt(i + 3)));
            sum += aNumber;
        }

        aCell = new CUHtmlTableCell();
        aCell.add(getThreeElementsTable("", sum + "", ""));
        aCell.setAlign("right");
        aRow.add(aCell);

        // mods
        sum = 0;

        for (int i = 0; i < 3; i++) {
            aNumber = Integer.valueOf((String) (total.elementAt(i + 6)));
            sum += aNumber;
        }

        aCell = new CUHtmlTableCell();
        aCell.add(getThreeElementsTable("", sum + "", ""));
        aCell.setAlign("right");
        aRow.add(aCell);

        // AE
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor((String) total.elementAt(9), 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // Term
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor((String) total.elementAt(10), 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // UP
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor((String) total.elementAt(11), 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        aTable.add(aRow);


        aTable.getCell(0, 0).setWidth("8%");
        aTable.getCell(0, 1).setWidth("15%");
        aTable.getCell(0, 2).setWidth("15%");
        aTable.getCell(0, 3).setWidth("15%");
        aTable.getCell(0, 4).setWidth("10%");
        aTable.getCell(0, 5).setWidth("10%");
File Line
edu/columbia/rascal/presentation/controller/irb/IrbClosureSubjectsController.java 60
edu/columbia/rascal/presentation/controller/irb/IrbProtocolSubjectsController.java 61
    @Resource private IrbProtocolSubjectsService irbProtocolSubjectsService;
    @Resource private RascalSubjectPopulationService rascalSubjectPopulationService;
    
    @Resource private Validator irbProtocolSubjectsValidator;
    
    @Resource private ClearValueProcessor<IrbProtocolSubjects> clearValueProcessor;
    
    @PostConstruct
    void init() {
        Map<AbstractMap.SimpleImmutableEntry<String, Serializable>, String[]> clearValueMap = clearValueProcessor.getClearValueMap();
        
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("studyInvolveScreening", "Y"), 
                new String[] {"targetAccrual", "accruedToDate", "accruedSinceRenewal", "anticipatedAccrued"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("anyWithdrawn", "Y"), 
                new String[] {"numberWithdrawn", "explainWithdrawn"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("removedByPi", "Y"), 
                new String[] {"howManyRemovedByPi", "explainRemovedByPi"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("lostToFollowup", "Y"), 
                new String[] {"howManyLostToFollowup", "explainLostToFollowup"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("diedOnStudy", "Y"), 
                new String[] {"howManyDiedOnStudy", "explainDiedOnStudy"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("anySubjectComplaints", "Y"), 
                new String[] {"howManyComplaints", "explainComplaints"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("pregnantEnrolled", "Y"), 
                new String[] {"riskPregnantWoman", "riskFetus", "riskNeonate", "benefitPregnantWoman", "benefitFetus", "benefitNeonate", "noProspectOfBenefit"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("lackingCapacity", "Y"), 
                new String[] {"proceduresMinimalRisk", "prospectDirectBenefit"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("proceduresMinimalRisk", "N"), 
                new String[] {"prospectDirectBenefit"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("prisonersEnrolled", "Y"), 
                new String[] {"prisonerPossibleCause","prisonerInstStructure","prisonerResearchOnConditions","prisonerResearchOnPractises"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("otherVulnerablePopulations", "Y"), 
                new String[] {"descOtherVulnerablePopulations"});
        clearValueMap.put(new AbstractMap.SimpleImmutableEntry<String, Serializable>("involveCompensation", "Y"), 
                new String[] {"compensationJustification","eligibleCompensation600"});
    }
    
    @InitBinder(FORM_COMMAND) 
    void initBinder(WebDataBinder binder){
        binder.setDisallowedFields("id", "version");
        
        binder.addValidators(irbProtocolSubjectsValidator);
    }
   
    @ModelAttribute
    void updateModel(Model model) {
        model.addAttribute("radioYNMap", radioYNMap);
        
        Map<String, String> radioMGNMap = new LinkedHashMap<String, String>();
        radioMGNMap.put("Minimal Risk", "Minimal Risk");
        radioMGNMap.put("Greater than Minimal Risk", "Greater than Minimal Risk");
        radioMGNMap.put("N/A", "N/A");
        model.addAttribute("radioMGNMap", radioMGNMap);
    }
    
    @RequestMapping(method = RequestMethod.GET)
    public String loadPage(@PathVariable Long closureId,
File Line
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 112
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 281
                cellBuffer.append("<option value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</option>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 0);

        // set up cell 1:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append(
            "<INPUT VALUE=\">>\" TYPE=\"BUTTON\" NAME=\"availableToSelected\" onClick=\"moveToSelected('"
            );
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("','");
        cellBuffer.append(maxSelect);
        cellBuffer.append("')\">");
        cellBuffer.append("\n<br>\n");
        cellBuffer.append(
            "<INPUT VALUE=\"<<\" TYPE=\"BUTTON\" NAME=\"selectedToAvailable\" onClick=\"moveFromTo('"
            );
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("')\">\n");

        columns.setElementAt(cellBuffer.toString(), 1);

        // set up cell 2:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(selectedName);
        cellBuffer.append("\">\n");

        if (selected.size() == 0) { // construct a "stretcher" record to make
                                    // the list box wide enough in Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < selected.size(); i++) {
                String selectedString = (String) selected.elementAt(i);
                int index = selectedString.indexOf(";");
                String key = selectedString.substring(0, index);
                String value = selectedString.substring(index + 1);
                cellBuffer.append("<OPTION value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</OPTION>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 2);

        getTable().addRowFor(columns);

        for (int i = 0; i < 2; i++) {
            getTable().getCell(i, 0).setAlign("CENTER");
            getTable().getCell(i, 0).setWidth("45%");
            getTable().getCell(i, 1).setAlign("CENTER");
            getTable().getCell(i, 1).setWidth("10%");
            getTable().getCell(i, 2).setAlign("CENTER");
            getTable().getCell(i, 2).setWidth("45%");
        }

    }

    /**
     * Creates a new $class.name$ object.
     *
     * @param  availableName  TODO: DOCUMENT ME!
     * @param  available      TODO: DOCUMENT ME!
     * @param  selectedName   TODO: DOCUMENT ME!
     * @param  selected       TODO: DOCUMENT ME!
     * @param  fontName       TODO: DOCUMENT ME!
     * @param  formName       TODO: DOCUMENT ME!
     * @param  maxSelect      TODO: DOCUMENT ME!
     */
    public CUHtmlMoveToSelectList(String availableName, // unique name for
                                                        // available items
                                                        // list
        Vector available,                               // available items
                                                        // list
        String selectedName,                            // unique name for
                                                        // selected items
                                                        // list
        Vector selected,                                // selected items
                                                        // list
        String fontName,                                // name of font for
                                                        // labels
        String formName,                                // name of form in
                                                        // which widget is
                                                        // embedded
        int maxSelect
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportSignoffServlet.java 78
edu/columbia/rascal/presentation/propTrak/servlets/PtReportSignoffServlet.java 157
		List<Object[]> resultList = acc.executeNoParmPreparedQuery("select DISTINCT PTP.oid, PTP.trakId, PTAA.agencyName, RU.name_last, " + "PTB.projectBudgetBeginDate, PTB.projectBudgetEndDate, " + "PTAA.agencyFlowthrough, PTB.projectBudgetTotalAmount, PTP.spogCUId, " + "PTP.title, RUPO.name_last name_last2, PTP.originatingOffice, PT.dateTimeIn " + "from PtProposalHeader PTP, PtAgencyAddress PTAA, PtAccessControl PTA, " + "PtBudget PTB, RASCAL_USER RU, PtTracking PT, RASCAL_USER RUPO" + " where PTP.projectOfficer = RUPO.user_id and PTP.oid = PTAA.pt_header_id and RU.rid=PTA.rid " + "and PTA.sequenceNumber = 1 and PTP.oid = PTA.pt_header_id " + "and PTP.oid = PTB.pt_header_id and " + "PTB.sequenceNumber = (select count(*) from PtBudget PB where PTP.oid = PB.pt_header_id) " + "and PTP.oid = PT.pt_header_id and PT.trackingLocation = 'Signed Off'" + " AND (PT.dateTimeIn >= '" + from + "' AND PT.dateTimeIn <= '" + to + "') ");
        for(Object[] res: resultList){
        	row.addElement(res[0].toString());
        	if(columns.contains("TrakId")){row.addElement(res[1]);i++;}
        	if(columns.contains("Title")){row.addElement(res[9]);i++;}
        	if(columns.contains("Dept")){row.addElement(res[11]);i++;}
        	if(columns.contains("PIName")){row.addElement(res[3]);i++;}
        	if(columns.contains("Agency")){row.addElement(res[2]);i++;}
        	if(columns.contains("Duration")){
                if ((res[4] == null) || (res[5] == null)) {
                    row.addElement("");
                    i++;
                } else {
                    Calendar end = CalendarTransformer.toCalendar(CalendarTransformer.toString(
                    		(Date)res[5]
                                )
                            );
                    Calendar beg = CalendarTransformer.toCalendar(CalendarTransformer.toString(
                    		(Date)res[4]
                                )
                            );
                    int months = end.get(Calendar.YEAR) - beg.get(Calendar.YEAR);
                    months = months * 12;
                    months = months + (end.get(Calendar.MONTH) - beg.get(Calendar.MONTH));

                    String duration = (Integer.valueOf(months)).toString();
                    row.addElement(duration);
                    i++;
                }        		
        	}
        	if(columns.contains("ProjectBeginDate")){row.addElement((res[4] == null)?"":(Date)res[4]);i++;}
        	if(columns.contains("ProjectEndDate")){row.addElement((res[5] == null)?"":(Date)res[5]);i++;}
        	if(columns.contains("TotalMoneyReq.")){ row.addElement((res[7] == null)?"":res[7]);i++; }
        	if(columns.contains("FlowThroughAgency")){row.addElement(res[6]);i++;}
        	if(columns.contains("PO")){row.addElement(res[10]);i++;}
        	if(columns.contains("CUID")){row.addElement(res[8]);i++;}
        	if(columns.contains("SignOffDate")){row.addElement((res[12] == null)?"":(Date)res[12]);i++;}
        	results.addElement(row.clone());
        	row = new Vector(i);        	
        }
        return results;
    }
File Line
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 112
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 458
                cellBuffer.append("<option value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</option>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 0);

        // set up cell 1:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append(
            "<INPUT VALUE=\">>\" TYPE=\"BUTTON\" NAME=\"availableToSelected\" onClick=\"moveToSelected('"
            );
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("','");
        cellBuffer.append(maxSelect);
        cellBuffer.append("')\">");
        cellBuffer.append("\n<br>\n");
        cellBuffer.append(
            "<INPUT VALUE=\"<<\" TYPE=\"BUTTON\" NAME=\"selectedToAvailable\" onClick=\"moveFromTo('"
            );
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("')\">\n");

        columns.setElementAt(cellBuffer.toString(), 1);

        // set up cell 2:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(selectedName);
        cellBuffer.append("\">\n");

        if (selected.size() == 0) { // construct a "stretcher" record to make
                                    // the list box wide enough in Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < selected.size(); i++) {
                String selectedString = (String) selected.elementAt(i);
                int index = selectedString.indexOf(";");
                String key = selectedString.substring(0, index);
                String value = selectedString.substring(index + 1);
                cellBuffer.append("<OPTION value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</OPTION>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 2);

        getTable().addRowFor(columns);

        for (int i = 0; i < 2; i++) {
            getTable().getCell(i, 0).setAlign("CENTER");
            getTable().getCell(i, 0).setWidth("45%");
            getTable().getCell(i, 1).setAlign("CENTER");
            getTable().getCell(i, 1).setWidth("10%");
            getTable().getCell(i, 2).setAlign("CENTER");
            getTable().getCell(i, 2).setWidth("45%");
        }

    }

    /**
     * Creates a new $class.name$ object.
     *
     * @param  availableName  TODO: DOCUMENT ME!
     * @param  available      TODO: DOCUMENT ME!
     * @param  selectedName   TODO: DOCUMENT ME!
     * @param  selected       TODO: DOCUMENT ME!
     * @param  fontName       TODO: DOCUMENT ME!
     * @param  formName       TODO: DOCUMENT ME!
     * @param  maxSelect      TODO: DOCUMENT ME!
     */
    public CUHtmlMoveToSelectList(String availableName, // unique name for
                                                        // available items
                                                        // list
        Vector available,                               // available items
                                                        // list
        String selectedName,                            // unique name for
                                                        // selected items
                                                        // list
        Vector selected,                                // selected items
                                                        // list
        String fontName,                                // name of font for
                                                        // labels
        String formName,                                // name of form in
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovalQueueView.java 430
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovedQueueView.java 217
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL1)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "1";
        }

        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix F
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_ISO_REQ) != null) &&
                (queueItem.get(KEY_RADIO_ISO_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // Strong Radio Frequencies
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_FREQ_REQ) != null) &&
                (queueItem.get(KEY_RADIO_FREQ_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // XRay
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_XRAY_REQ) != null) &&
                (queueItem.get(KEY_XRAY_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;
    }
}
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 548
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 276
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovedQueueView.java 217
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL1)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "1";
        }

        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix F
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_ISO_REQ) != null) &&
                (queueItem.get(KEY_RADIO_ISO_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // Strong Radio Frequencies
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_FREQ_REQ) != null) &&
                (queueItem.get(KEY_RADIO_FREQ_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // XRay
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_XRAY_REQ) != null) &&
                (queueItem.get(KEY_XRAY_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBReportView.java 239
edu/columbia/rascal/presentation/appendix/pages/AppendixCReportView.java 294
edu/columbia/rascal/presentation/appendix/pages/AppendixFReportView.java 480
        String textValue;

        if (getTracker() != null) {

            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) { // Recommended animal housing
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(
                        utilGetHtmlText(REC_ANIMAL_HOUSING + ":", defaultFontSize, false, false),
                        "300",
                        getTitleAlign()
                );
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                textValue = (getTracker().getRecommendedHousing() == null)
                        ? "" : getTracker().getRecommendedHousing();
                textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
                aCell1.setColumnsToSpan(3);

                aRow.add(aCell1);
                aTable.add(aRow);
            }

            // Recommended PPE & SOP
            String ppeLabel = "";

            if (getOwnerSurrogate().getSubject() != null) {
                ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                        : REC_PPE_IACUC;
                ppeLabel = ppeLabel + ":";
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(ppeLabel, defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getRecommendedPpe() == null)
                    ? "" : getTracker().getRecommendedPpe();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // Safety Officer's General Comments
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(
                    utilGetHtmlText(APPROVER_NOTES + ":", defaultFontSize, false, false),
                    "300",
                    getTitleAlign()
            );
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            textValue = (getTracker().getSafetyOfficerComment() == null)
                    ? "" : getTracker().getSafetyOfficerComment();
            textValue = PersistentTextFormatter.insertHtmlTagsForControls(textValue);
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");
            aCell1.setColumnsToSpan(3);

            aRow.add(aCell1);
            aTable.add(aRow);

            // gather safety officer approval data
            AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
            int approver = 0;
            Date approvalDate = null;
            String approvalDateStr = "";

            if ((biosafetyApproval != null) && (biosafetyApproval.getApprovalType() != null) &&
                    (biosafetyApproval.getApprovalType().equals(APPROVE) ||
                            biosafetyApproval.getApprovalType().equals(MANUAL_APPROVE))
                    ) {
                approver = biosafetyApproval.getApproverRid();
                approvalDate = biosafetyApproval.getApprovalDate();
                approvalDateStr = approvalDate.toString();
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 217
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 216
edu/columbia/rascal/presentation/appendix/pages/AppendixISafetyOfficerApprovalView.java 140
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();

                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportActiveApprovedProtocolSearchView.java 53
edu/columbia/rascal/presentation/irb/pages/IrbReportInProcessProtocolSearchView.java 48
                );

        addFields();
        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /** Insert the method's description here. Creation date: (1/2/2003 11:34:23 AM) */
    public void addFields() {


        // set the number of cells in the table here:
        // (all "addRow" methods should be set up for this
        // number of cells per row)
        int numCells = 4;


        // Create the overall table for the page:
        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);

        // Add general fields:
        addGeneralRows(aTable, numCells);
        aTable.getCell(0, 0).setWidth("30%");

        aForm.add(aTable);
        aForm.add("<BR>");
        aForm.add(performMethod("getActionButtons", null));
        aForm.add("<BR>");

        CUHtmlTable anOutputTable = new CUHtmlTable();
        anOutputTable.setBorderWidth(0);

        Vector aRow = new Vector(2);

        aRow.addElement("");
        aRow.addElement("");
        anOutputTable.addRowFor(aRow);
        anOutputTable.getCell(0, 0).setWidth("5%");
        anOutputTable.getCell(0, 1).setWidth("95%");


        aForm.add(anOutputTable);

        add(aForm);

    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {

        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        Object aWidget;

        // Uni
        aWidget = getEditWidgetFor("uni", "", "15", "15");
        columns.setElementAt(aWidget, 1);

        columns.setElementAt(getWidgetFor("UNI Lookup"), 2);
        columns.setElementAt(getUniLookup(), 3);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Enter UNI (do not enter a name):"));
        row++;

        columns.setElementAt(null, 1); // clear the element
        columns.setElementAt(null, 2); // clear the element
        columns.setElementAt(null, 3); // clear the element


        aTable.addRowFor(columns);
        row++;

        columns.setElementAt(null, 2); // clear the element
        columns.setElementAt(null, 3); // clear the element

        aWidget = getEditWidgetFor("department", "", "15", "15");
        columns.setElementAt(aWidget, 1);

        CUHtmlImage i = new CUHtmlImage("/images/popup.gif");
        i.setAlt("Department Lookup");
        i.setLink("RascalDepartmentLookup");
        i.setOnClick("return departmentOpenSearchWindow('','department','','')");
        i.setBorderWidth(0);
        columns.setElementAt(getWidgetFor("Department lookup"), 2);
        columns.setElementAt(i, 3);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Department Code:"));
    }

    /**
     * Insert the method's description here. Creation date: (1/2/2003 11:43:27 AM)
     *
     * @return  java.lang.String
     */
    public String getAction() {
        return action;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Submit");
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
        }


        return aTable;
    }

    /**
     * Insert the method's description here. Creation date: (1/2/2003 11:41:52 AM)
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public final CUHtmlForm getAForm() {
        return aForm;
    }
}
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportDeptServlet.java 163
edu/columbia/rascal/presentation/propTrak/servlets/PtReportSignoffServlet.java 221
        try {
            columns.addElement(""); // space holder for column sort

            String column0 = (String) getSession().getAttribute("column0");

            if (!column0.equals(null) || !column0.equals("")) {
                columns.addElement(column0);
            }

            String column1 = (String) getSession().getAttribute("column1");

            if (!column1.equals(null) || !column1.equals("")) {
                columns.addElement(column1);
            }

            String column2 = (String) getSession().getAttribute("column2");

            if (!column2.equals(null) || !column2.equals("")) {
                columns.addElement(column2);
            }

            String column3 = (String) getSession().getAttribute("column3");

            if (!column3.equals(null) || !column3.equals("")) {
                columns.addElement(column3);
            }

            String column4 = (String) getSession().getAttribute("column4");

            if (!column4.equals(null) || !column4.equals("")) {
                columns.addElement(column4);
            }

            String column5 = (String) getSession().getAttribute("column5");

            if (!column5.equals(null) || !column5.equals("")) {
                columns.addElement(column5);
            }

            String column6 = (String) getSession().getAttribute("column6");

            if (!column6.equals(null) || !column6.equals("")) {
                columns.addElement(column6);
            }

            String column7 = (String) getSession().getAttribute("column7");

            if (!column7.equals(null) || !column7.equals("")) {
                columns.addElement(column7);
            }

            String column8 = (String) getSession().getAttribute("column8");

            if (!column8.equals(null) || !column8.equals("")) {
                columns.addElement(column8);
            }

            String column9 = (String) getSession().getAttribute("column9");

            if (!column9.equals(null) || !column9.equals("")) {
                columns.addElement(column9);
            }

            String column10 = (String) getSession().getAttribute("column10");

            if (!column10.equals(null) || !column10.equals("")) {
                columns.addElement(column10);
            }

            String column11 = (String) getSession().getAttribute("column11");

            if (!column11.equals(null) || !column11.equals("")) {
                columns.addElement(column11);
            }

            String column12 = (String) getSession().getAttribute("column12");

            if (!column11.equals(null) || !column11.equals("")) {
File Line
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 112
edu/columbia/rascal/presentation/tools/htmlGen/CUHtmlMoveToSelectList.java 633
                cellBuffer.append("<option value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</option>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 0);

        // set up cell 1:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append(
            "<INPUT VALUE=\">>\" TYPE=\"BUTTON\" NAME=\"availableToSelected\" onClick=\"moveToSelected('"
            );
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("','");
        cellBuffer.append(maxSelect);
        cellBuffer.append("')\">");
        cellBuffer.append("\n<br>\n");
        cellBuffer.append(
            "<INPUT VALUE=\"<<\" TYPE=\"BUTTON\" NAME=\"selectedToAvailable\" onClick=\"moveFromTo('"
            );
        cellBuffer.append(selectedName);
        cellBuffer.append("','");
        cellBuffer.append(availableName);
        cellBuffer.append("','");
        cellBuffer.append(formName);
        cellBuffer.append("')\">\n");

        columns.setElementAt(cellBuffer.toString(), 1);

        // set up cell 2:
        cellBuffer = new StringBuffer(200);
        cellBuffer.append("<SELECT SIZE=\"");
        cellBuffer.append(listSize);
        cellBuffer.append("\" MULTIPLE NAME=\"");
        cellBuffer.append(selectedName);
        cellBuffer.append("\">\n");

        if (selected.size() == 0) { // construct a "stretcher" record to make
                                    // the list box wide enough in Netscape

            for (int x = 0; x < (maxLength * 2); x++) {
                spaceString += "&nbsp;";
            }

            cellBuffer.append("<OPTION value=\"");
            cellBuffer.append(DUMMYKEY);
            cellBuffer.append("\">");
            cellBuffer.append(spaceString);
            cellBuffer.append("</OPTION>\n");
        } else {

            for (int i = 0; i < selected.size(); i++) {
                String selectedString = (String) selected.elementAt(i);
                int index = selectedString.indexOf(";");
                String key = selectedString.substring(0, index);
                String value = selectedString.substring(index + 1);
                cellBuffer.append("<OPTION value=\"");
                cellBuffer.append(key);
                cellBuffer.append("\">");
                cellBuffer.append(value);
                cellBuffer.append("</OPTION>\n");
            }
        }

        cellBuffer.append("</SELECT>\n");

        columns.setElementAt(cellBuffer.toString(), 2);

        getTable().addRowFor(columns);

        for (int i = 0; i < 2; i++) {
            getTable().getCell(i, 0).setAlign("CENTER");
            getTable().getCell(i, 0).setWidth("45%");
            getTable().getCell(i, 1).setAlign("CENTER");
            getTable().getCell(i, 1).setWidth("10%");
            getTable().getCell(i, 2).setAlign("CENTER");
            getTable().getCell(i, 2).setWidth("45%");
        }

    }

    /**
     * Creates a new $class.name$ object.
     *
     * @param  availableName  TODO: DOCUMENT ME!
     * @param  available      TODO: DOCUMENT ME!
     * @param  selectedName   TODO: DOCUMENT ME!
     * @param  selected       TODO: DOCUMENT ME!
     * @param  fontName       TODO: DOCUMENT ME!
     * @param  formName       TODO: DOCUMENT ME!
     * @param  maxSelect      TODO: DOCUMENT ME!
     */
    public CUHtmlMoveToSelectList(String availableName, // unique name for
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportApprovalHistoryServlet.java 115
edu/columbia/rascal/presentation/propTrak/servlets/PtReportDeptServlet.java 161
        Vector columns = new Vector();


        try {

            columns.addElement(""); // space holder for column sort

            String column0 = (String) getSession().getAttribute("column0");

            if (!column0.equals(null) || !column0.equals("")) {

                columns.addElement(column0);
            }

            String column1 = (String) getSession().getAttribute("column1");

            if (!column1.equals(null) || !column1.equals("")) {
                columns.addElement(column1);
            }

            String column2 = (String) getSession().getAttribute("column2");

            if (!column2.equals(null) || !column2.equals("")) {
                columns.addElement(column2);
            }

            String column3 = (String) getSession().getAttribute("column3");

            if (!column3.equals(null) || !column3.equals("")) {
                columns.addElement(column3);
            }

            String column4 = (String) getSession().getAttribute("column4");

            if (!column4.equals(null) || !column4.equals("")) {
                columns.addElement(column4);
            }

            String column5 = (String) getSession().getAttribute("column5");

            if (!column5.equals(null) || !column5.equals("")) {
                columns.addElement(column5);
            }

            String column6 = (String) getSession().getAttribute("column6");

            if (!column6.equals(null) || !column6.equals("")) {
                columns.addElement(column6);
            }

            String column7 = (String) getSession().getAttribute("column7");

            if (!column7.equals(null) || !column7.equals("")) {
                columns.addElement(column7);
            }

            String column8 = (String) getSession().getAttribute("column8");

            if (!column8.equals(null) || !column8.equals("")) {
                columns.addElement(column8);
            }

            String column9 = (String) getSession().getAttribute("column9");

            if (!column9.equals(null) || !column9.equals("")) {
                columns.addElement(column9);
            }

            String column10 = (String) getSession().getAttribute("column10");

            if (!column10.equals(null) || !column10.equals("")) {
                columns.addElement(column10);
            }

            String column11 = (String) getSession().getAttribute("column11");

            if (!column11.equals(null) || !column11.equals("")) {
                columns.addElement(column11);
            }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixIContrSubsView.java 107
edu/columbia/rascal/presentation/appendix/pages/AppendixIReportView.java 521
        	if(StringUtils.isNotBlank(subs.getDrugName()))
        	   cols.add(getTextWidgetFor(subs.getDrugName() , 1, false));
        	else 
        	   cols.add(getTextWidgetFor("", 1, false));
        	if(subs.getSchedule() != null) 
        	   cols.add(getTextWidgetFor(Integer.toString( subs.getSchedule() ) , 1, false));
            else
               cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getNationalDrugCode()))
        	   cols.add(getTextWidgetFor(subs.getNationalDrugCode() , 1, false));
        	else
        	   cols.add(getTextWidgetFor("", 1, false));	
        	if(subs.getMaxQuantity() != null)
        	   cols.add(getTextWidgetFor(Integer.toString( subs.getMaxQuantity() ) , 1, false));
        	else
        	   cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getStoredUnit()))
        	   cols.add(getTextWidgetFor(subs.getStoredUnit() , 1, false));
        	else
        	   cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getStorPhysicalForm()))
        	   cols.add(getTextWidgetFor(subs.getStorPhysicalForm() , 1, false));
        	else
         	   cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getStorConcentration()))
        	   cols.add(getTextWidgetFor(subs.getStorConcentration() , 1, false));
        	else
          	   cols.add(getTextWidgetFor("", 1, false));
        	if(subs.getMaxUsed() != null)
        	   cols.add(getTextWidgetFor(Double.toString( subs.getMaxUsed() ) , 1, false));
        	else
           	   cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getUseUnit()))
        	   cols.add(getTextWidgetFor(subs.getUseUnit() , 1, false));
        	else
           	   cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getLabPhysicalForm()))
        	   cols.add(getTextWidgetFor(subs.getLabPhysicalForm() , 1, false));
        	else
           	   cols.add(getTextWidgetFor("", 1, false));
        	if(StringUtils.isNotBlank(subs.getLabConcentration()))
        	   cols.add(getTextWidgetFor(subs.getLabConcentration() , 1, false));
        	else
        	   cols.add(getTextWidgetFor("", 1, false));
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportApprovalHistoryServlet.java 118
edu/columbia/rascal/presentation/propTrak/servlets/PtReportSignoffServlet.java 221
        try {

            columns.addElement(""); // space holder for column sort

            String column0 = (String) getSession().getAttribute("column0");

            if (!column0.equals(null) || !column0.equals("")) {

                columns.addElement(column0);
            }

            String column1 = (String) getSession().getAttribute("column1");

            if (!column1.equals(null) || !column1.equals("")) {
                columns.addElement(column1);
            }

            String column2 = (String) getSession().getAttribute("column2");

            if (!column2.equals(null) || !column2.equals("")) {
                columns.addElement(column2);
            }

            String column3 = (String) getSession().getAttribute("column3");

            if (!column3.equals(null) || !column3.equals("")) {
                columns.addElement(column3);
            }

            String column4 = (String) getSession().getAttribute("column4");

            if (!column4.equals(null) || !column4.equals("")) {
                columns.addElement(column4);
            }

            String column5 = (String) getSession().getAttribute("column5");

            if (!column5.equals(null) || !column5.equals("")) {
                columns.addElement(column5);
            }

            String column6 = (String) getSession().getAttribute("column6");

            if (!column6.equals(null) || !column6.equals("")) {
                columns.addElement(column6);
            }

            String column7 = (String) getSession().getAttribute("column7");

            if (!column7.equals(null) || !column7.equals("")) {
                columns.addElement(column7);
            }

            String column8 = (String) getSession().getAttribute("column8");

            if (!column8.equals(null) || !column8.equals("")) {
                columns.addElement(column8);
            }

            String column9 = (String) getSession().getAttribute("column9");

            if (!column9.equals(null) || !column9.equals("")) {
                columns.addElement(column9);
            }

            String column10 = (String) getSession().getAttribute("column10");

            if (!column10.equals(null) || !column10.equals("")) {
                columns.addElement(column10);
            }

            String column11 = (String) getSession().getAttribute("column11");

            if (!column11.equals(null) || !column11.equals("")) {
                columns.addElement(column11);
            }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixReportProtocolHazMatView.java 242
edu/columbia/rascal/presentation/appendix/pages/AppendixReportPtHazMatView.java 229
        getForm().add("<div align=\"center\">");
        getForm().add(
            "<p><font face=\"" + getDefaultFontName() + "\" size=\"4\"> RASCAL Reporting <br>"
            );
        getForm().add("Columbia University</font><br> </p> ");
        getForm().add(
            "<p><font face=\"" + getDefaultFontName() + "\"><b>Hazardous Materials Report</b><br>"
            );
        getForm().add(anApplication);
        getForm().add(" Records<br>");
        getForm().add(aLocation);
        getForm().add("<br>");
        getForm().add(" from ");
        getForm().add(aFromDate);
        getForm().add(" to ");
        getForm().add(aToDate);
        getForm().add("</font></p> ");
        getForm().add("</div>");

    }

    /** TODO: DOCUMENT ME! */
    public void addKey() {

        getForm().add("<div align=\"center\">");
        getForm().add("<p><font face=\"" + getDefaultFontName() +
            "\" size=\"1\"> Hazardous Materials Key <br>"
            );
        getForm().add("</div>");

        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setWidth("45%");
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setCellSpacing(0);
        aTable.setCellPading(0);

        Vector columns = new Vector(2);


        columns.addElement(getWidgetFor("Recombinant DNA"));
        columns.addElement(getWidgetFor("A"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("Infectious Agents"));
        columns.addElement(getWidgetFor("B"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("Human Blood, Human Cell Lines, or OPIM"));
        columns.addElement(getWidgetFor("C"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("Strong Light Sources"));
        columns.addElement(getWidgetFor("D"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("Hazardous Chemicals or Toxins"));
        columns.addElement(getWidgetFor("E"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("Radiation"));
        columns.addElement(getWidgetFor("F"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("Strong Radio Frequency sources"));
        columns.addElement(getWidgetFor("R"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        columns.addElement(getWidgetFor("X-Ray"));
        columns.addElement(getWidgetFor("O"));
        aTable.addRowFor(columns);
        columns = new Vector(2);

        // aTable.getCell(0,0).setWidth("50%");
        aTable.getCell(0, 1).setWidth("30");


        getForm().add(aTable);

    }

    /** @see  edu.columbia.rascal.presentation.appendix.pages.AppendixQueueView#addSubTitle() */
    @Override public void addSubTitle() {

        setSubTitle("Approved Protocols with Hazardous Materials");
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 55
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 131
    public static Vector buildApprovalResults(java.sql.ResultSet res, String name, Vector v) {
        Vector row = new Vector(9);
        String modify = "";

        try {

            if (name.equals(IrbNameConstants.PROTOCOL_HEADER)) {

                while (res.next()) {
                    row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue())
                        .toString()
                        ); // protocol oid
                    modify = res.getInt(4) + "";

                    if (res.getInt(4) < 10) modify = "0" + modify;

                    row.addElement(res.getString(2) + " (Y" + res.getInt(3) + " M" + modify + ")"); // protocol number
                    row.addElement(name);
                    row.addElement(res.getString(6));                                               // title
                    row.addElement(res.getString(5));                                               // PI
                    row.addElement(Integer.valueOf((new Float(res.getFloat(7))).intValue())
                        .toString()
                        );                                                                          // event oid
                    row.addElement(res.getString(8));
                    row.addElement(Integer.valueOf((new Float(res.getFloat(9))).intValue())
                        .toString()
                        );                                                                          // approvalOid
                    row.addElement(res.getString(10));                                              // approval code

                    v.addElement(row.clone());
                    row = new Vector(9);

                } // end while
            } else {

                while (res.next()) {
                    row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue())
                        .toString()
                        ); // protocol oid
                    row.addElement(res.getString(2));
                    row.addElement(name);

                    if (res.getString(4) == null)
                        row.addElement("");
                    else
                        row.addElement(res.getString(4)); // title

                    row.addElement(res.getString(3)); // PI
                    row.addElement(Integer.valueOf((new Float(res.getFloat(5))).intValue())
                        .toString()
                        );                            // event oid
                    row.addElement(res.getString(6));
                    row.addElement(Integer.valueOf((new Float(res.getFloat(7))).intValue())
                        .toString()
                        );                            // ApprovalOid
                    row.addElement(res.getString(8)); // approval code
                    v.addElement(row.clone());
                    row = new Vector(9);
                }
            }
        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return v;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   res   TODO: DOCUMENT ME!
     * @param   name  TODO: DOCUMENT ME!
     * @param   v     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static Vector buildApprovedResults(java.sql.ResultSet res, String name, Vector v) {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 403
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovalQueueView.java 436
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovedQueueView.java 222
        aCell.setAlign("left");
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix F
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_ISO_REQ) != null) &&
                (queueItem.get(KEY_RADIO_ISO_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // Strong Radio Frequencies
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_FREQ_REQ) != null) &&
                (queueItem.get(KEY_RADIO_FREQ_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // XRay
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_XRAY_REQ) != null) &&
                (queueItem.get(KEY_XRAY_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;
    }
}
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 554
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 280
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 403
        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // appendix F
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_ISO_REQ) != null) &&
                (queueItem.get(KEY_RADIO_ISO_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // Strong Radio Frequencies
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_RADIO_FREQ_REQ) != null) &&
                (queueItem.get(KEY_RADIO_FREQ_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;

        // XRay
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_XRAY_REQ) != null) &&
                (queueItem.get(KEY_XRAY_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        colNum++;
    }
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaHtmlView.java 260
edu/columbia/rascal/presentation/user/views/RuHtmlView.java 172
        int year = Integer.parseInt(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   fieldName  TODO: DOCUMENT ME!
     * @param   dayIndex   TODO: DOCUMENT ME!
     *
     * @return  CUHtmlList
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {


        EVector list = new EVector();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");


        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);


    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixDView.java 228
edu/columbia/rascal/presentation/ic/views/IacucHtmlView.java 113
        int year = Integer.valueOf(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;
    }

    /**
     * @see  edu.columbia.rascal.presentation.appendix.pages.AppendixHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {

        Vector<String> list = new Vector<String>();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");


        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);


    }
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaHtmlView.java 260
edu/columbia/rascal/presentation/consent/pages/ConsentHtmlView.java 347
edu/columbia/rascal/presentation/irb/pages/IrbHtmlView.java 388
edu/columbia/rascal/presentation/propTrak/pages/PtHtmlView.java 321
        int year = Integer.parseInt(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   fieldName  TODO: DOCUMENT ME!
     * @param   dayIndex   TODO: DOCUMENT ME!
     *
     * @return  CUHtmlList
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {


        EVector list = new EVector();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");


        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);


    }

    /**
     * Insert the method's description here. Creation date: (2/20/2002 2:09:52 PM)
     *
     * @param   eventName  TODO: DOCUMENT ME!
     *
     * @return  java.lang.String
     */
    public String getDisplayStringFor(String eventName) {
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentHtmlView.java 347
edu/columbia/rascal/presentation/irb/pages/IrbHtmlView.java 388
edu/columbia/rascal/presentation/propTrak/pages/PtHtmlView.java 321
edu/columbia/rascal/presentation/user/views/RuHtmlView.java 172
        int year = new Long(currentDate.substring(6)).intValue();

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {


        EVector list = new EVector();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");


        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);


    }
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaSearchYearlyView.java 89
edu/columbia/rascal/presentation/agenda/pages/IrbMinuteSearchYearlyView.java 89
        CUHtmlText aText = new CUHtmlText("Select " + getReportType() + " to View");
        aText.setFontSize("3");
        aText.setFontName(getDefaultFontName());
        aText.setAlignment("center");
        aText.setIsBold(true);

        add(aText);

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("100%");

        getSection(getMinutes(), aTable, getReportType());
        getForm().add(aTable);
        add(getForm());

    }

    /**
     * Insert the method's description here. Creation date: (12/6/2002 2:21:36 PM)
     *
     * @return  java.util.Vector
     */
    public java.util.Vector getMinutes() {
        return minutes;
    }

    /**
     * Insert the method's description here. Creation date: (11/18/2002 2:19:01 PM)
     *
     * @return  java.lang.String
     */
    public java.lang.String getReportType() {
        return reportType;
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  results  TODO: DOCUMENT ME!
     * @param  aTable   TODO: DOCUMENT ME!
     * @param  type     TODO: DOCUMENT ME!
     */
    public void getSection(Vector results, CUHtmlTable aTable, String type) {

        Vector row = new Vector(3);

        row.addElement(getHeadingLabelFor(type + " Number"));
        row.addElement(getHeadingLabelFor("Short Agenda"));
        row.addElement(getHeadingLabelFor("Committee"));
        row.addElement(getHeadingLabelFor("Status"));
        row.addElement(getHeadingLabelFor("Meeting Date"));


        aTable.addRowFor(row);
        row = new Vector(5);

        for (int i = 0; i < results.size(); i++) {
            Vector currentRow = (Vector) results.elementAt(i);

            if (hasEditAccess(
                        ServiceLocator.getIrbAgendaHeaderService().getHeaderByOid(
                            (String) currentRow.elementAt(0)
                            ), type
                        )
            )
                row.addElement(getLinkWidgetFor(((String) currentRow.elementAt(1)).trim(),
                        "IrbAgendaRetrieveServlet?anOid=" + currentRow.elementAt(0)
                        )
                    ); // agendaId
            else {

                if (type.equals("Agendas"))
                    row.addElement(getDataSheetLinkWidgetFor(
                            ((String) currentRow.elementAt(1)).trim(),
                            (String) currentRow.elementAt(0)
                            )
                        ); // agendaId
                else
                    row.addElement(getLinkWidgetFor(((String) currentRow.elementAt(1)).trim(),
                            "IrbAgendaRetrieveServlet?anOid=" + currentRow.elementAt(0)
                            )
                        ); // agendaId

            }

            row.addElement(getShortAgendaLinkWidgetFor(((String) currentRow.elementAt(1)).trim(),
                    (String) currentRow.elementAt(0)
                    )
                ); // agendaId
            row.addElement(getWidgetFor(
                    ServiceLocator.getIrbCommitteeService().findById(
                            Long.valueOf((String) currentRow.elementAt(2))
                        ).getCommitteeName()
                    )
                );
            row.addElement(getWidgetFor((String) currentRow.elementAt(3)));

            Object dateObj = currentRow.elementAt(4);

            if (dateObj instanceof java.sql.Date) {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 353
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovalQueueView.java 512
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovalQueueView.java 237
        aTitle = getTableColumnName("Release");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        aTitle1 = getTableColumnName("Date");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // P.I.
        aTitle = getTableColumnName("Principal Investigator", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        colNum++;

        // Species
        aTitle = getTableColumnName("Species", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        colNum++;

        // Primary Site
        aTitle1 = getTableColumnName("Primary Site", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Current Status
        aTitle1 = getTableColumnName("Current Status", "left");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Highest Pain Level
        aTitle = getTableColumnName("Maximum");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        aTitle1 = getTableColumnName("Pain");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendices
        aTitle = getTableColumnName("Appendices");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        header.setColumnsToSpan(6);

        // Appendix A
        aTitle1 = getTableColumnName("A");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix B
        aTitle1 = getTableColumnName("B");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix C
        aTitle1 = getTableColumnName("C");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix D
        aTitle1 = getTableColumnName("D");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix E
        aTitle1 = getTableColumnName("E");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix F
        aTitle1 = getTableColumnName("F");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Strong Radio Frequency
        aTitle1 = getTableColumnName("SRF");
File Line
edu/columbia/rascal/presentation/lab/pages/HzAppendixCreatedView.java 191
edu/columbia/rascal/presentation/lab/pages/HzAppendixCreationView.java 92
    public void addDefaultRows(CUHtmlTable aTable, int numCells) {
        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        Object aWidget;
        HzAppendixHeader hah = getProtocol();

        // Animal housing location
        aWidget = getSiteLocationWidget();
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Being Submitted to  &nbsp",
                "ihelp2.html"
                )
            );
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // title
        aWidget = getMultilineTextWidgetFor("headerTitle", "2", "30",
                hah.getTitle()
                );
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor(
                "Title &nbsp<br>(maximum 255 characters)  &nbsp", "ihelp3.html"
                )
            );
        aTable.getCell(row, 0).setVAlign("top");
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        // sponsoring department
        String deptNumber = hah.getDeptNumber();
        aWidget = getEditWidgetFor("originatingDepartment", deptNumber, "3", "3");

// ((CUHtmlEntryField) aWidget).setOnKeyPress("return
// restrictFieldToNumbers(event)");
        columns.setElementAt(aWidget, 1);

        CUHtmlImage i = new CUHtmlImage("/images/popup.gif");
        i.setAlt("Department Lookup");
        i.setLink("RascalDepartmentLookup");
        i.setOnClick(
            "return departmentOpenSearchWindow('','originatingDepartment','originatingSubDepartment','originatingSubSubDepartment')"
            );
        i.setBorderWidth(0);

        String name = hah.getDeptName(); // Note that each subclass may
                                         // invoke different getDeptName

        columns.setElementAt(getWidgetFor(name), 2);
        columns.setElementAt(i, 3);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor(
                "Originating Department &nbsp", "ihelp63.html"
                )
            );
        aTable.getCell(row, 3).setAlign("LEFT");
        row++;
        columns.setElementAt("", 2);
        columns.setElementAt("", 3);

        // sponsorSubDeptNum
        aWidget = getEditWidgetFor("originatingSubDepartment",
                hah.getSubDeptNumber(), "2", "2"
                );
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Sub-Department &nbsp",
                "ihelp64.html"
                )
            );
        row++;

        // sub sub department
        aWidget = getEditWidgetFor("originatingSubSubDepartment",
                hah.getSubSubDeptNumber(), "2", "2"
                );
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Sub sub department &nbsp",
                "ihelp65.html"
                )
            );
        aTable.getCell(row, 1).setColumnsToSpan(3);
        row++;

        addSpacerRows(aTable, numCells, 1, "10");
        row++;

    }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportCommitteeOverallStats2View.java 156
edu/columbia/rascal/presentation/irb/pages/IrbReportOverallCommStatsAfterLogInView.java 193
        };
        Vector columns = new Vector();
        int titleLen = titles.length;

        for (String title : titles) {
            columns.add(title);

        }

        return columns;

    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  aTable  TODO: DOCUMENT ME!
     */
    public void getReportExplanationKeyWidget(CUHtmlTable aTable) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        CUHtmlTableCell aCell = new CUHtmlTableCell();

        String keyName;
        String keyText;
        CUHtmlTableCell header;

        keyText = "Key:";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyText, 2, false));
        aCell.setAlign("center");
        aCell.setVAlign("bottom");
        aRow.add(aCell);

        aCell = new CUHtmlTableCell();
        aRow.add(aCell);

        aTable.add(aRow);

        aRow = new CUHtmlTableRow();

        keyName = "1";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyName, -2, false));
        aCell.setAlign("center");
        aCell.setVAlign("top");
        aRow.add(aCell);

        keyText = "The number events approved within specified date range.";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyText, -2, false));
        aCell.setAlign("left");
        aCell.setVAlign("top");
        aRow.add(aCell);

        aTable.add(aRow);

        aRow = new CUHtmlTableRow();

        keyName = "2";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyName, -2, false));
        aCell.setAlign("center");
        aCell.setVAlign("top");
        aRow.add(aCell);

        keyText = "The number of return actions for events approved within specified date range.";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyText, -2, false));
        aCell.setAlign("left");
        aCell.setVAlign("top");
        aRow.add(aCell);

        aTable.add(aRow);

        aRow = new CUHtmlTableRow();

        keyName = "3";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyName, -2, false));
        aCell.setAlign("center");
        aCell.setVAlign("top");
        aRow.add(aCell);

        keyText =
            "The ratio of number of returns to number of events approved within specified date range.";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyText, -2, false));
        aCell.setAlign("left");
        aCell.setVAlign("top");
        aRow.add(aCell);

        aTable.add(aRow);

        aRow = new CUHtmlTableRow();

        keyName = "4";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyName, -2, false));
        aCell.setAlign("center");
        aCell.setVAlign("top");
        aRow.add(aCell);

        keyText =
File Line
edu/columbia/rascal/presentation/common/pdf/CURascalPDFFormConstruction.java 714
edu/columbia/rascal/presentation/common/pdf/CURascalPDFFormConstruction.java 866
    public void addVectorContentWithCellPadding(Vector v, float p[], PDFStyle style, int cellPad) {

        if (style == null) style = getStyle();

        if (cellPad == 0) cellPad = 10;

        String content = "";
        String label = "";
        int originalPageNum = getPDFObject().getNumberOfPages();
        int startPageNum = originalPageNum;
        int prevPageNum = startPageNum;
        int currPageNum = startPageNum;
        float prevOverflow = 0;
        float currOverflow = 0;
        PDFPage originalPage = getPDFObject().getPage(originalPageNum - 1);
        float left = getLeftPageMargin();
        float right = 0;
        float oriHeight = getHeight(); // fw 03/24/2003
        float lineSpace = 0;
        float overflow = 0;

        if (v != null) {

            if (v.size() != 0) {
                float textSize = (getPageWidth() - getLeftPageMargin() - getRightPageMargin() -
                        (getPDFPage().UNITS_POINTS * v.size())) / (v.size());

                if (p == null) {
                    p = new float[v.size()];

                    for (int pcount = 0; pcount < p.length; pcount++) {
                        p[pcount] = textSize;
                    }

                }
            }

            for (int i = 0; i < v.size(); i++) {

                content = v.get(i).toString();
                originalPage = getPDFObject().getPage(originalPageNum - 1);
                setPDFPage(originalPage);
                setPageFeature();

                prevPageNum = currPageNum;
                prevOverflow = currOverflow;
                currOverflow = 0;

                if (i == 0) {
                    left = getLeftPageMargin();
                    right = left + p[i];
                } else if (i == (v.size() - 1)) {
                    left = right + (getPDFPage().UNITS_POINTS / cellPad);
                    right = getPageWidth() - getRightPageMargin();
                } else {
                    left = right + (getPDFPage().UNITS_POINTS / cellPad);
                    right = left + p[i];
                }

                // added fw 03/24/2003
                StringTokenizer contentToken = new StringTokenizer(content, "\n", true);
                lineSpace = style.getFontLeading();
                overflow = 0;

                int previousPageNum = getPDFPage().getPageNumber();
                String nextTokenValue = "";
                setPDFPage(originalPage);
                setHeight(oriHeight); // fw 03/24/2003

                while (contentToken.hasMoreElements()) {

                    nextTokenValue = contentToken.nextElement().toString();

                    try {
                        overflow = addContentItem(getPDFPage(), nextTokenValue, left, right, style);
                    } catch (Exception e) { }

                    if (overflow == 0) { // overflow = lineSpace;
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixChemicalView.java 277
edu/columbia/rascal/presentation/appendix/pages/AppendixIContrSubsView.java 238
                );

        for (int i = 0; i < locations.size(); i++) {
            AppendixLocation aLocation = (AppendixLocation) locations.elementAt(i);
            columns = new Vector(6);

            if (aLocation.getLocationType() == null || aLocation.getLocationType().trim().equals("")) {
                columns.add(image);
            } else {
                columns.add(
                    "<font face=\"" + getDefaultFontName() + "\" size =\"1\">" +
                    "&nbsp;" + aLocation.getLocationType() + "</font>"
                    );
            }

            if (aLocation.getBuilding() == null || aLocation.getBuilding().trim().equals("")) {
                columns.add(image);
            } else {
                columns.add(
                    "<font face=\"" + getDefaultFontName() + "\" size =\"1\">" +
                    "&nbsp;" + aLocation.getBuilding() + "</font>"
                    );
            }

            if (aLocation.getFloor() == null || aLocation.getFloor().trim().equals("")) {
                columns.add(image);
            } else {
                columns.add(
                    "<font face=\"" + getDefaultFontName() + "\" size =\"1\">" +
                    "&nbsp;" + aLocation.getFloor() + "</font>"
                    );
            }

            if (aLocation.getRoom() == null || aLocation.getRoom().trim().equals("")) {
                columns.add(image);
            } else {
                columns.add(
                    "<font face=\"" + getDefaultFontName() + "\" size =\"1\">" +
                    "&nbsp;" + aLocation.getRoom() + "</font>"
                    );
            }

            // Modify Location
            CUHtmlImage modify = getWidgetPopUpWindowButton(
                    AppendixLocationEntryServlet.class.getName() + "?" + KEY_PARM_LOCATION_OID +
                    "=" + aLocation.getId().toString(),
                    "Modify",
                    "EditLocation",
                    "350",
                    "600"
                    );

            columns.add(modify);

            // Delete Location
            CUHtmlImage trash = getWidgetImageTrashCanButton(
                    AppendixLocationRemoveServlet.class.getName() + "?" + KEY_PARM_LOCATION_OID +
                    "=" + aLocation.getId().toString(),
                    "Delete"
                    );

            columns.add(trash);

            aTable.addRowFor(columns);

            aTable.getCell(row, 0).setAlign("left");
            aTable.getCell(row, 1).setAlign("left");
            aTable.getCell(row, 2).setAlign("left");
            aTable.getCell(row, 3).setAlign("left");
            aTable.getCell(row, 4).setAlign("Center");
            aTable.getCell(row, 5).setAlign("Center");
            row++;
        }

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportCancerCenterStatusView.java 74
edu/columbia/rascal/presentation/irb/pages/IrbReportCancerCenterStatusView.java 205
        columns.addElement("PI");
        columns.addElement("DepartmentName");
        columns.addElement("Committee");
        columns.addElement("Approved");
        columns.addElement("Expiration");


        if (!(getDownloadable())) {
            addHeader();
            getForm().add(addDate());
            getForm().add("<br>");
            getForm().add(addDateRange());
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("irb205.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
                    IrbReportCancerCenterDateRangeServlet.class.getName() + "'"
                    );

            getForm().add("<BR>");
            getForm().add("<BR>");
            bTable.add(pb1);
            getForm().add(bTable);
        }

        setOnLoad("parent.frames[1].location='" + IrbReportLinkFrameServlet.class.getName() + "'");
        add(getForm());
        render();
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   rows          TODO: DOCUMENT ME!
     * @param   print         TODO: DOCUMENT ME!
     * @param   sortColumn    TODO: DOCUMENT ME!
     * @param   beginDate     TODO: DOCUMENT ME!
     * @param   endDate       TODO: DOCUMENT ME!
     * @param   downloadable  TODO: DOCUMENT ME!
     * @param   showTitle     TODO: DOCUMENT ME!
     *
     * @author  Halayn Hescock
     */
    public IrbReportCancerCenterStatusView(Vector rows, boolean print, String sortColumn,
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsFirstSubmissionStatusView.java 264
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsStatusView.java 272
            );
        getForm().add("<font face=\"Comic Sans MS\" size=\"3\"> Protocols Submitted  ");

        getForm().add("</font><br><font face=\"Comic Sans MS\" size=\"2\"> From ");
        getForm().add(aFromDate);
        getForm().add(" to ");
        getForm().add(aToDate);
        getForm().add("</font></p> ");
        getForm().add("</div>");

    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  java.lang.String
     */
    public String getBeginDate() {
        return beginDate;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  boolean
     */
    public boolean getDownloadable() {
        return downloadable;
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  java.lang.String
     */
    public String getEndDate() {
        return endDate;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   columns  TODO: DOCUMENT ME!
     *
     * @return  Vector
     */
    public Vector getKeywordListForColumns(Vector columns) {

        Vector keyList = new Vector(15);
        keyList.addElement("");

        for (int i = 0; i < columns.size(); i++) {
            keyList.addElement(columns.elementAt(i));
        }

        return keyList;
    }

    /**
     * getPrintable.
     *
     * @return  getPrintable.
     */
    public boolean getPrintable() {

        return printable;
    }

    /**
     * getPrintable.
     *
     * @return  getPrintable.
     */
    public String getSortBy() {

        if (sortBy == null) sortBy = "";

        return sortBy;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   queueName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String getUrlToPrintReport(String queueName) {

        return "return openNewSorted(" + '\'' + getServletName() + "'," + "'columnNamesList" + queueName + "', '" + queueName + "'," + "'IrbClinicalTrialsReport', " + "'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600'" + ')';
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   queueName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String getUrlToViewReportForDownload(String queueName) {

        return "return openNewSortedForDownload(" + '\'' + getServletName() + "'," + "'columnNamesList" + queueName + "', '" + queueName + "'," + "'IrbClinicalTrialsReport', " + "'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600'" + ')';
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    public Object getWidgetFor(Float aString) {

        CUHtmlText text = new CUHtmlText(aString.toString());

        if (aString == null) {
            text = new CUHtmlText("");
            text.setFontSize("1");
            text.setFontName("Comic Sans MS");

        } else {

            text.setFontSize("1");
            text.setFontName("Comic Sans MS");
        }

        return text;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getWidgetFor(String aString) {

        if (aString == null) aString = "";

        CUHtmlText text = new CUHtmlText(aString);
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        if (aString.startsWith("http://") || aString.startsWith("www.")) {
            text.setLink(aString);
        }

        return text;
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  newValue  java.lang.String
     */
    public void setBeginDate(String newValue) {
        this.beginDate = newValue;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  newValue  boolean
     */
    public void setDownloadable(boolean newValue) {
        this.downloadable = newValue;
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  newValue  java.lang.String
     */
    public void setEndDate(String newValue) {
        this.endDate = newValue;
    }

    /**
     * setPrintable.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setPrintable(boolean aValue) {

        printable = aValue;
    }

    /**
     * setSortBy.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setSortBy(String aValue) {

        sortBy = aValue;
    }
}
File Line
edu/columbia/rascal/presentation/irb/pages/IrbHazardousMaterialView.java 636
edu/columbia/rascal/presentation/lab/pages/HzHazardousMaterialView.java 471
                KEY_PARM_HAZMAT_REDIRECT + "=" + IrbHazardousMaterialServlet.class.getName()
                );

            cell.add(trash);
            cell.setAlign("center");
        }

        cellNum++;

        // modify staff covered by appendix
        cell = aTable.getCell(rowCount, cellNum);

        if (appendixNumber == null) {
            cell.add("<img src=\"/images/blank.gif\" border=\"0\">");
        } else {

            CUHtmlImage im = getWidgetPopUpWindowButton(
                    AppendixStaffHandlesHazmatServlet.class.getName() + '?' + KEY_PARM_APPENDIX_TYPE + '=' + appendixType + "&&" + KEY_PARM_ATTACHED + "=Y",
                    "Staff List",
                    "StaffList"
                    );

            cell = aTable.getCell(rowCount, cellNum);
            cell.add(im);
            cell.setAlign("center");
            cell.setVAlign("center");
        }

        cellNum++;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable  CUHtmlTable
     */
    public void setHazardsListTableHead(CUHtmlTable aTable) {

        CUHtmlText aTitle;
        CUHtmlTableCell header;
        int cellNum = 0;

        // Hazard
        aTitle = new CUHtmlText("Hazardous Agents");
        aTitle.setFontSize("-1");
        aTitle.setFontName(getDefaultFontName());

        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // selection list link
        aTitle = new CUHtmlText("&nbsp;Attach");
        aTitle.setFontSize("-1");
        aTitle.setFontName(getDefaultFontName());

        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // view/print link
        aTitle = new CUHtmlText("&nbsp;Appendix");
        aTitle.setFontSize("-1");
        aTitle.setFontName(getDefaultFontName());

        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // detach appendix
        aTitle = new CUHtmlText("&nbsp;Detach");
        aTitle.setFontSize("-1");
        aTitle.setFontName(getDefaultFontName());

        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Check-off staff covered by appendix
        aTitle = new CUHtmlText("&nbsp;Staff");
        aTitle.setFontSize("-1");
        aTitle.setFontName(getDefaultFontName());

        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;
    }

    /**
     * This method was created in VisualAge. Sets the subtitle of this page. If aSubTitle is a
     * String, use the default subtitle settings. if aSubTitle is CUHtmlText, override the default
     * title settings.
     *
     * @param  aSubTitle  TODO: DOCUMENT ME!
     */
    @Override public void setSubTitle(Object aSubTitle) {


        if (!(aSubTitle instanceof CUHtmlText)) {

            if (aSubTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aSubTitle);
                aText.setFontSize("+2");
                aText.setIsBold(true);
                aText.setAlignment("center");
                aText.setFontName(getDefaultFontName());
                aSubTitle = aText;
            }
        }

        super.setSubTitle(aSubTitle);
    }
}
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFUtilityView.java 705
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFUtilityView.java 853
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFView.java 713
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinutesDataSheetPDFView.java 861
    public void addProtocolAttached(String label, Vector protocolAttached, String eventName) {
        int size = protocolAttached.size();

        if (size > 0) {
            addContent(" ", " ", theStyle);
            addSectionTitle(label);
            setDataSheetFeature();

            // setHeight(getHeight()-getPDFPage().getStyle().getFontLeading());
            String firstLabel = "Protocol Number";
            String thirdLabel = "Title";
            float xyPosition[] = new float[] {};

            if (eventName.equals(IrbNameConstants.ADVERSE_EVENT) || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                thirdLabel = "Keyword";
            }

            int tableSize = 4;

            if (getAgendaView().isProtocol(eventName)) {
                tableSize = 6;
            }

            Vector vLabel = new Vector(tableSize);
            vLabel.add(0, firstLabel);
            vLabel.add(1, "PI");
            vLabel.add(2, thirdLabel);
            vLabel.add(3, "Primary Reviewer");
            vLabel.add(4, "Recommended Status");

            if (getAgendaView().isProtocol(eventName)) {
                xyPosition = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 17, unitXy * 13, unitXy * 15, unitXy * 10,
                    unitXy * 10
                };
                vLabel.add(5, "IRB Approval Date");
                vLabel.add(6, "Expiration Date");
            } else {
                xyPosition = new float[] {
                    unitXy * 15, unitXy * 10, unitXy * 17, unitXy * 13, unitXy * 45
                };
            }

            Vector currentRow = null;
            Vector vContent = new Vector(tableSize);
            String strEUIRB = "";


            for (int i = 0; i < size; i++) {

                addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);
                setHeight(getHeight() - getPDFPage().getStyle().getFontLeading());
                currentRow = (Vector) protocolAttached.elementAt(i);

                strEUIRB = getNotNullString((String) currentRow.elementAt(2), "");

                strEUIRB = "IRB-" + strEUIRB;

                vContent.add(0, strEUIRB);
                vContent.add(1, getNotNullString((String) currentRow.elementAt(4), "")); // pi
                vContent.add(2, getNotNullString((String) currentRow.elementAt(5), "")); // title

                // reviewer
                StringBuilder revString = new StringBuilder("");

                if (getAgendaView().getEventObject((String) currentRow.elementAt(0), eventName) !=
                        null
                ) {
                    Vector reviewers = IrbAgendaProtocolQuery.getPreMinuteApprovalEventReviewersFor(
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaReportAgendaSummaryView.java 434
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaReportByProtocolNumberView.java 275
                elements.addElement(getWidgetFor((String) currentRow.get("Notification")));

                formtable.addRowFor(elements);
                elements = new Vector();
            }
        }
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  boolean
     */
    public boolean getDownloadable() {
        return downloadable;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   columns  TODO: DOCUMENT ME!
     *
     * @return  Vector
     */
    public Vector getKeywordListForColumns(Vector columns) {

        Vector keyList = new Vector(15);
        keyList.addElement("");

        int colSize = columns.size();

        for (int i = 0; i < colSize; i++) {
            keyList.addElement(columns.elementAt(i));
        }

        return keyList;
    }

    /**
     * getPrintable.
     *
     * @return  getPrintable.
     */
    public boolean getPrintable() {

        return printable;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString  is the ProtocolNumber
     * @param   anOid    TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getProtocolLinkWidgetFor(String aString, String anOid) {


        if ((aString == null) || aString.equals("")) {
            return new CUHtmlText("");
        }

        CUHtmlText text = new CUHtmlText(aString);
        text.setLink("Javascript:onClick=parent.frames[2].location='" //+
            //FIXME link IrbProtocolRetrieveServlet.class.getName() + "?anOid=" + anOid + "'"
            );
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        return text;
    }

    /**
     * getPrintable.
     *
     * @return  getPrintable.
     */
    public String getSortBy() {

        if (sortBy == null) sortBy = "";

        return sortBy;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   queueName  protocolOid String
     *
     * @return  String
     */
    public String getUrlToPrintReport(String queueName) {

        String aString = "return openNewSorted(" + '\'' + getServletName() + "'," + "'columnNamesList" + queueName + "', '" + queueName + "'," + "'IrbReport', " + "'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600'" + ')';

        return aString;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   queueName  protocolOid String
     *
     * @return  String
     */
    public String getUrlToViewReportForDownload(String queueName) {

        String aString = "return openNewSortedForDownload(" + '\'' + getServletName() + "'," + "'columnNamesList" + queueName + "', '" + queueName + "'," + "'IrbReport', " + "'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600'" + ')';

        return aString;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    public Object getWidgetFor(Float aString) {

        CUHtmlText text = new CUHtmlText(aString.toString());

        if (aString == null) {
            text = new CUHtmlText("");
            text.setFontSize("1");
            text.setFontName("Comic Sans MS");

        } else {

            text.setFontSize("1");
            text.setFontName("Comic Sans MS");
        }

        return text;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getWidgetFor(String aString) {

        if (aString == null) aString = "";

        CUHtmlText text = new CUHtmlText(aString);
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        if (aString.startsWith("http://") || aString.startsWith("www.")) {
            text.setLink(aString);
        }

        return text;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  newValue  boolean
     */
    public void setDownloadable(boolean newValue) {
        this.downloadable = newValue;
    }

    /**
     * setPrintable.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setPrintable(boolean aValue) {

        printable = aValue;
    }

    /**
     * setSortBy.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setSortBy(String aValue) {

        sortBy = aValue;
    }
}
File Line
edu/columbia/rascal/presentation/appendix/servlets/AppendixGIsotopeEntryServlet.java 153
edu/columbia/rascal/presentation/appendix/servlets/AppendixIsotopeEntryServlet.java 153
            isot = new AppendixIsotope((AppendixG) getAppendix());
            ServiceLocator.getAppendixIsotopeService().save(isot);
        }

        isot.setName(getRequestParameter("isotope"));
        isot.setCompound(getRequestParameter("compound"));

        halfLifeUnit = getRequestParameter("halfLifeUnit");

        if (halfLifeUnit.contains("~")) {
            halfLifeUnit = "";
        }

        isot.setHalfLifeUnit(halfLifeUnit);


        float hlFloat = 0;
        String hl = getRequestParameter("halfLife");

        if (!isEmpty(hl)) {
            hlFloat = Float.parseFloat(hl);
        }

        isot.setHalfLife(hlFloat);
/*
 *      float hlsFloat= 0;     String hls = getRequestParameter("halfLifeInSubject");     if
 * (!isEmpty(hls))     {          hlsFloat = Float.parseFloat(hls);     }
 * isot.setHalfLifeInSubject(hlsFloat);          halfLifeInSubjectUnit =
 * getRequestParameter("halfLifeInSubjectUnit");     if (halfLifeInSubjectUnit.indexOf("~") > -1) {
 *             halfLifeInSubjectUnit = "";     }
 * isot.setHalfLifeInSubjectUnit(halfLifeInSubjectUnit);
 */
        float iaFloat = 0;
        String ia = getRequestParameter("initialActivity");

        if (!isEmpty(ia)) {
            iaFloat = Float.parseFloat(ia);
        }

        isot.setInitialActivity(iaFloat);
        initialActivityUnit = getRequestParameter("initialActivityUnit");

        if (initialActivityUnit.contains("~")) {
            initialActivityUnit = "";
        }

        isot.setInitialActivityUnit(initialActivityUnit);

        routeOfAdmin = getRequestParameter("routeOfAdmin");
        otherRouteOfAdmin = getRequestParameter("otherRoute");

        if ((otherRouteOfAdmin != null) && (otherRouteOfAdmin.length() > 0)) {
            isot.setRouteOfAdministration(otherRouteOfAdmin);
        } else {
            isot.setRouteOfAdministration(routeOfAdmin);
        }

        ServiceLocator.getAppendixIsotopeService().save(isot);
    }

    /**
     * This method was created in VisualAge. @2001 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     */
    @Override public void submit() {

        String errorMsg = "The following fields must be specified:<p>";
        Vector errorList = new Vector();

        String isotope = getRequestParameter("isotope");

        if (isEmpty(isotope)) {
            errorList.addElement("name of the isotope");
        }

        String compound = getRequestParameter("compound");

        if (isEmpty(compound)) {
            errorList.addElement("compound");
        }

        String halfLife = getRequestParameter("halfLife");

        if (isEmpty(halfLife)) {
            errorList.addElement("physical half-life");
        }

        String halfLifeUnit = getRequestParameter("halfLifeUnit");

        if (halfLifeUnit.contains("~")) {
            errorList.addElement("physical half-life unit of measure");
        }
/*
 *      String halfLifeInSubject = getRequestParameter("halfLifeInSubject");
 *
 * String halfLifeInSubjectUnit = getRequestParameter("halfLifeInSubjectUnit");     if
 * (halfLifeInSubject != null              && halfLifeInSubject.trim().length() > 0             &&
 * Float.parseFloat(halfLifeInSubject) > 0             && halfLifeInSubjectUnit.indexOf("~") > -1)
 * {             errorList.addElement("half-life in subject unit of measure");     }
 */
        String initialActivity = getRequestParameter("initialActivity");

        if (isEmpty(initialActivity)) {
            errorList.addElement("initial activity");
        }

        String initialActivityUnit = getRequestParameter("initialActivityUnit");

        if (initialActivityUnit.contains("~")) {
            errorList.addElement("initial activity level unit of measure");
        }

        String routeOfAdmin = getRequestParameter("routeOfAdmin");
        String otherRoute = getRequestParameter("otherRoute");

        if ((routeOfAdmin.contains("~")) && ((otherRoute == null) ||
                    (otherRoute.length() == 0))
        ) {
            errorList.addElement("route of administration");
        }

        if (!(errorList.isEmpty())) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusView.java 77
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusView.java 75
        setSubTitle("IRB Approval Status Report");

        setPrintable(print);
        setDownloadable(downloadable);
        setSortBy(sortColumn);

        String instruction = "";
        Vector columns = new Vector();

        columns.addElement("ProtocolNumber");
        columns.addElement("PI");

        if (event.equals("Protocol") || event.equals("Renewal") || event.equals("Modification"))
            columns.addElement("COI");

        columns.addElement("Committee");
        columns.addElement("StatusDate");

        if (!(getDownloadable())) {
            addHeader();
            getForm().add(addDate());
            getForm().add("<br>");
            getForm().add(addDateRange());
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/tc/views/TCReportByDeptFilterByJobCodeView.java 48
edu/columbia/rascal/presentation/tc/views/TCReportByDeptView.java 71
            setDeptName(createSelectedDepartmentString(selectedDepartments));
            String instruction = "";

            if ((rows == null) || (rows.isEmpty())) {
                add("<br>"); // put a space

                CUHtmlText msgTxt = new CUHtmlText(
                        "There is no data to review. Please select new criteria and try again."
                        );
                msgTxt.setFontName(getDefaultFontName());
                msgTxt.setIsBold(true);
                msgTxt.setFgColor("BLUE5");
                getForm().add(msgTxt);

            } else {

                if (!(getDownloadable())) {
                    addHeader();
                    getForm().add(addDate());
                    getForm().add("<br>");
                }

                if (!(getPrintable())) {
                    CUHtmlTable aTable = getTable(1, 1);
                    aTable.setBorderWidth(0);
                    aTable.setAlign("center");
                    aTable.setWidth("100%");

                    CUHtmlTableRow aRow = new CUHtmlTableRow();
                    CUHtmlTableCell aCell1 = new CUHtmlTableCell();
                    aCell1.setColumnsToSpan(2);
                    aCell1.add(getInstruction(instruction));
                    aRow.add(aCell1);
                    aTable.add(aRow);

                    aRow = new CUHtmlTableRow();
                    aCell1 = new CUHtmlTableCell();
                    aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(allCourses), "A",
                            getSortBy()
                            )
                        );
                    aCell1.setWidth("70%");
                    aCell1.setAlign("center");

                    CUHtmlTableCell aCell4 = new CUHtmlTableCell();
                    aCell4.add(getHelpFor("rpt1.html"));

                    CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                            getUrlToPrintReport("A")
                            );
                    CUHtmlTableCell aCell2 = new CUHtmlTableCell();
                    aCell2.add(pb);

                    pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                            getUrlToViewForDownload("A")
                            );

                    CUHtmlTableCell aCell3 = new CUHtmlTableCell();
                    aCell3.add(pb);

                    aRow.add(aCell1);
                    aRow.add(aCell4);
                    aRow.add(aCell2);
                    aRow.add(aCell3);
                    aTable.add(aRow);

                    getForm().add(aTable);
                    getForm().add("<br>");

                }

                getForm().add(getReportTable(rows, allCourses));

            }

            if (!(getPrintable())) {

                getForm().add("<BR>");

                CUHtmlTable bTable = getTable(1, 1);
                bTable.setBorderWidth(0);
                bTable.setAlign("center");
                bTable.setWidth("30");

                CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", " Return ",
                        "parent.frames[2].location='" + TCReportDeptSelectionServlet.class.getName() +
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsFirstSubmissionStatusView.java 132
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsStatusView.java 134
                    IrbReportClinicalTrialsFirstSubmissionDateRangeServlet.class.getName() + "'"
                    );

            getForm().add("<BR>");
            getForm().add("<BR>");
            bTable.add(pb1);
            getForm().add(bTable);
        }

        add(getForm());
        render();

    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlText addDate() {

        String today = new java.util.Date().toString();
        CUHtmlText date = new CUHtmlText(today);
        date.setFontSize("1");
        date.setAlignment("center");
        date.setFontName(getDefaultFontName());

        return date;
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  rows     TODO: DOCUMENT ME!
     * @param  columns  TODO: DOCUMENT ME!
     */
    public void addGeneralInformation(Vector rows, Vector columns) {

        CUHtmlTable t = new CUHtmlTable();
        t.setBorderWidth(0);
        t.setWidth("95%");
        t.setAlign("center");
        t.setCellPadding(2);

        Object dateObj = null;
        Vector smallfont = new Vector(); // to make thesame font of header and rows

        for (Enumeration e = columns.elements(); e.hasMoreElements();) {
            smallfont.addElement(getWidgetFor(e.nextElement().toString()));
        }

        t.addRowFor(smallfont);
        elements = new Vector();

        String name = null;
        int rowSize = rows.size();

        for (int n = 0; n < rowSize; n++) {
            Hashtable currentRow = (Hashtable) rows.elementAt(n);

            if (currentRow.containsKey("ProtocolNumber")) {
                name = (String) currentRow.get("ProtocolNumber");

                if (!(getPrintable())) {
                    elements.addElement(getWidgetFor((String) currentRow.get("ProtocolNumber"))); // temporarily remove link here,HH276 will work on authorization
                } else {
                    elements.addElement(getWidgetFor((String) currentRow.get("ProtocolNumber")));
                }

            }

            if (currentRow.containsKey("ProductType"))
                elements.addElement(getWidgetFor((String) currentRow.get("ProductType")));

            if (currentRow.containsKey("ProductName"))
                elements.addElement(getWidgetFor((String) currentRow.get("ProductName")));

            if (currentRow.containsKey("Manufacturer"))
                elements.addElement(getWidgetFor((String) currentRow.get("Manufacturer")));

            if (currentRow.containsKey("PI"))
                elements.addElement(getWidgetFor((String) currentRow.get("PI"))); // PI

            if (currentRow.containsKey("Title"))
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovedCountView.java 169
edu/columbia/rascal/presentation/irb/pages/IrbReportSubmissionCountView.java 172
        return columns;

    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  results  TODO: DOCUMENT ME!
     * @param  aTable   TODO: DOCUMENT ME!
     */
    public void getReportTotalWidget(Vector results, CUHtmlTable aTable) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        CUHtmlTableCell aCell = new CUHtmlTableCell();

        Vector total = new Vector(14);

        for (int i = 0; i < 14; i++) // initialize total to zeros
            total.addElement("0");

        Vector currentRow = new Vector();
        int aNumber = 0;
        int sum = 0;

        for (int i = 0; i < results.size(); i++) {
            currentRow = (Vector) results.elementAt(i);

            for (int j = 0; j < currentRow.size(); j++) {
                aNumber = Integer.valueOf((String) (currentRow.elementAt(j)));
                sum = Integer.valueOf((String) (total.elementAt(j)));
                sum = sum + aNumber;
                total.setElementAt(sum + "", j);
            }
        }

        // subTotal
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("Sub Totals", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);


        // new protocols
        aCell = new CUHtmlTableCell();
        aCell.add(getThreeElementsTable(total.elementAt(0) + "", total.elementAt(1) + "",
                total.elementAt(2) + ""
                )
            );
        aCell.setAlign("right");
        aRow.add(aCell);

        // renewals
        aCell = new CUHtmlTableCell();
        aCell.add(getThreeElementsTable(total.elementAt(3) + "", total.elementAt(4) + "",
                total.elementAt(5) + ""
                )
            );
        aCell.setAlign("right");
        aRow.add(aCell);

        // mods
        aCell = new CUHtmlTableCell();
        aCell.add(getThreeElementsTable(total.elementAt(6) + "", total.elementAt(7) + "",
                total.elementAt(8) + ""
                )
            );
        aCell.setAlign("right");
        aRow.add(aCell);

        // AE
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // Term
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportDeptServlet.java 159
edu/columbia/rascal/presentation/propTrak/servlets/PtReportStatusServlet.java 186
        if (reportType == null) reportType = (String) getSession().getAttribute("reportType");

        Vector columns = new Vector();

        try {
            columns.addElement(""); // space holder for column sort

            String column0 = (String) getSession().getAttribute("column0");

            if (!column0.equals(null) || !column0.equals("")) {
                columns.addElement(column0);
            }

            String column1 = (String) getSession().getAttribute("column1");

            if (!column1.equals(null) || !column1.equals("")) {
                columns.addElement(column1);
            }

            String column2 = (String) getSession().getAttribute("column2");

            if (!column2.equals(null) || !column2.equals("")) {
                columns.addElement(column2);
            }

            String column3 = (String) getSession().getAttribute("column3");

            if (!column3.equals(null) || !column3.equals("")) {
                columns.addElement(column3);
            }

            String column4 = (String) getSession().getAttribute("column4");

            if (!column4.equals(null) || !column4.equals("")) {
                columns.addElement(column4);
            }

            String column5 = (String) getSession().getAttribute("column5");

            if (!column5.equals(null) || !column5.equals("")) {
                columns.addElement(column5);
            }

            String column6 = (String) getSession().getAttribute("column6");

            if (!column6.equals(null) || !column6.equals("")) {
                columns.addElement(column6);
            }

            String column7 = (String) getSession().getAttribute("column7");

            if (!column7.equals(null) || !column7.equals("")) {
                columns.addElement(column7);
            }

            String column8 = (String) getSession().getAttribute("column8");

            if (!column8.equals(null) || !column8.equals("")) {
                columns.addElement(column8);
            }

            String column9 = (String) getSession().getAttribute("column9");

            if (!column9.equals(null) || !column9.equals("")) {
                columns.addElement(column9);
            }
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportApprovalHistoryServlet.java 115
edu/columbia/rascal/presentation/propTrak/servlets/PtReportStatusServlet.java 187
        Vector columns = new Vector();


        try {

            columns.addElement(""); // space holder for column sort

            String column0 = (String) getSession().getAttribute("column0");

            if (!column0.equals(null) || !column0.equals("")) {

                columns.addElement(column0);
            }

            String column1 = (String) getSession().getAttribute("column1");

            if (!column1.equals(null) || !column1.equals("")) {
                columns.addElement(column1);
            }

            String column2 = (String) getSession().getAttribute("column2");

            if (!column2.equals(null) || !column2.equals("")) {
                columns.addElement(column2);
            }

            String column3 = (String) getSession().getAttribute("column3");

            if (!column3.equals(null) || !column3.equals("")) {
                columns.addElement(column3);
            }

            String column4 = (String) getSession().getAttribute("column4");

            if (!column4.equals(null) || !column4.equals("")) {
                columns.addElement(column4);
            }

            String column5 = (String) getSession().getAttribute("column5");

            if (!column5.equals(null) || !column5.equals("")) {
                columns.addElement(column5);
            }

            String column6 = (String) getSession().getAttribute("column6");

            if (!column6.equals(null) || !column6.equals("")) {
                columns.addElement(column6);
            }

            String column7 = (String) getSession().getAttribute("column7");

            if (!column7.equals(null) || !column7.equals("")) {
                columns.addElement(column7);
            }

            String column8 = (String) getSession().getAttribute("column8");

            if (!column8.equals(null) || !column8.equals("")) {
                columns.addElement(column8);
            }

            String column9 = (String) getSession().getAttribute("column9");

            if (!column9.equals(null) || !column9.equals("")) {
                columns.addElement(column9);
            }
File Line
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 1002
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 1120
            pNumber = "LS-" + hah.getAppendixHeaderNumber();

            HzStaff piStaff = getPI(hah);

            piString = (piStaff != null)
                ? ServiceLocator.getRascalUserService().findById(piStaff.getRid())
                    .getUserFirstLastName() : blank;
            initiatorString = ServiceLocator.getRascalUserService().findById(hah.getCreatedBy())
                .getUserFirstLastName();
// creationDate = CalendarTransformer.toDateTimeString(hah.getCreationDate());
            creationDate = CalendarTransformer.formatMMDDYYYY(hah.getCreationDate());

            String departmentName = (isEmpty(hah.getDeptName()) ? blank : hah.getDeptName());
            String departmentCode = (isEmpty(hah.getDeptNumber()) ? blank : hah.getDeptNumber());

            if (!departmentName.equals(blank)) {
                department = departmentName + "&nbsp" + "(" + departmentCode + ")";
            }

            department = (isEmpty(department) ? blank : department);

        } else {
            pTitle = blank;
            pNumber = blank;
            piString = blank;
            initiatorString = blank;
            creationDate = blank;
            department = blank;
        }

        add(getSubTitle());
        s.append("<p><table width=\"100%\" border=\"1\" bgcolor=\"#CCCCCC\">");
        s.append("<tr> ");
        s.append("<td align= \"right\"> ");
        s.append("<font face=\"Comic Sans MS\" size=\"1\">Title</font>");
        s.append("</td>");

        // title
        s.append("<td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(pTitle).append("</font></td> ");

        // protocol number
        s.append("<td > ");
        s.append(
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">In-Vitro Number</font> </div>"
            );
        s.append("</td> <td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(pNumber);
        s.append("</font></td> </tr>");

        // creation date
        s.append(
            "<tr> <td><div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Date Created</font></div></td> <td> "
            );
        s.append("<font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(creationDate);
        s.append("</font></td>  ");

        // creation date
        s.append(
            "<td><div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Initiator</font></div>"
            );
        s.append("</td> <td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(initiatorString).append("</font></td> </tr>  ");

        // pi
        s.append("</font></td></tr> ");
        s.append(
            " <tr> <td>  <div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Principal Investigator</font></div>"
            );
        s.append("</td> <td><font face=\"Comic Sans MS\" size=\"1\">");
        s.append(piString);

        // user
        s.append("</font></td> ");
        s.append(
            " <td>  <div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">You are</font></div>"
            );
        s.append("</td> <td><font face=\"Comic Sans MS\" size=\"1\">");
        s.append(getRascalUser().getNameFirst()).append(" ").append(getRascalUser().getNameLast()).append(" (").append(getRascalUser().getUserId()).append(")");
        s.append("</font></td></tr> ");
        s.append("</table> <br>");

        return s.toString();
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   hah  TODO: DOCUMENT ME!
     *
     * @return  a string with html code to produce navigation bar
     */
    public String getProtocolHeaderHtml(HzAppendixHeader hah) {
File Line
edu/columbia/rascal/presentation/tc/views/TCReportByDeptAndLocationView.java 75
edu/columbia/rascal/presentation/tc/views/TCReportByDeptFilterByJobCodeView.java 48
edu/columbia/rascal/presentation/tc/views/TCReportByDeptView.java 71
        setTestLocation(testLocation);

        String instruction = "";

        if ((rows == null) || (rows.isEmpty())) {
            add("<br>"); // put a space

            CUHtmlText msgTxt = new CUHtmlText(
                    "There is no data to review. Please select new criteria and try again."
                    );
            msgTxt.setFontName(getDefaultFontName());
            msgTxt.setIsBold(true);
            msgTxt.setFgColor("BLUE5");
            getForm().add(msgTxt);

        } else {

            if (!(getDownloadable())) {
                addHeader();
                getForm().add(addDate());
                getForm().add("<br>");
            }

            if (!(getPrintable())) {
                CUHtmlTable aTable = getTable(1, 1);
                aTable.setBorderWidth(0);
                aTable.setAlign("center");
                aTable.setWidth("100%");

                CUHtmlTableRow aRow = new CUHtmlTableRow();
                CUHtmlTableCell aCell1 = new CUHtmlTableCell();
                aCell1.setColumnsToSpan(2);
                aCell1.add(getInstruction(instruction));
                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                aCell1 = new CUHtmlTableCell();
                aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(allCourses), "A",
                        getSortBy()
                        )
                    );
                aCell1.setWidth("70%");
                aCell1.setAlign("center");

                CUHtmlTableCell aCell4 = new CUHtmlTableCell();
                aCell4.add(getHelpFor("rpt1.html"));

                CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                        getUrlToPrintReport("A")
                        );
                CUHtmlTableCell aCell2 = new CUHtmlTableCell();
                aCell2.add(pb);

                pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                        getUrlToViewForDownload("A")
                        );

                CUHtmlTableCell aCell3 = new CUHtmlTableCell();
                aCell3.add(pb);

                aRow.add(aCell1);
                aRow.add(aCell4);
                aRow.add(aCell2);
                aRow.add(aCell3);
                aTable.add(aRow);

                getForm().add(aTable);
                getForm().add("<br>");

            }

            getForm().add(getReportTable(rows, allCourses));

        }

        if (!(getPrintable())) {

            getForm().add("<BR>");

            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", " Return ",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixInvitroView.java 61
edu/columbia/rascal/presentation/appendix/pages/AppendixLabAbstractView.java 187
            pNumber = hah.getAppendixHeaderNumber();

            HzStaff piStaff = getHzPI(hah);
            piString = (piStaff != null)
                ? ServiceLocator.getRascalUserService().findById(piStaff.getRid())
                    .getUserFirstLastName() : blank;
            initiatorString = ServiceLocator.getRascalUserService().findById(hah.getCreatedBy())
                .getUserFirstLastName();
            creationDate = hah.getCreationDate().toString();

            String departmentName = (isEmpty(hah.getDeptName()) ? blank : hah.getDeptName());
            String departmentCode = (isEmpty(hah.getDeptNumber()) ? blank : hah.getDeptNumber());

            if (!departmentName.equals(blank)) {
                department = departmentName + "&nbsp" + "(" + departmentCode + ")";
            }

            department = (isEmpty(department) ? blank : department);

        } else {
            pTitle = blank;
            pNumber = blank;
            piString = blank;
            initiatorString = blank;
            creationDate = blank;
            department = blank;
        }

        add(getSubTitle());
        s.append("<p><table width=\"100%\" border=\"1\" bgcolor=\"#CCCCCC\">");
        s.append("<tr> ");
        s.append("<td align= \"right\"> ");
        s.append("<font face=\"Comic Sans MS\" size=\"1\">Title</font>");
        s.append("</td>");

        // title
        s.append("<td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(pTitle).append("</font></td> ");

        // protocol number
        s.append("<td > ");
        s.append(
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">In-Vitro Number</font> </div>"
            );
        s.append("</td> <td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(pNumber);
        s.append("</font></td> </tr>");

        // creation date
        s.append(
            "<tr> <td><div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Date Created</font></div></td> <td> "
            );
        s.append("<font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(creationDate);
        s.append("</font></td>  ");

        // creation date
        s.append(
            "<td><div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Initiator</font></div>"
            );
        s.append("</td> <td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(initiatorString).append("</font></td> </tr>  ");

        // pi
        s.append("</font></td></tr> ");
        s.append(
            " <tr> <td>  <div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Principal Investigator</font></div>"
            );
        s.append("</td> <td><font face=\"Comic Sans MS\" size=\"1\">");
        s.append(piString);

        // user
        s.append("</font></td> ");
        s.append(
            " <td>  <div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">You are</font></div>"
            );
        s.append("</td> <td><font face=\"Comic Sans MS\" size=\"1\">");
        s.append(getRascalUser().getNameFirst()).append(" ").append(getRascalUser().getNameLast()).append(" (").append(getRascalUser().getUserId()).append(")");
        s.append("</font></td></tr> ");
        s.append("</table> <br>");

        return s.toString();
    }
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaDataSheetView.java 91
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaDataSheetView.java 268
            Vector oldBusinessAttached, Vector newBusinessAttached, Vector unanticipateAttached,
            Vector NRunanticipateAttached, boolean inFrames
            ) {

        super();
        setMainTitle("Human Subjects");
        setPageTitle("RASCAL Human Subjects - Data Sheet ");

        setAgendaHeader((IrbAgendaHeader) bo);
        setRascalUser(aUser);

        if (inFrames) {
            setOnLoad(
                "parent.frames[1].location='edu.columbia.rascal.presentation.agenda.servlets.IrbAgendaLinkFrameServlet?agendaHeaderOid=" +
                getAgendaHeader().getId().toString() + "'"
                );
        }

        add(bo);

        setSubTitle("Columbia University Human Subjects Agenda Data Sheet");

        CUHtmlForm aForm = getAForm();
        aForm.add(getSubTitle());
        aForm.add(getRuler());

        setFontName("MS Comic Sans");
        setFontSize(1);

        addDataAgendaHeader();
// aForm.add(getRuler());

        int numCells = 4;

        add("<br>");

        // add attached protocolHeader
        if (protocolAttached.size() > 0) {
            addEvents("New Protocols", protocolAttached, IrbNameConstants.PROTOCOL_HEADER);

        }

        if (NRprotocolAttached.size() > 0) {
            addEvents("New Protocols", NRprotocolAttached, IrbNameConstants.PROTOCOL_HEADER);

        }

        // add attached modification
        if (modificationAttached.size() > 0) {
            addEvents("Modifications", modificationAttached, IrbNameConstants.MODIFICATION);
        }

        if (NRmodificationAttached.size() > 0) {
            addNREvents("Modifications", NRmodificationAttached, IrbNameConstants.MODIFICATION);
        }

        // add attached renewal
        if (renewalAttached.size() > 0) {
            addEvents("Renewals", renewalAttached, IrbNameConstants.RENEWAL);
        }

        if (NRrenewalAttached.size() > 0) {
            addNREvents("Renewals", NRrenewalAttached, IrbNameConstants.RENEWAL);
        }

        // add attached adverseEvent
        if (adverseEventAttached.size() > 0) {
            addEvents("Adverse Event Reports", adverseEventAttached, IrbNameConstants.ADVERSE_EVENT);
        }

        if (NRadverseEventAttached.size() > 0) {
            addNREvents("Adverse Event Reports", NRadverseEventAttached, IrbNameConstants.ADVERSE_EVENT);
        }


        // add attached closureAttached
        if (closureAttached.size() > 0) {
            addEvents("Closure Reports", closureAttached, IrbNameConstants.CLOSURE);
        }

        if (NRclosureAttached.size() > 0) {
            addNREvents("Closure Reports", NRclosureAttached, IrbNameConstants.CLOSURE);
        }

        // add attached unanticipate
        if (unanticipateAttached.size() > 0) {
            addEvents("Unanticipated Problems", unanticipateAttached, IrbNameConstants.UNANTICIPATED_PROBLEM);
        }

        if (NRunanticipateAttached.size() > 0) {
            addNREvents("Unanticipated Problems", NRunanticipateAttached, IrbNameConstants.UNANTICIPATED_PROBLEM);
        }

        // add Other topics
        if (otherTopicsAttached.size() > 0) {
            aForm.add("<br>");
            aForm.add(getTableViewTitle("Other Topics"));
            aForm.add(buildOtherTopicRows(otherTopicsAttached));
        }

        // add old business
        if (oldBusinessAttached.size() > 0) {
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportSignoffServlet.java 221
edu/columbia/rascal/presentation/propTrak/servlets/PtReportStatusServlet.java 190
        try {
            columns.addElement(""); // space holder for column sort

            String column0 = (String) getSession().getAttribute("column0");

            if (!column0.equals(null) || !column0.equals("")) {
                columns.addElement(column0);
            }

            String column1 = (String) getSession().getAttribute("column1");

            if (!column1.equals(null) || !column1.equals("")) {
                columns.addElement(column1);
            }

            String column2 = (String) getSession().getAttribute("column2");

            if (!column2.equals(null) || !column2.equals("")) {
                columns.addElement(column2);
            }

            String column3 = (String) getSession().getAttribute("column3");

            if (!column3.equals(null) || !column3.equals("")) {
                columns.addElement(column3);
            }

            String column4 = (String) getSession().getAttribute("column4");

            if (!column4.equals(null) || !column4.equals("")) {
                columns.addElement(column4);
            }

            String column5 = (String) getSession().getAttribute("column5");

            if (!column5.equals(null) || !column5.equals("")) {
                columns.addElement(column5);
            }

            String column6 = (String) getSession().getAttribute("column6");

            if (!column6.equals(null) || !column6.equals("")) {
                columns.addElement(column6);
            }

            String column7 = (String) getSession().getAttribute("column7");

            if (!column7.equals(null) || !column7.equals("")) {
                columns.addElement(column7);
            }

            String column8 = (String) getSession().getAttribute("column8");

            if (!column8.equals(null) || !column8.equals("")) {
                columns.addElement(column8);
            }

            String column9 = (String) getSession().getAttribute("column9");

            if (!column9.equals(null) || !column9.equals("")) {
                columns.addElement(column9);
            }
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentLinkFrameView.java 91
edu/columbia/rascal/presentation/consent/pages/ConsentLinkFrameView.java 342
            add("<font face=\"Comic Sans MS\" size=\"1\">&nbsp;&nbsp;");
            add(
                "<a href=\"Javascript:onClick=parent.frames[1].cfConfirmWindow('Are you sure you want to Copy this Consent Form?','" +
                ConsentCopyServlet.class.getName() + "?consentNumber=" + consentNum + "', '" +
                consentNum + "')"
                );
            add("\" target=\"Main\">Copy Consent Form</a><br>");
        }

        add("<br>"); // put a space in


        CUHtmlTable tb = new CUHtmlTable();
        tb.setWidth("100%");
        tb.setBorderWidth(0);
        tb.setCellSpacing(0);
        tb.setCellPading(0);


        Vector columns = new Vector(3);
        columns.addElement(getWidgetFor("&nbsp;&nbsp"));
        columns.addElement(getWidgetFor(
                "<a href=\"\"  onClick=\"return parent.frames[1].openNew( '" +
                ConsentFormServlet.class.getName() + "?consentNumber=" + consentNum +
                "&&dateTime=N', 'ds', 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=900,height=600')\">Printable Version</a><br>"
                )
            );
        columns.addElement(getHelpFor("consent15.html"));
        tb.addRowFor(columns);
        tb.getCell(0, 0).setWidth("5%");
        tb.getCell(0, 1).setWidth("85%");
        tb.getCell(0, 2).setWidth("10%");
        add(tb);

        Vector col = new Vector(3);
        col.addElement(getWidgetFor("&nbsp;&nbsp"));
        col.addElement(getWidgetFor(
                "<a href=\"\"  onClick=\"return parent.frames[1].openNew( '" +
                ConsentFormServlet.class.getName() + "?consentNumber=" + consentNum +
                "&&dateTime=Y', 'ds', 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=900,height=600')\">Printable Version Date/Time</a><br>"
                )
            );
        col.addElement(getHelpFor("consent15.html"));
        tb.addRowFor(col);
        tb.getCell(0, 0).setWidth("5%");
        tb.getCell(0, 1).setWidth("85%");
        tb.getCell(0, 2).setWidth("10%");
        add(tb);

        if ((origin != null) && !origin.trim().equals("")) { // Link back to previous list or queue
            add("<br>");                                     // put two spaces in
            add("<font face=\"Comic Sans MS\" size=\"1\">&nbsp;&nbsp;");
            add("<a href=\"Javascript:onClick=parent.frames[1].location='" +
                ConsentLinkFrameServlet.class.getName() +
                "?consentNumber=XXXX9999';parent.frames[2].location='" + origin +
                "?DisplayPage=CurrentPage';"
                );
            add("\" >[Previous List]</a><br>");
        }                                                    // Link back to previous list or queue

        add("<br>"); // put two spaces in
        add("<font face=\"Comic Sans MS\" size=\"1\">&nbsp;&nbsp;");
        add("<a href=\"Javascript:onClick=parent.frames[1].location='" +
            ConsentLinkFrameServlet.class.getName() +
            "?consentNumber=XXXX9999';parent.frames[2].location='edu.columbia.rascal.presentation.consent.servlets.ConsentMainMenuServlet'"
            );
        add("\" >[Consent Menu]</a><br>");

        if ((isOriginMyRascal != null) && isOriginMyRascal) {    // Link back to My Rascal page
            add("<br>");                                                        // put two spaces in
            add("<font face=\"Comic Sans MS\" size=\"1\">&nbsp;&nbsp;");
            add("<a href=\"Javascript:onClick=parent.frames[0].location='" +
                MyRascalLogoFrameServlet.class.getName() + "';" +
                "parent.frames[1].location='" + MyRascalLinkFrameServlet.class.getName() + "';" +
                "parent.frames[2].location='" + MyRascalMainMenuServlet.class.getName() + "'"
                );
            add("\" >[My RASCAL Menu]</a><br>");
        }                                                                       // Link back to My Rascal page

    }

    /**
     * CURascalLogoFrameView constructor comment. @2002 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * <p>if you don't have an application specific logo to pass in you can use this default
     * constructor yy</p>
     *
     * @param  ch                TODO: DOCUMENT ME!
     * @param  aUser             TODO: DOCUMENT ME!
     * @param  origin            TODO: DOCUMENT ME!
     * @param  isEditable        TODO: DOCUMENT ME!
     * @param  isOriginMyRascal  TODO: DOCUMENT ME!
     */
    public ConsentLinkFrameView(ConsentHeader ch, RascalUser aUser, String origin,
File Line
edu/columbia/rascal/presentation/irb/pages/IrbQueueCancerCenterCorrespondenceView.java 108
edu/columbia/rascal/presentation/irb/pages/IrbQueueChairCorrespondenceView.java 153
        setBgColor("WHITE");

        add(getAForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @param  v  TODO: DOCUMENT ME!
     */
    public void buildRows(Vector v) {
        int i = v.size();

        if (i > 0) {
            getAForm().add("<BR><CENTER>");
            getAForm().add("<TABLE BORDER=\"0\" WIDTH=\"95%\" CELLPADDING=\"2\" CELLSPACING=\"0\">");

            getAForm().add(
                "<TR><TD	WIDTH=\"15%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Protocol</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"12%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Event</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"8%\" ALIGN=\"center\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">View Correspondence</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"8%\" ALIGN=\"center\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Action</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"23%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Title</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"9%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">PI</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"9%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">From</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"15%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Notify Date</FONT></TD>"
                );
            getAForm().add("</TR>");

            int counter = 0;
            String rowColor;
            String lastEvent = "";
            Vector info = null;
            String event = null;

            while (i-- > 0) {
                rowColor = getQueueHTMLRowColor(counter++);

                info = (Vector) v.elementAt(i);
                event = (String) info.elementAt(2);

                if (!event.equals(lastEvent)) {
                    getAForm().add("<TR VALIGN=\"TOP\"><TD><HR WIDTH=\"100%\"></TD></TR>");
                }

                setTableDataRow(info, rowColor);

                lastEvent = event;
            }

            getAForm().add("</TABLE></CENTER>");
        }
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  v  TODO: DOCUMENT ME!
     */
    public void buildRowsAE(Vector v) {
        int i = v.size();

        if (i > 0) {
            getAForm().add("<BR><CENTER>");
            getAForm().add("<TABLE BORDER=\"0\" WIDTH=\"95%\" CELLPADDING=\"2\" CELLSPACING=\"0\">");

            getAForm().add(
                "<TR><TD	WIDTH=\"15%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Protocol</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"12%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Event</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"8%\" ALIGN=\"center\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">View Correspondence</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"8%\" ALIGN=\"center\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Action</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"23%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">AE Keyword</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"9%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Initiator</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"9%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">From</FONT></TD>"
                );
            getAForm().add(
                "<TD	WIDTH=\"15%\" ALIGN=\"left\"><FONT FACE=\"Comic Sans MS\" SIZE=\"1\">Notify Date</FONT></TD>"
                );
            getAForm().add("</TR>");

            int counter = 0;
            String rowColor;
            Vector info = null;

            while (i-- > 0) {
                rowColor = getQueueHTMLRowColor(counter++);
                info = (Vector) v.elementAt(i);
                setTableDataRow(info, rowColor);

            }

            getAForm().add("<TR VALIGN=\"TOP\"><TD><HR WIDTH=\"100%\"></TD></TR>");
            getAForm().add("</TABLE></CENTER>");
        }
    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    public final CUHtmlForm getAForm() {

        return aForm;
    }


    /**
     * Insert the method's description here. Creation date: (2/3/2003 4:22:12 PM)
     *
     * @param  newResultVector  java.util.Vector
     */
    public void setResultVector(java.util.Vector newResultVector) {
File Line
edu/columbia/rascal/presentation/controller/pt/PtChangeProjectOfficerController.java 126
edu/columbia/rascal/presentation/controller/pt/PtComplianceController.java 574
edu/columbia/rascal/presentation/controller/pt/PtHazMatsController.java 551
edu/columbia/rascal/presentation/controller/pt/PtSponsorController.java 127
    	binder.setAllowedFields("projectOfficer","projectOfficerAssistant");    	
    }

    private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
    	Map<String, Object> recordHeading = new HashMap<String, Object>();
    	
    	//You are
    	recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());
    	
    	if (proposal != null && proposal.getId() != null) {
    		
        	//Proposal TrakId
    		recordHeading.put("trakId", "PT-" + proposal.getTrakId());
	    	//Deadline
	    	recordHeading.put("deadlineDate", proposal.getDeadlineDate());
	    	//Deadline Type
	    	recordHeading.put("deadlineType", proposal.getDeadlineType());
	    	//Date Created
	    	recordHeading.put("createDate", proposal.getCreationDate());

	    	//Sponsor
	    	PtAgencyAddress ptAgencyAddress = ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);
	    	if (ptAgencyAddress != null) recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());
	    	
	    	//Logged in by SPA
	    	List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(proposal, "Logged In");
	    	if (statuses != null && statuses.size() > 0) recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());
	    	
	    	RascalUser ru;
	    	
	    	//Initiator
	    	PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);
	    	if (init != null) {
	    		ru = init.getRascalUser();
	    		if (ru != null) recordHeading.put("initiator", ru.getUserFirstLastNameUni());
	    	}
	    	
	    	//Principal Investigator
	    	PtAccessControl pi = proposal.getLeadPerson();
	    	if (pi != null) {
	    		ru = pi.getRascalUser();
	    		if (ru != null) recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
	    	}
	    	
	    } else {
	    	recordHeading.put("createDate", new Date());
	    	recordHeading.put("trakId", "PT-XXXX9999");
	    	recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
	    }
    	return recordHeading;
    }
    
    private String checkApprovers(PtProposalHeader proposal) {
    	int count = 0;
    	int size = 0;
    	if (proposal != null && proposal.getId() != null) {
	    	Set<PtApproval> ptApprovals = proposal.getPtApprovals();
	    	for (PtApproval ptApproval : ptApprovals) {
	    		if (ptApproval != null && ptApproval.getApprovedOn() != null) count++;
	    	}
	    	size = ptApprovals.size();
    	} 
    	if (count > 0 && count == size) return "All Approvers Have Signed<br/>";
    	else return "";
    }
    
}
File Line
edu/columbia/rascal/presentation/controller/pt/PtAttachmentsController.java 293
edu/columbia/rascal/presentation/controller/pt/PtChangeProjectOfficerController.java 127
edu/columbia/rascal/presentation/controller/pt/PtComplianceController.java 575
edu/columbia/rascal/presentation/controller/pt/PtHazMatsController.java 552
edu/columbia/rascal/presentation/controller/pt/PtNotesController.java 126
edu/columbia/rascal/presentation/controller/pt/PtPrintMenuController.java 84
edu/columbia/rascal/presentation/controller/pt/PtSponsorController.java 129
    }

    private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
    	Map<String, Object> recordHeading = new HashMap<String, Object>();
    	
    	//You are
    	recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());
    	
    	if (proposal != null && proposal.getId() != null) {
    		
        	//Proposal TrakId
    		recordHeading.put("trakId", "PT-" + proposal.getTrakId());
	    	//Deadline
	    	recordHeading.put("deadlineDate", proposal.getDeadlineDate());
	    	//Deadline Type
	    	recordHeading.put("deadlineType", proposal.getDeadlineType());
	    	//Date Created
	    	recordHeading.put("createDate", proposal.getCreationDate());

	    	//Sponsor
	    	PtAgencyAddress ptAgencyAddress = ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);
	    	if (ptAgencyAddress != null) recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());
	    	
	    	//Logged in by SPA
	    	List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(proposal, "Logged In");
	    	if (statuses != null && statuses.size() > 0) recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());
	    	
	    	RascalUser ru;
	    	
	    	//Initiator
	    	PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);
	    	if (init != null) {
	    		ru = init.getRascalUser();
	    		if (ru != null) recordHeading.put("initiator", ru.getUserFirstLastNameUni());
	    	}
	    	
	    	//Principal Investigator
	    	PtAccessControl pi = proposal.getLeadPerson();
	    	if (pi != null) {
	    		ru = pi.getRascalUser();
	    		if (ru != null) recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
	    	}
	    	
	    } else {
	    	recordHeading.put("createDate", new Date());
	    	recordHeading.put("trakId", "PT-XXXX9999");
	    	recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
	    }
    	return recordHeading;
    }
    
    private String checkApprovers(PtProposalHeader proposal) {
    	int count = 0;
    	int size = 0;
    	if (proposal != null && proposal.getId() != null) {
	    	Set<PtApproval> ptApprovals = proposal.getPtApprovals();
	    	for (PtApproval ptApproval : ptApprovals) {
	    		if (ptApproval != null && ptApproval.getApprovedOn() != null) count++;
	    	}
	    	size = ptApprovals.size();
    	} 
    	if (count > 0 && count == size) return "All Approvers Have Signed<br/>";
    	else return "";
    }
}
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesDataSheetServlet.java 50
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesDataSheetServlet.java 136
    @Override public CURascalHtmlView getPage() {

        IrbAgendaHeader ah = null;

        try {
            ah = ServiceLocator.getIrbAgendaHeaderService().getHeaderByOid(getLineParameter("anOid")
                    );
        } catch (Exception e) {
            ah = getAgendaHeader();
        }


        if (ah == null) {

            return new IrbAgendaMessageView("Invalid Agenda Number", "window.close()");

        }

        boolean inFrames = ((getLineParameter("inFrames") != null));

        Vector protocolAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector meetingAttendants = ah.getAllMeetingAttendants();
        Vector expeditableAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), PENDING
                );
        Vector otherTopicAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), "Other");

        return new IrbAgendaMinutesDataSheetView(ah, getUser(), protocolAttached,
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDataSheetServlet.java 50
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDataSheetServlet.java 140
    @Override public CURascalHtmlView getPage() {


        IrbAgendaHeader ah = null;

        try {
            ah = ServiceLocator.getIrbAgendaHeaderService().getHeaderByOid(getLineParameter("anOid")
                    );
        } catch (Exception e) {
            ah = getAgendaHeader();
        }


        if (ah == null) {

            return new IrbAgendaMessageView("Invalid Agenda Number", "window.close()");

        }

        long committeeId = ah.getCommitteeId();


        Vector protocolAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector expeditableAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                ); 
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), PENDING
                );

        Vector otherTopicAttached = ah.getAllAgendaEventsByType("Other");
        Vector oldBusinessAttached = ah.getAllAgendaEventsByType("OldBusiness");
        Vector newBusinessAttached = ah.getAllAgendaEventsByType("NewBusiness");

        return new IrbAgendaDataSheetView(ah, getUser(), protocolAttached, modificationAttached,
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixESafetyOfficerApprovalView.java 243
edu/columbia/rascal/presentation/appendix/pages/AppendixFSafetyOfficerApprovalView.java 232
edu/columbia/rascal/presentation/appendix/pages/AppendixGSafetyOfficerApprovalView.java 232
edu/columbia/rascal/presentation/appendix/pages/AppendixISafetyOfficerApprovalView.java 164
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();


                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
    }

    /**
     * NOTE: method name is not desciptive of its function in this view
     *
     * <p>This method was created in VisualAge.</p>
     *
     * @return  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlItem
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected CUHtmlItem fieldGet_1_ReviewAndApproveText() throws Exception {
        StringBuffer aChemBuffer = new StringBuffer(500);
File Line
edu/columbia/rascal/presentation/user/views/RuOccupationalHealthProgramAdminView.java 71
edu/columbia/rascal/presentation/user/views/RuRadiationSafetyBadgeAdminView.java 70
                    RuOccupationalHealthProgramAdminServlet.class.getName(), "POST"
                    )
                );
            render();
        }
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  numbCells  TODO: DOCUMENT ME!
     */
    public void addAdminControlRows(CUHtmlTable aTable, int numbCells) {

        Vector<Object> columns = new Vector<Object>(numbCells);

        for (int c = 0; c < numbCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        CUHtmlEntryField aWidget;

        // rascal UNI
        if (getModify() != null)
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", getModify().getUserId());
        else
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", "");

        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Enter UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for UNI Lookup

        columns.setElementAt(getUniLookup(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Lookup UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a button to the search servlet
        CUHtmlInput i2 = new CUHtmlInput();
        i2.setName("Find Certification");
        i2.setInputType("image");
        i2.setImageSource("/images/popup.gif");
        columns.setElementAt(i2.getHtmlTagLine(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Find Certification"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for data entry
        CUHtmlImage i3 = new CUHtmlImage("/images/popup.gif");
        i3.setAlt("Add Certification");
        i3.setLink(RuOccupationalHealthProgramAdminServlet.class.getName());
        i3.setOnClick(getOnClickForAddCertification());
        i3.setBorderWidth(0);
        columns.setElementAt(i3, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Add Certification"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable addDataTable() {

        List<RuOccHealthProgEnrollment> ruOccHealthProgEnrollments = ServiceLocator
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtReportApprovalHistoryView.java 203
edu/columbia/rascal/presentation/propTrak/pages/PtReportDeptView.java 344
        String t = "Approvals for: " + getBeginDate() + " to " + getEndDate();


        CUHtmlText dateRange = new CUHtmlText(t);
        dateRange.setFontSize("-1");
        dateRange.setIsBold(false);
        dateRange.setAlignment("center");
        dateRange.setFontName(getDefaultFontName());

        return dateRange;


    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  rows     TODO: DOCUMENT ME!
     * @param  columns  TODO: DOCUMENT ME!
     */
    public void addGeneralInformation(Vector rows, Vector columns) {

        CUHtmlTable t = new CUHtmlTable();
        t.setBorderWidth(0);

        Object dateObj = null;


        t.addRowFor(getColumnTitles(columns));
        elements = new Vector();

        for (int n = 0; n < rows.size(); n++) {
            Vector currentRow = (Vector) rows.elementAt(n);

            if (getIndexOfTrakId() > 0) {

                if (!(getPrintable())) {
                    elements.addElement(getProposalDataSheetLinkWidgetFor(
                            (String) currentRow.elementAt(getIndexOfTrakId())
                            )
                        ); // trackId
                } else {
                    elements.addElement(getWidgetFor(
                            (String) currentRow.elementAt(getIndexOfTrakId())
                            )
                        );
                }
            }

            if (getIndexOfPIName() > 0) {
                elements.addElement(getWidgetFor((String) currentRow.elementAt(getIndexOfPIName()))); // PI
            }

            if (getIndexOfAgencyName() > 0) {
                elements.addElement(getWidgetFor(
                        (String) currentRow.elementAt(getIndexOfAgencyName())
                        )
                    ); // agencyName
            }

            if (getIndexOfProposalType() > 0) {
                elements.addElement(getWidgetFor(
                        (String) currentRow.elementAt(getIndexOfProposalType())
                        )
                    ); // prop type
            }

            if (getIndexOfProjBegDate() > 0) {
                dateObj = currentRow.elementAt(getIndexOfProjBegDate()); // startDate

                if (dateObj instanceof Date) {
                    elements.addElement(getWidgetFor(CalendarTransformer.toString((Date) dateObj)));
                } else {
                    elements.addElement(getWidgetFor(""));
                }
            }

            if (getIndexOfProjEndDate() > 0) {
                dateObj = currentRow.elementAt(getIndexOfProjEndDate()); // endDate

                if (dateObj instanceof Date) {
                    elements.addElement(getWidgetFor(CalendarTransformer.toString((Date) dateObj)));
                } else {
                    elements.addElement(getWidgetFor(""));
                }
            }

            if (getIndexOfTotalMoney() > 0) {    //
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaAbstractServlet.java 371
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceReturnOrApproveCreateServlet.java 1359
            for (AppendixTracking tracker : trackers) {
                type = tracker.getAppendixType();
                if (rDNASize>0 && type.equals("A"))
                	hazMatsRDNA = true;
                if (viralSize>0 && type.equals("B"))
                	hazMatsViral = true;
                if (formXySize>0 && type.equals("E"))
                	hazMatsFormXy= true;
                if ((type.equals("A") || type.equals("B") || type.equals("C"))  && (bbpoSize>0 || lschpSize>0)) {
                    hazMatsBBPO = true;
                    hazMatsLSCHP = true;
                }
                if (lschpSize>0 && type.equals("E")) {
                    hazMatsLSCHP = true;
                }
            }   

        List<IrbStaff> allStaff = iph.getIrbStaffs();
        List<TcuserHeader> tcObjs = null;
        RascalUser rUser = null;
        String nameString = "";
        String eMail;

        try {
            rUser = iph.getPI().getRascalUser();

            if (rUser != null) {
                nameString = rUser.getUserFirstLastNameUni();
            }
        } catch (Exception e) {
            log.error(e);
        }

        StringBuilder buffer = new StringBuilder();

        String dbLocation = RascalProperties.getProperty("DbUserId");

        if (!dbLocation.equals("was_rascal")) buffer.append(IrbEmailConstants.TEST_MESSAGE_TEXT);

        buffer.append(
            "You have been included as \"Personnel Staff\" in the following Protocol:\n\nIRB-"
            );
        buffer.append(iph.getProtocolNumber());
        buffer.append("\n\nTitle: ");
        buffer.append(iph.getTitle());
        buffer.append("\nPrincipal Investigator: ");
        buffer.append(nameString);
        buffer.append("\nHazardous Materials Appendix: ");
        buffer.append(hazMatsStr);
        buffer.append("\n\n");
        buffer.append(EMAIL_HAZMATS_ATTACHED_TRAINING_REQUIRED);

 
        for (IrbStaff staff : allStaff) {

            try { // only send e-mails to appendix staff

                if (!staff.getProtocolRole().equals("Initiator") &&
                        ((staff.getAppendixABool() || staff.getAppendixBBool() || staff.getAppendixCBool() ||
                                staff.getAppendixEBool()))
                ) {
                    rUser = null;
                    tcObjs = null;
                    eMail = "";
                    nameString = "";

                    if (staff != null) rUser = staff.getRascalUser();
                    if (rUser != null) {
File Line
edu/columbia/rascal/presentation/user/views/RuOccupationalHealthProgramAdminView.java 71
edu/columbia/rascal/presentation/user/views/RuRadiationSafetyBadgeAdminView.java 70
edu/columbia/rascal/presentation/user/views/RuSimpleTrainingEnrollmentAdminView.java 80
                    RuOccupationalHealthProgramAdminServlet.class.getName(), "POST"
                    )
                );
            render();
        }
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  numbCells  TODO: DOCUMENT ME!
     */
    public void addAdminControlRows(CUHtmlTable aTable, int numbCells) {

        Vector<Object> columns = new Vector<Object>(numbCells);

        for (int c = 0; c < numbCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        CUHtmlEntryField aWidget;

        // rascal UNI
        if (getModify() != null)
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", getModify().getUserId());
        else
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", "");

        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Enter UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for UNI Lookup

        columns.setElementAt(getUniLookup(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Lookup UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a button to the search servlet
        CUHtmlInput i2 = new CUHtmlInput();
        i2.setName("Find Certification");
        i2.setInputType("image");
        i2.setImageSource("/images/popup.gif");
        columns.setElementAt(i2.getHtmlTagLine(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Find Certification"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for data entry
        CUHtmlImage i3 = new CUHtmlImage("/images/popup.gif");
        i3.setAlt("Add Certification");
        i3.setLink(RuOccupationalHealthProgramAdminServlet.class.getName());
        i3.setOnClick(getOnClickForAddCertification());
        i3.setBorderWidth(0);
        columns.setElementAt(i3, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Add Certification"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable addDataTable() {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportCancerCenterStatsView.java 198
edu/columbia/rascal/presentation/irb/pages/IrbReportCommitteeStatsView.java 238
            aCell.add(getTextWidgetFor((String) currentRow.elementAt(2), 2, false));
            aCell.setAlign("right");
            aRow.add(aCell);

            aTable.add(aRow);
        }


        // total

        int total = 0;
        int totalApp = 0;
        int totalCounter = 0;
        float counter = 0;
        int temp = 0;
        float averageValue = 0;

        aRow = new CUHtmlTableRow();

        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor("total", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);


        // sumbitted protocols
        aCell = new CUHtmlTableCell();

        for (int i = 0; i < resultSize; i++) {
            Vector currentRow = (Vector) results.elementAt(i);
            temp = Integer.parseInt((String) currentRow.elementAt(0));

            if (temp != 0) {
                total += temp;
                totalCounter++;
            }
        }

        aCell.add(getTextWidgetFor(total + "", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // approved protocols
        aCell = new CUHtmlTableCell();

        for (int i = 0; i < resultSize; i++) {
            Vector currentRow = (Vector) results.elementAt(i);
            temp = Integer.parseInt((String) currentRow.elementAt(1));

            if (temp != 0) {
                totalApp += temp;
                counter++;
            }
        }

        aCell.add(getTextWidgetFor(totalApp + "", 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);

        // average days from submission to approval
        aCell = new CUHtmlTableCell();
        totalApp = 0;

        for (int i = 0; i < resultSize; i++) {
            Vector currentRow = (Vector) results.elementAt(i);
            totalApp += Integer.parseInt((String) currentRow.elementAt(2));
        }

        if (counter != 0)
            averageValue = totalApp / counter;
        else
            averageValue = 0;

        avgValue = Float.toString(averageValue);
        avgValue = avgValue.substring(0, avgValue.indexOf(".") + 2);
        aCell.add(getTextWidgetFor(avgValue, 2, false));
        aCell.setAlign("right");
        aRow.add(aCell);
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 241
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 240
edu/columbia/rascal/presentation/appendix/pages/AppendixFSafetyOfficerApprovalView.java 232
edu/columbia/rascal/presentation/appendix/pages/AppendixGSafetyOfficerApprovalView.java 232
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) { // set up
                                                                            // Veterinarian
                                                                            // approval
                                                                            // information

            AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());

            if (vetApproval != null) {
                approver = vetApproval.getApproverRid();
                approvalDate = vetApproval.getApprovalDate();

                // spacer
                addSpacerRows(aTable, 1, 2, "10");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                name = "<i>approval not yet obtained</i>";

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(name, "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                        );
                aCell2 = utilGetHtmlTableCell(CalendarTransformer.formatMMDDYYYY(approvalDate),
                        "500", "left"
                        );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDatabaseStoreUtilityServlet.java 288
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesDataSheetServlet.java 156
        Vector protocolAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector meetingAttendants = ah.getAllMeetingAttendants();
        Vector expeditableAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), PENDING
                );
        Vector otherTopicAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), "Other");

        return new IrbAgendaMinutesDataSheetPDFView(ah, getUser(), protocolAttached,
                modificationAttached, renewalAttached, adverseEventAttached, 
                closureAttached, exemptAttached, expeditableAttached,
                pendingAttached, NRprotocolAttached, NRmodificationAttached, NRrenewalAttached,
                NRadverseEventAttached,  NRclosureAttached,
                NRexemptAttached, NRexpeditableAttached, NRpendingAttached,
                otherTopicAttached, meetingAttendants, unanticipateAttached, NRunanticipateAttached,
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaSearchServlet.java 103
edu/columbia/rascal/presentation/agenda/servlets/IrbMinuteSearchServlet.java 103
                    );
        } else {
            view = new IrbAgendaResultsDisplayView(new java.util.Vector(), getUser());
        }

        return view;

    }

    /**
     * Prepare all text data for saving to the database.
     *
     * <p>sybase requires an apostrophe to be accompanied by another one. use this method whenever
     * saving text tot he database.</p>
     *
     * @param   aString  String
     *
     *                   <p>Mulligan - this should be moved to a common package</p>
     *
     * @return  prepare all text data for saving to the database.
     */
    public String prepareText(String aString) {

        java.text.StringCharacterIterator sci = new java.text.StringCharacterIterator(aString);
        String newString = "";

        int i = 0;

        for (i = 0; i < sci.getEndIndex(); i++) {
            newString = newString + sci.current();

            if (sci.current() == '\'') newString = newString + '\'';

            sci.next();
        }

        return newString;
    }

    /**
     * Handle the GET and HEAD methods by building a simple web page. HEAD is just like GET, except
     * that the server returns only the headers (including content length) not the body we write.
     *
     * <p>Note - [HP 01/14/00] This is a new search method that uses the PtSearchParametersParser
     * and PtSearchQueryFormat. This search method supports the following search features: (1)
     * simple search, (2) required search, (3) implied or search, and (4) phrase search.</p>
     */
    @Override public void submit() {

        IrbAgendaSearchParameters srchParams = null;
        CURascalDisplayPageJdbcController pageController = null;
        IrbAgendaDocumentSearchJdbcAccessor jdbcAccessor = null;
        CURascalDisplayPageInfo pageInfo = null;
        IrbAgendaResultsDisplayView view = null;

        String query;

        String pageInfoKeyword = (String) keywords.get("IrbAgendaSearchDisplayPageInfo");
        String pagesCacheKeyword = (String) keywords.get("IrbAgendaSearchDisplayPagesCached");

        try {
            srchParams = buildSearchParams(this);
            getSession().setAttribute("searchParameters", srchParams);
        } catch (edu.columbia.rascal.presentation.common.parser.CURascalParseException e) {
            handleException(e);

            return;
        }

        if (srchParams == null) {
            CURascalDisplayPageInfo emptyPageInfo = new CURascalDisplayPageInfo();
            CURascalDisplayPagesCached emptyPagesCached = new CURascalDisplayPagesCached();
            getSession().setAttribute(pageInfoKeyword, emptyPageInfo);
            getSession().setAttribute(pagesCacheKeyword, emptyPagesCached);
        } else {
            query = buildSearchQuery(srchParams);

            jdbcAccessor = IrbAgendaDocumentSearchJdbcAccessor.getInstance(this);

            String procRsltMethodNm = getProcessResultSetMethod();
            pageController = CURascalDisplayPageJdbcController.getInstance(this, jdbcAccessor,
                    pageInfoKeyword, pagesCacheKeyword, procRsltMethodNm
                    );

            int cacheMode = getCacheMode();
            int cacheSize = getCacheSize();
            int maxPageSize = getMaxPageSize();
            pageInfo = pageController.buildFirstPageInfo(query, cacheMode, cacheSize, maxPageSize);
        }

        if ((pageInfo != null) && (!pageInfo.isEmpty())) {
            view = new IrbAgendaResultsDisplayView(pageInfo.getDisplayPage(),
                    pageInfo.getPageBeginPos(), pageInfo.getPageSize(), pageInfo.getTotalMatch(),
                    pageInfo.getMaxPageSize(), getUser(), "Agenda"
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 1121
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5917
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("') and f.whoRid =");
        aBuffer.append(whoAmI.getId());
        aBuffer.append(" and f.type = '");
        aBuffer.append(reviewerType);
        aBuffer.append("' order by a.protocolNumber");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                row.addElement(res.getString(2));                                                    // protocol number
                row.addElement(res.getString(3));                                                    // identifier

                if (res.getDate(4) == null) // status date
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(4));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(5))).intValue()).toString()); // protocolOid

                if (res.getDate(6) == null) // reviewed date
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(6));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()); // reviwedOid
                row.addElement(res.getString(8));                                                    // status Name
                row.addElement("");                                                                  // meetingdate
                results.addElement(row.clone());
                row = new Vector(9);
            } // end while


            int len = results.size();
            int oid = 0;
            java.sql.ResultSet res3 = null;
            Vector vec = null;

            for (int i = 0; i < len; i++) {
                vec = (Vector) results.elementAt(i);

                if (vec.elementAt(7).equals(ASSIGNED_TO_MEETING)) {
                    oid = Integer.valueOf((String) vec.elementAt(0));
                    res3 = acc.executeQuery(
                            "select max(meetingDate) from IrbAgendaHeader t1, IrbAgendaEvent t2 where t1.oid = t2.agendaHeaderId and t2.eventType = '" +
                            IrbNameConstants.ADVERSE_EVENT + "' and t2.eventOid= " + oid
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBReportView.java 374
edu/columbia/rascal/presentation/appendix/pages/AppendixCReportView.java 442
            textValue = (getTracker().getEhsNumber() == null) ? "" : getTracker().getEhsNumber();
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            // gather veterinarian approval data
            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) {
                AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());
                approver = 0;
                approvalDate = null;
                approvalDateStr = "";

                if ((vetApproval != null) && (vetApproval.getApprovalType() != null) &&
                        (vetApproval.getApprovalType().equals(APPROVE) ||
                                vetApproval.getApprovalType().equals(MANUAL_APPROVE))
                        ) {
                    approver = vetApproval.getApproverRid();
                    approvalDate = vetApproval.getApprovalDate();
// approvalDateStr = CalendarTransformer.toString(approvalDate);
                    approvalDateStr = approvalDate.toString();

                    if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
                }

                addSpacerRows(aTable, 1, 2, "8");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                );
                name = NOT_YET_APPROVED;

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                            .getUserFirstLastNameUni();

                aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(name), "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                );
                aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(approvalDateStr), "500", "left"
                );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   defaultValue  TODO: DOCUMENT ME!
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected void addGeneralFields(boolean defaultValue) throws Exception {
        CUHtmlTableRow aRow;
        CUHtmlTableCell aCell1;
        CUHtmlTableCell aCell2;

        CUHtmlTable aTable = utilGetHtmlTable("100%", 0, 2);
        aTable.setCellPadding(4);

        addSpacerRows(aTable, 1, 2, "8");

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPENDIX_NUMBER), "300",
File Line
edu/columbia/rascal/presentation/irb/pages/IrbQueueReviewerForChairView.java 553
edu/columbia/rascal/presentation/irb/pages/IrbQueueReviewerView.java 710
        aTable.getCell(0, 8).setVAlign("top");
// aTable.getCell(0,9).setVAlign("top");

        return aTable;

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   parentOid   TODO: DOCUMENT ME!
     * @param   parentName  TODO: DOCUMENT ME!
     * @param   reviewerId  TODO: DOCUMENT ME!
     * @param   onAgenda    TODO: DOCUMENT ME!
     * @param   returnType  TODO: DOCUMENT ME!
     * @param   protNumber  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getReturnWidgetFor(String parentOid, String parentName, String reviewerId,
        boolean onAgenda, String returnType, String protNumber
        ) {


        CUHtmlImage lookupImage = new CUHtmlImage("/images/redball.gif");
        lookupImage.setBorderWidth(0);
        lookupImage.setAlt("Return");


        lookupImage.setLink("Javascript:onClick=irbReviewerReturnConfirm('" + parentName + "','" + parentOid + "','" + reviewerId + "','" + onAgenda + "','" + returnType + "','" + protNumber + "');");

        return lookupImage;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   protocolNumber      TODO: DOCUMENT ME!
     * @param   objectOid    TODO: DOCUMENT ME!
     * @param   objectName   TODO: DOCUMENT ME!
     * @param   protocolOid  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String getServletLinkFor(String protocolNumber, String objectOid, String objectName,
        String protocolOid
        ) {

        String servletLink = null;

        if ((protocolNumber == null) || protocolNumber.equals("")) {
            return servletLink;
        }

        StringBuilder buffy = new StringBuilder();
        CUHtmlText text = new CUHtmlText(protocolNumber);
        String aToolbar =
            "toolbar=yes,location=no,directories=no,status=no,menubar=yes,resizable=yes,copyhistory=no,width=800,height=600,scrollbars=yes";

        if (objectName.equals(IrbNameConstants.PROTOCOL_HEADER)) {
            buffy.append("return openNew('");
            buffy.append("/irb/protocol/"+protocolNumber+"/"+objectOid+"/datasheet");
            buffy.append("','ds','");
            buffy.append(aToolbar);
            buffy.append("')");
        } else if (objectName.equals(IrbNameConstants.ADVERSE_EVENT)) {
            buffy.append("return openNew('");
          //FIXME link  buffy.append(IrbAdverseEventDataSheetServlet.class.getName());
            buffy.append("?aeOid=");
            buffy.append(objectOid);
            buffy.append("&&parentProtocolOid=");
            buffy.append(protocolOid);
            buffy.append("', 'ds', '");
            buffy.append(aToolbar);
            buffy.append("')");
        }  else if (objectName.equals(IrbNameConstants.CLOSURE)) {
            buffy.append("return openNew('");
            buffy.append("/irb/closure/"+protocolNumber+"/"+objectOid+"/datasheet");
            buffy.append("', 'ds', '");
            buffy.append(aToolbar);
            buffy.append("')");
        } else if (objectName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
            buffy.append("return openNew('");
            //buffy.append(IrbUnanticipatedDataSheetServlet.class.getName());
            buffy.append("/irb/unanticipatedProblem/"+protocolNumber+"/"+objectOid+"/datasheet");
            //buffy.append("?aeOid=");
            //buffy.append(objectOid);
            //buffy.append("&&parentProtocolOid=");
            //buffy.append(protocolOid);
            buffy.append("', 'ds', '");
            buffy.append(aToolbar);
            buffy.append("')");
        }

        return buffy.toString();
    }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusDateRangeView.java 136
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusDateRangeView.java 138
        Vector selected = new Vector();
        aWidget = getMultiSelectWidgetFor(getStatusList(), "StatusList", selected);
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Current Status :"));
        row++;

        

        // add committee list
        Vector committeeNames = new Vector();

        if (CURascalGuardian.hasIrbRascal() || CURascalGuardian.hasIrbHighLevelAdminReports() ||
                CURascalGuardian.hasIrbCentralIrbReview()
        ) {
            committeeNames.addElement("All Committees");
            committeeNames.addAll(ServiceLocator.getIrbCommitteeService().getCommitteeNames());
        } else if (CURascalGuardian.hasIrbAdmin())
            committeeNames.addAll(IrbReportQuery.getIrbCommitteeNameFor(getRascalUser(),
                    "IrbAdminMember"
                    )
                );
        else // is Chair
            committeeNames.addAll(IrbReportQuery.getIrbCommitteeNameFor(getRascalUser(),
                    "IrbCommitteeMember"
                    )
                );

        CUHtmlList list = new CUHtmlList(committeeNames, "committeeList", "All Committees");
        columns.setElementAt(list, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Select Committee :"));
        row++;


        aWidget = getReportRangeWidget();
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Select Range:"));
        row++;


        columns.setElementAt(getDateTable(endDate, "endDate", "endDateMonth", "endDateDay",
                "endDateYear"
                ), 1
            );
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Ending On:"));
        row++;


    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Submit",
                    "checkDateForSubmit(endDate);return isDateValid()"
                    );
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
        }


        return aTable;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Vector getEventList() {
        Vector eventList = new Vector();
        eventList.add("Protocol");
        eventList.add("Renewal");
        eventList.add("Modification");
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingHistoryView.java 121
edu/columbia/rascal/presentation/propTrak/pages/PtProposalFundingView.java 1179
        Calendar cal = Calendar.getInstance();

        Vector<Object> columns = new Vector<Object>(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        Object aWidget;

        // title
        var = "";

        if (getProposal() != null) {
            temp = getProposal().getTitle();

            if (temp != null) var = temp;
        }

        aWidget = getWidgetFor(var);
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Proposal Title"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 1).setWidth("20");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // Abbreviated title
        var = "";

        if (getProposal() != null) {
            temp = getProposal().getTitleAbbreviated();

            if (temp != null) var = temp;
        }

        aWidget = getWidgetFor(var);
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Proposal Abbreviated Title"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 1).setWidth("20");
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // budget begin date
        var = "00/00/0000";

        Date begin = ptBudget.getProjectBudgetBeginDate();

        if (begin != null) {
            cal = Calendar.getInstance();
            cal.setTime(begin);
            var = CalendarTransformer.toString(cal);
        }

        aWidget = getWidgetFor(var);
        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Project Begin Date"));
        aTable.getCell(row, 1).add("");
        aTable.getCell(row, 2).setColumnsToSpan(2);
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusView.java 162
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusView.java 160
                    IrbReportApprovalStatusDateRangeServlet.class.getName() + "'"
                    );

            getForm().add("<BR>");
            getForm().add("<BR>");
            bTable.add(pb1);
            getForm().add(bTable);
        }

        setOnLoad("parent.frames[1].location='" + IrbReportLinkFrameServlet.class.getName() + "'");
        add(getForm());
        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlText addDate() {

        String today = new java.util.Date().toString();
        CUHtmlText date = new CUHtmlText(today);
        date.setFontSize("1");
// date.setIsBold(true);
        date.setAlignment("center");
        date.setFontName(getDefaultFontName());

        return date;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlText addDateRange() {

        String t = null;

        if (getBeginDate().equals("00/00/0000") || getEndDate().equals("00/00/0000")) {
            t = "All Proposals";
        } else {
            t = "Between: " + getBeginDate() + " And " + getEndDate();
        }


        CUHtmlText dateRange = new CUHtmlText(t);
        dateRange.setFontSize("-1");
        dateRange.setIsBold(false);
        dateRange.setAlignment("center");
        dateRange.setFontName(getDefaultFontName());

        return dateRange;


    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  rows  TODO: DOCUMENT ME!
     */
    public void addGeneralInformation(Vector rows) {

        CUHtmlTable t = new CUHtmlTable();
        t.setBorderWidth(0);


        t.setWidth("95%");
        t.setAlign("center");

        Object dateObj = null;
        Vector columns = new Vector();
        columns.addElement(getWidgetFor("Event"));
        columns.addElement(getWidgetFor("Protocol Number"));
        columns.addElement(getWidgetFor("Committee"));
        columns.addElement(getWidgetFor("PI"));

        if (event.equals("Protocol") || event.equals("Renewal") || event.equals("Modification"))
            columns.addElement(getWidgetFor("COI"));

        columns.addElement(getWidgetFor("Status Date"));
        columns.addElement(getWidgetFor("Current Status"));

        if (event.equals("Protocol") || event.equals("Renewal") || event.equals("Modification")) {
            columns.addElement(getWidgetFor("Category A"));
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 494
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovalQueueView.java 679
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovedQueueView.java 226
                toString((Date) queueItem.get(KEY_RELEASE_FOR_VIEW_DATE))
                )
            );
        aCell.setAlign("center");
        colNum++;

        // P.I.
        aCell = aTable.getCell(rowCount, colNum);
        aCell.add(getTableCellData((String) queueItem.get(KEY_NAME_UNI)));
        aCell.setAlign("left");
        colNum++;

        // Species
        aCell = aTable.getCell(rowCount, colNum);
        aCell.add(getTableCellData((String) queueItem.get(KEY_SPECIES)));
        aCell.setAlign("left");
        colNum++;

        // Primary Site
        aCell = aTable.getCell(rowCount, colNum);
        aCell.add(getTableCellData(
                decodeAnimalCarePrimarySite((String) queueItem.get(KEY_PRIMARY_SITE))
                )
            );
        aCell.setAlign("left");
        colNum++;

        // Current Status
        aCell = aTable.getCell(rowCount, colNum);

        String param1 = (String) queueItem.get(KEY_CURRENT_STATUS);
        String convert1 = getAnimalCareStatusDisplayValue(param1.trim());

        if (convert1 == null) convert1 = "Still Creating...";

        aCell.add(getTableCellData(convert1));
        aCell.setAlign("left");
        colNum++;

        // Highest Pain Level
        aCell = aTable.getCell(rowCount, colNum);

        String level = "n/a";

        if (((String) queueItem.get(KEY_PAIN_LEVEL4)).equalsIgnoreCase("y")) {
            level = "4";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL3)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "3";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL2)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "2";
        } else if (((String) queueItem.get(KEY_PAIN_LEVEL1)).equalsIgnoreCase(
                    "y"
                    )) {
            level = "1";
        }

        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaObjectHistoryView.java 734
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaObjectHistoryView.java 896
                                )).getStatusName().equals(APPROVED)))
        ) {
            cell3a.add("<font size=\"1\"><b>Discussion</b></font>");

            String eventName = event.getEventType();

            if (eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED) || eventName.equals(PENDING)
            )
                cell3b.add(getWidgetFor("Board Notification"));
            else
                cell3b.add(getWidgetFor(
                        (attribute == null) ? event.getEventAbstract()
                                            : attribute.getRecommendationText()
                        )
                    );
        } else
            cell3a.add("<font size=\"1\"><b>Discussion</b></font>");

        cell3b.add(getWidgetFor(""));
        cell3a.setAlign("center");
        cell3a.setVAlign("top");
        cell3b.setAlign("left");
        cell3b.setVAlign("top");
        b01Row.add(cell3a);
        b01Row.add(cell3b);

        // follow up
        CUHtmlTableCell cell4a = new CUHtmlTableCell();
        CUHtmlTableCell cell4b = new CUHtmlTableCell();
        cell4a.setWidth("10%");
        cell4b.setWidth("75%");

        if (CURascalGuardian.hasIrbRascal() ||
                (canViewNotes() &&
                    (ServiceLocator.getIrbAgendaHeaderService().getCurrentStatus(
                            event.getIrbAgendaHeader()
                            ).getStatusName().equals(APPROVED)))
        ) {
            cell4a.add("<font size=\"1\"><b>Follow Up to Researcher/Correspondence</b></font>");
            cell4b.add(getWidgetFor((attribute == null) ? "" : attribute.getFollowUp()));
        } else
            cell4a.add("<font size=\"1\"><b>Follow Up to Researcher/Correspondence</b></font>");

        cell4b.add(getWidgetFor(""));
        cell4a.setAlign("center");
        cell4a.setVAlign("top");
        cell4b.setAlign("left");
        cell4b.setVAlign("top");
        b02Row.add(cell4a);
        b02Row.add(cell4b);

        CUHtmlTable bTable = new CUHtmlTable();
        bTable.setCellSpacing(0);
        bTable.setCellPading(0);

        bTable.add(b01Row);
        bTable.add(b02Row);

        CUHtmlTableCell cellz = new CUHtmlTableCell();
        cellz.setColumnsToSpan(5);
        cellz.add(bTable);
        a02Row.add(cellz);

        aTable.add(a01Row);
        aTable.add(a02Row);

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  event      TODO: DOCUMENT ME!
     * @param  attribute  TODO: DOCUMENT ME!
     * @param  type       TODO: DOCUMENT ME!
     */
    public void setMeetingTableDataRow(CUHtmlTable aTable, IrbAgendaEvent event,
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3161
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3649
        aBuffer.append("and c.sequenceNumber = 1) and b.modificationNumber > 0 ");
        aBuffer.append("and (b.oid = e.parentObjectOid and e.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("') and e.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("','");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append(
            "') and e.oid = (select max(oid) from IrbStatus x where b.oid = x.parentObjectOid and x.parentObjectName = '"
            );
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("') AND f.parentObjectOid = a.oid and f.parentObjectName = 'Protocol' ");
        aBuffer.append("and g.oid = f.committeeId and f.committeeId ");
        aBuffer.append(committeeSqlString);
        aBuffer.append(" order by a.protocolNumber");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                // this row:
                /* (1)oid,
                 *      (2)protocolNumber(AAAA1234),      (3)title,      (4)PI last name (?),
                 * (5)submit date,      (6)protocol parent,      (7)committee name,      (8)status,
                 *     (9)exempt/expeditable
                 */
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                row.addElement(res.getString(2));
                row.addElement(res.getString(4));                                                    // protocol title
                row.addElement(res.getString(5));

                if (res.getDate(7) == null) // date submitted
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(7));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(8))).intValue()).toString()); // protocol parent
                row.addElement(res.getString(9));                                                    // committee name
                row.addElement(res.getString(10));                                                   // submit times in

                String exp = res.getString(11);
                row.addElement(((exp == null) || exp.equals(""))
                        ? (((res.getString(3) != null) && res.getString(3).equals("Y")) ? "Exe"
                                                                                        : "")
                        : "Exp"
                    ); // exempt marker
                results.addElement(row.clone());
                row = new Vector(9);
            } // end while

        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return results;

    }

    /**
     * RASCAL (halayn) Creation date: (4/24/2002 12:53:52 PM)
     *
     * @param   whoAmI  TODO: DOCUMENT ME!
     *
     * @return  Vector of results
     */

    public static Vector getModificationsToLogIn(RascalUser whoAmI) {
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbUnanticipatedAttachmentExternalServlet.java 95
edu/columbia/rascal/presentation/irb/servlets/IrbUnanticipatedAttachmentServlet.java 99
        return IrbUnanticipatedAttachmentExternalServlet.class.getName();
    }

    /** @see  edu.columbia.rascal.presentation.common.CURascalServlet#submit() */
    @Override public void submit() {
        String aeOid = (String) getSession().getAttribute("aeOid");
        IrbUnanticipatedProblem ae = ServiceLocator.getIrbUnanticipatedProblemService().findById(
                Long.parseLong(aeOid)
                );

        String statusName = ServiceLocator.getIrbStatusService().getCurrentStatus(ae.getId(),
                ae.classNameWithoutPrefix()
                ).getStatusName();

        if (statusName.equals(RETURNED) || statusName.equals(PENDING)) {
            clearArchiveValues(getNonSelectedDocIds());

            Enumeration someList = getRequest().getParameterNames();

            while (someList.hasMoreElements()) {
                String s = (String) someList.nextElement();

                if (s.startsWith("id")) {
                    String id = s.substring(2);
                    IrbUnanticipatedAttachment attachment = ServiceLocator
                        .getIrbUnanticipatedAttachmentService().findById(Long.parseLong(id));
                    attachment.setArchive("Y");
                }

            }

        }

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    private ArrayList getNonSelectedDocIds() {

        IrbUnanticipatedProblem ae = null;
        String aeOid = (String) getSession().getAttribute("aeOid");
        ae = ServiceLocator.getIrbUnanticipatedProblemService().findById(Long.parseLong(aeOid));

        Vector<IrbUnanticipatedAttachment> allAttachments = ServiceLocator
            .getIrbUnanticipatedProblemService().getAllAttachments(ae);
        int attachmentSize = allAttachments.size();
        Vector allDocs = new Vector(attachmentSize);

        for (int i = 0; i < attachmentSize; i++) {
            IrbUnanticipatedAttachment anAttachment = allAttachments.elementAt(i);
            allDocs.addElement(Long.toString(anAttachment.getId()));
        }

        ArrayList pageDocs = new ArrayList(allDocs);
        ArrayList selected = getSelectedDocIds();
        ArrayList nonSelected = new ArrayList();

        int len = pageDocs.size();

        for (int i = 0; i < len; i++) {

            if (!selected.contains(pageDocs.get(i))) {
                nonSelected.add(pageDocs.get(i));
            }
        }

        return nonSelected;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    private ArrayList getSelectedDocIds() {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 843
edu/columbia/rascal/presentation/appendix/pages/AppendixFReportView.java 624
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);


            // gather veterinarian approval data
            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) {
                AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());
                approver = 0;
                approvalDate = null;
                approvalDateStr = "";

                if ((vetApproval != null) && (vetApproval.getApprovalType() != null) &&
                        (vetApproval.getApprovalType().equals(APPROVE) ||
                                vetApproval.getApprovalType().equals(MANUAL_APPROVE))
                        ) {
                    approver = vetApproval.getApproverRid();
                    approvalDate = vetApproval.getApprovalDate();
                    approvalDateStr = CalendarTransformer.toString(approvalDate);

                    if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
                }

                addSpacerRows(aTable, 1, 2, "8");

                // Veterinarian Name
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(VETERINARIAN_NAME), "300",
                        getTitleAlign()
                );
                name = NOT_YET_APPROVED;

                if (approver > 0)
                    name = ServiceLocator.getRascalUserService().findById(approver)
                            .getUserFirstLastNameUni();

                aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(name), "500", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);

                // Veterinarian approval date
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                        getTitleAlign()
                );
                aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(approvalDateStr), "500", "left"
                );

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }
        }

        getForm().add(aTable);
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   defaultValue  TODO: DOCUMENT ME!
     *
     * @throws  Exception  TODO: DOCUMENT ME!
     */
    @Override protected void addGeneralFields(boolean defaultValue) throws Exception {
        CUHtmlTableRow aRow;
        CUHtmlTableCell aCell1;
        CUHtmlTableCell aCell2;

        CUHtmlTable aTable = utilGetHtmlTable("100%", 0, 2);
        aTable.setCellPadding(4);

        addSpacerRows(aTable, 1, 2, "8");

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(TITLE2), "100%", getTitleAlign());
File Line
edu/columbia/rascal/presentation/lookup/servlets/RascalLookupAbstractServlet.java 82
edu/columbia/rascal/presentation/user/servlets/CUInfoAbstractServlet.java 82
                RascalLookupHtmlView page = (RascalLookupHtmlView) getPage();

                if (page != null) {
                    page.setLineParameters(getLineParameters());
                    page.draw(getResponse());
                } else if (getRedirectUrl() != null) {
                    super.redirectTo(getRedirectUrl());
                }
            } else
                ts.setRollbackOnly();
        } catch (Exception e) {
            ts.setRollbackOnly();
            log.error("Got Exception", e);
            (new CURascalErrorMessageView(e, "Exception " + getClassName())).draw(getResponse());
        } finally {

            if (!ts.isCompleted()) {

                if (ts.isRollbackOnly()) {
                    log.info("transaction is marked for rollback");
                    tm.rollback(ts);
                } else
                    tm.commit(ts);
            } else {
                log.error("transaction has already completed.");
            }
        }
    }

    /**
     * @see  edu.columbia.rascal.presentation.common.CURascalVapServlet#doPost(javax.servlet.http.HttpServletRequest,
     *       javax.servlet.http.HttpServletResponse)
     */
    @Override public void doPost(HttpServletRequest req, HttpServletResponse res) {

        // even though i am passing the req and res to my servlets, there is
        // some stuff in the tx framework that requires these to be set
        setRequest(req);
        setResponse(res);

        // clear the line parameters
        getLineParameters().clear();
        setLineParameters(req.getQueryString());


        WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(this
                .getServletContext()
                );
        PlatformTransactionManager tm = (PlatformTransactionManager) ctx.getBean(
                "transactionManager"
                );
        TransactionStatus ts = tm.getTransaction(new DefaultTransactionDefinition());

        try {

            if (validatePost()) {
                submit();
            } else {
                ts.setRollbackOnly();
            }

            if (getRedirectUrl() != null) {
                super.redirectTo(getRedirectUrl());
            }
        } catch (Exception e) {
            ts.setRollbackOnly();
            log.error("Got Exception", e);
            (new CURascalErrorMessageView(e, "Exception " + getClassName())).draw(getResponse());
        } finally {

            if (!ts.isCompleted()) {

                if (ts.isRollbackOnly()) {
                    log.info("transaction is marked for rollback");
                    tm.rollback(ts);
                } else
                    tm.commit(ts);
            } else {
                log.error("transaction has already completed.");
            }
        }
    }


    /** @see  edu.columbia.rascal.presentation.common.CURascalServlet#getPrefix() */
    @Override public String getPrefix() {
File Line
edu/columbia/rascal/presentation/appendix/jdbc/AppendixWorkListQueryFormat.java 2582
edu/columbia/rascal/presentation/appendix/jdbc/AppendixWorkListQueryFormat.java 2728
        tacMoreWhere4.append("')))");


        // Appendix B
        dynTable.append("SELECT DISTINCT ");
        dynTable.append(" iph.oid");
     //   dynTable.append(" INTO " + tempTableName);
        dynTable.append(tacFromWhere1.toString());

        dynTable.append(" AND lower(iph.infectiousAgentsRequired) = 'y'");

        dynTable.append(tacMoreWhere2.toString());

        dynTable.append(" AND 'B'");

        dynTable.append(tacMoreWhere3.toString());

        dynTable.append(" AND 'B'");

        dynTable.append(tacMoreWhere4.toString());

        // Appendix C
        dynTable.append(" UNION SELECT DISTINCT ");
        dynTable.append(" iph.oid");
        dynTable.append(tacFromWhere1.toString());

        dynTable.append(" AND lower(iph.humanBloodRequired) = 'y'");

        dynTable.append(tacMoreWhere2.toString());

        dynTable.append(" AND 'C'");

        dynTable.append(tacMoreWhere3.toString());

        dynTable.append(" AND 'C'");

        dynTable.append(tacMoreWhere4.toString());

        // Appendix E
        dynTable.append(" UNION SELECT DISTINCT ");
        dynTable.append(" iph.oid");
        dynTable.append(tacFromWhere1.toString());

        dynTable.append(" AND lower(iph.chemicalsRequired) = 'y'");

        dynTable.append(tacMoreWhere2.toString());

        dynTable.append(" AND 'E'");

        dynTable.append(tacMoreWhere3.toString());

        dynTable.append(" AND 'E'");

        dynTable.append(tacMoreWhere4.toString());

        // Appendix F
        dynTable.append(" UNION SELECT DISTINCT ");
        dynTable.append(" iph.oid");
        dynTable.append(tacFromWhere1.toString());

        dynTable.append(" AND lower(iph.radioIsotopesRequired) = 'y'");

        dynTable.append(tacMoreWhere2.toString());

        dynTable.append(" AND 'F'");

        dynTable.append(tacMoreWhere3.toString());

        dynTable.append(" AND 'F'");

        dynTable.append(tacMoreWhere4.toString());

        // construct selection list for the main query

        // required

        // main query

        //       query.append(" DROP TABLE " + tempTableName);

        return " SELECT DISTINCT" + " iph.oid," + " iph.protocolNumber," + " iph.protocolYear," + " iph.modificationNumber," + " iph.submitDate," + " usr.name_first," + " usr.name_last," + " usr.user_id," + " iph.speciesName," + " iph.protocolType," + " iph.primarySite," + " iph.currentStatus," + " iph.painCategory1," + " iph.painCategory2," + " iph.painCategory3," + " iph.painCategory4," + " iph.dnaRequired," + " iph.infectiousAgentsRequired," + " iph.humanBloodRequired," + " iph.laserRequired," + " iph.chemicalsRequired," + " iph.radioIsotopesRequired," + " iph.humanCellLinesRequired," + " iph.xrayRequired" + " FROM IacucProtocolHeader iph," + " IacucStaff staff," + " RASCAL_USER usr" + " WHERE iph.currentStatus NOT in('" + KEY_ACTION_CREATE + "','" +
                KEY_ACTION_RETURN + "','" + KEY_ACTION_TERMINATE + "','" + KEY_ACTION_SUSPEND + "')" + " AND (lower(iph.infectiousAgentsRequired) = 'y'" + " OR lower(iph.humanBloodRequired) = 'y'" + " OR lower(iph.chemicalsRequired) = 'y'" + " OR lower(iph.radioIsotopesRequired) = 'y')" + " AND NOT EXISTS" + " (SELECT * FROM (" + dynTable + ") vet1 WHERE oid = iph.oid)" + " AND (staff.IacucProtocolHeaderPer_oid = iph.oid" + " AND  staff.protocolRole = 'PI'" + " AND  staff.rid = usr.rid)" + " ORDER BY iph.protocolNumber DESC";
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusView.java 251
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusView.java 251
            columns.addElement(getWidgetFor("Category A"));
            columns.addElement(getWidgetFor("Category B"));
        }

        t.addRowFor(columns);
        elements = new Vector();

        int rowSize = rows.size();

        for (int n = 0; n < rowSize; n++) {
            Hashtable currentRow = (Hashtable) rows.elementAt(n);
            String name = (String) currentRow.get("EventName");

            if (name.equals("Protocol") || name.equals("Modification") || name.equals("Renewal") ||
                    name.equals("AdverseEvent") || name.equals(IrbNameConstants.UNANTICIPATED_PROBLEM) ||
                     name.equals("Closure")
            ) {

                if (!(getPrintable())) {

                    if (name.equals("Protocol") || name.equals("Modification") ||
                            name.equals("Renewal")
                    ) {
                        elements.addElement(getObjectLinkWidgetFor(name,
                                (String) currentRow.get("EventOid"), "ProtocolHeader",
                                (String) currentRow.get("ProtocolOid")
                                )
                            ); // Event
                    } else {
                        elements.addElement(getObjectLinkWidgetFor(name,
                                (String) currentRow.get("EventOid"), name,
                                (String) currentRow.get("ProtocolOid")
                                )
                            );
                    }

                    elements.addElement(getProtocolLinkWidgetFor(
                            (String) currentRow.get("ProtocolNumber"),
                            (String) currentRow.get("ProtocolOid")
                            )
                        ); // Protocol Number
                } else {
                    elements.addElement(getWidgetFor((String) currentRow.get("EventName")));
                    elements.addElement(getWidgetFor((String) currentRow.get("ProtocolNumber")));
                }
            }

            elements.addElement(getWidgetFor((String) currentRow.get("Committee"))); // Committee
            elements.addElement(getWidgetFor((String) currentRow.get("PI")));        // PI

            if (name.equals("Protocol") || name.equals("Modification") || name.equals("Renewal")) {
                elements.addElement(getWidgetFor(StringUtils.isEmpty(currentRow.get("COI"))?"":
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportExpiredUnclosuredView.java 144
edu/columbia/rascal/presentation/irb/pages/IrbReportHarlemHospitalView.java 119
                    );
            description.setFontSize("-1");
            description.setIsBold(false);
            description.setAlignment("center");
            description.setFontName(getDefaultFontName());

            aForm.add(description);
            aForm.add("<br>");
        }

        if ((format != null) && format.equalsIgnoreCase("normal")) {
            CUHtmlTable table = new CUHtmlTable();
            Vector moreButtons = new Vector();

            table.setBorderWidth(0);

            CUHtmlText text = new CUHtmlText("Sorted&nbsp;by&nbsp;Protocol&nbsp;Number");
            text.setFontSize("1");
            moreButtons.add(text);
            table.add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell(getReportHelpFor("").getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "print", "Printable Form",
                    "return openNew('" + getServletName() +
                    "?format=print','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            pb = new CUHtmlPushButton("BUTTON", "download", "Downloadable Form",
                    "return openNew('" + getServletName() +
                    "?format=download','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);
            table.getRowAt(0).getCell(2).setWidth("90%");
            table.getRowAt(0).getCell(5).setAlign("right");

            aForm.add(table);
            aForm.add("<br>");
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   results  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String createSubTable(CUSortVector results) {

        StringBuilder html = new StringBuilder(0);
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDatabaseStoreUtilityServlet.java 278
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesChairSingleEventApprovalUtilityServlet.java 123
    public Object getMinutesPDFPage(IrbAgendaHeader ah) {


        if (ah == null) {

            return new IrbAgendaMessageView("Invalid Agenda Number", "window.close()");

        }


        Vector protocolAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector meetingAttendants = ah.getAllMeetingAttendants();
        Vector expeditableAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), PENDING
                );
        Vector otherTopicAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), "Other");

        return new IrbAgendaMinutesDataSheetPDFView(ah, getUser(), protocolAttached,
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBView.java 1854
edu/columbia/rascal/presentation/appendix/pages/AppendixCView.java 709
    public CUHtmlTable getCheckBoxesInTwoColumns(List<RascalAppendixPPE> rascalAppendixPPEList, List<AppendixBPPE> appendixPPEList, String checkBoxRelatedTo, String onClick
        ) {
        int collectionSize = rascalAppendixPPEList.size();
        int firstColumnSize = (collectionSize / 2) + (collectionSize % 2);
        int secondColumnSize = collectionSize - firstColumnSize;

        Vector firstColumn = new Vector(firstColumnSize);

        for (int i = 0; i < firstColumnSize; i++) {
            firstColumn.addElement(rascalAppendixPPEList.get(i).getEquipment());
        }

        Vector secondColumn = new Vector(secondColumnSize);

        for (int i = firstColumnSize; i < collectionSize; i++) {
            secondColumn.addElement(rascalAppendixPPEList.get(i).getEquipment());
        }

        CUHtmlTable table = new CUHtmlTable();
        table.setWidth("100%");
        table.setBorderWidth(0);

        Vector columns = new Vector();
        columns.addElement("");
        columns.addElement("");
        table.addRowFor(columns);
        columns = new Vector();

        Object aWidget;
        String elementName;

        for (int i = 0; i < firstColumnSize; i++) {
            columns.addElement("");

            try {
                elementName = (String) firstColumn.elementAt(i);
                aWidget = getCheckBoxWidgetFor(
                        elementName,
                        elementSelected(elementName, appendixPPEList),
                        onClick,
                        checkBoxRelatedTo
                        );
                columns.addElement(aWidget);

                if (i < secondColumnSize) {
                    elementName = (String) secondColumn.elementAt(i);
                    aWidget = getCheckBoxWidgetFor(
                            elementName,
                            elementSelected(elementName, appendixPPEList),
                            onClick,
                            checkBoxRelatedTo
                            );
                    columns.addElement(aWidget);
                } else {
                    columns.addElement("");
                }
            } catch (Exception e) {
                columns.addElement("");
            }

            table.addRowFor(columns);
            columns = new Vector();


        }

        table.setCellPadding(0);
        table.getCell(0, 0).setWidth("60");
        table.getCell(0, 1).setWidth("50%");
//        table.getCell(0, 2).setWidth("*");
        table.getCell(0, 1).setAlign("top");

        return table;
    }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportHistoryView.java 273
edu/columbia/rascal/presentation/irb/pages/IrbReportHistoryView.java 375
        columns.addElement(getWidgetFor("Original Log In Date"));
        columns.addElement(getWidgetFor("Current Status"));
        columns.addElement(getWidgetFor("Status Date"));


        t.addRowFor(columns);
        elements = new Vector();

        int rowSize = rows.size();

        for (int n = 0; n < rowSize; n++) {
            Hashtable currentRow = (Hashtable) rows.elementAt(n);
            String name = (String) currentRow.get("EventName");

            if (name.equals("Protocol") || name.equals("Modification") || name.equals("Renewal") ||
                    name.equals("AdverseEvent") || 
                    name.equals(IrbNameConstants.UNANTICIPATED_PROBLEM) || name.equals("Closure")
            ) {

                if (!(getPrintable())) {

                    if (name.equals("Protocol") || name.equals("Modification") ||
                            name.equals("Renewal")
                    ) {
                        elements.addElement(getObjectLinkWidgetFor(name,
                                (String) currentRow.get("EventOid"), "ProtocolHeader",
                                (String) currentRow.get("ProtocolOid")
                                )
                            ); // Event
                    } else {
                        elements.addElement(getObjectLinkWidgetFor(name,
                                (String) currentRow.get("EventOid"), name,
                                (String) currentRow.get("ProtocolOid")
                                )
                            );
                    }

                    elements.addElement(getProtocolLinkWidgetFor(
                            (String) currentRow.get("ProtocolNumber"),
                            (String) currentRow.get("ProtocolOid")
                            )
                        ); // Protocol Number
                } else {
                    elements.addElement(getWidgetFor((String) currentRow.get("EventName")));
                    elements.addElement(getWidgetFor((String) currentRow.get("ProtocolNumber")));
                }
            }

            elements.addElement(getWidgetFor((String) currentRow.get("PI")));        // PI
            elements.addElement(getWidgetFor((String) currentRow.get("Initiator"))); // Initiator
            elements.addElement(getWidgetFor((String) currentRow.get("Committee"))); // Committee


            dateObj = currentRow.get("OriginalLogInDate"); // Date Assigned
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusView.java 93
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusView.java 91
edu/columbia/rascal/presentation/irb/pages/IrbReportExpirationDateView.java 78
        columns.addElement("StatusDate");

        if (!(getDownloadable())) {
            addHeader();
            getForm().add(addDate());
            getForm().add("<br>");
            getForm().add(addDateRange());
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaPDFDataSheetView.java 635
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaPDFDataSheetView.java 765
    public void addProtocolAttached(String label, Vector protocolAttached, String eventName) {
        int size = protocolAttached.size();

        if (size > 0) {

            addContent(" ", " ", theStyle);
            addSectionTitle(label);
            setDataSheetFeature();

            String firstLabel = "Protocol Number";
            String secondLabel = "Title";
            float xyPosition[] = new float[] {};

            if (eventName.equals("AdverseEvent") || eventName.equals(IrbNameConstants.UNANTICIPATED_PROBLEM)) {
                secondLabel = "Keyword";
            }

            int tableSize = 5;

            Vector vLabel = new Vector(tableSize);
            vLabel.add(0, firstLabel);
            vLabel.add(1, secondLabel);
            vLabel.add(2, "Reviewer");
            vLabel.add(3, "Comments");
            vLabel.add(4, "PI");

            if (eventName.equals(PENDING) || eventName.equals(IrbNameConstants.EXEMPT) || eventName.equals(IrbNameConstants.EXPEDITED)
            ) {
                vLabel.add(5, "Approval Date");
            }

            xyPosition = new float[] {
                unitXy * 14, unitXy * 16, unitXy * 10, unitXy * 40, unitXy * 10, unitXy * 10
            };

            Vector currentRow = null;
            Vector vContent = new Vector(tableSize);
            String strEUIRB = "";


            for (int i = 0; i < size; i++) {

                if (i == 0) {
                    addUnderLinedLabel(vLabel, xyPosition, theStyle, 10, 12);
                }

                // setHeight(getHeight()-getPDFPage().getStyle().getFontLeading());
                currentRow = (Vector) protocolAttached.elementAt(i);

                strEUIRB = getNotNullString((String) currentRow.elementAt(1), "");

                strEUIRB = "IRB-" + strEUIRB;

                vContent.add(0, strEUIRB);
                vContent.add(1, getNotNullString((String) currentRow.elementAt(3), "")); // title


                // reviewer
                StringBuilder revString = new StringBuilder("");

                if (getAgendaView().getEventObject((String) currentRow.elementAt(0), eventName) !=
                        null
                ) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbUnanticipatedAttachmentExternalView.java 241
edu/columbia/rascal/presentation/irb/pages/IrbUnanticipatedAttachmentInternalView.java 238
            String titles[] = { "View Document", "File Name", "Date Attached", "Edit", "Archive" };
            Vector columns = new Vector();
            int titleLen = titles.length;

            for (String title : titles) {
                columns.add(getHeadingLabelFor(title));
            }

            return columns;
        }
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString    is the ProtocolNumber
     * @param   aLocation  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getLinkWidgetFor(String aString, String aLocation) {


        if ((aString == null) || aString.equals("")) {
            return new CUHtmlText("");
        }

        CUHtmlText text = new CUHtmlText(aString);
        text.setLink("'" + aLocation + "'");
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        return text;
    }

    /** @see  edu.columbia.rascal.presentation.irb.pages.IrbHtmlView#getProtocolGeneralHeaderHtml() */
    @Override public String getProtocolGeneralHeaderHtml() {

        String s = "";
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";
        IrbProtocolHeader ph = getProtocol().getLastProtocolHeader();
        setProtocolHeader(ph);

// String department = (getProtocolHeader().getOriginatingDepartment().trim().equals("") ? blank :
// getProtocolHeader().getOriginatingDepartment());

        String departmentCode = (getProtocolHeader().getOriginatingDepartment().trim().equals("")
                ? blank : getProtocolHeader().getOriginatingDepartment());
        String department = "";

        if (!departmentCode.equals(blank))
            department = ServiceLocator.getRascalDepartmentService().findById(departmentCode)
                .getName() + "&nbsp" + "(" + departmentCode + ")";
        else
            department = blank;

        add(getSubTitle());
        s += "<table width=\"100%\" border=\"1\" bgcolor=\"#CCCCCC\">";
        s += "<tr> ";
        s += "<td colspan=\"2\"> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Protocol Number</font> </div>";
        s += "</td> <td colspan=\"2\"> <font face=\"Comic Sans MS\" size=\"1\"> ";
        s += getPrefix() +
            ((getProtocolHeader().getIrbProtocol().getProtocolNumber() == null)
                ? "" : getProtocolHeader().getIrbProtocol().getProtocolNumber());
        s += "</font></td> </tr> <tr> <td width=\"25%\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">You are</font></div>";
        s += "</td> <td><font face=\"Comic Sans MS\" size=\"1\">";
        s += getRascalUser().getUserFirstLastNameUni();
        s += "</font></td> <td width=\"25%\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Department</font></div>";
        s += "</td> <td width=\"25%\"> <font face=\"Comic Sans MS\" size=\"1\"> ";
        s += department + "</font></td> </tr> <tr> <td> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Principal Investigator</font></div></td><td>";
        s +=
            (((CUHtmlItem) getWidgetFor(
                        ServiceLocator.getIrbProtocolHeaderService().getParticipantString(
                            "Principal Investigator", getProtocolHeader()
                            )
                        )).getHtml());
        s += "</td> <td> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Initiator</font></div>";
        s += "</td> <td>";

        if ((getUnanticipatedProblem() != null) && (getUnanticipatedProblem().getCreatedBy() != 0)
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixAView.java 222
edu/columbia/rascal/presentation/appendix/pages/AppendixIView.java 728
    public Vector stringtoVector(String s, String sep) {

        // convert a String s to Vector, the elements
        // are delimited by sep
        if (s.trim().length() > 0) s = s.substring(1, s.length() - 1);

        StringBuffer buf = new StringBuffer(s);
        int arraysize = 1;

        for (int i = 0; i < buf.length(); i++) {

            if (sep.indexOf(buf.charAt(i)) != -1) arraysize++;
        }

        Vector elements = new Vector(arraysize);
        int y;
        int z = 0;

        if (buf.toString().contains(sep)) {

            while (buf.length() > 0) {

                if (buf.toString().contains(sep)) {
                    y = buf.toString().indexOf(sep);

                    if (y != buf.toString().lastIndexOf(sep)) {
                        elements.add(z, buf.toString().substring(0, y).trim());
                        z++;
                        buf.delete(0, y + 1);
                    } else if (buf.toString().lastIndexOf(sep) == y) {
                        elements.add(z,
                            (buf.toString().substring(0, buf.toString().indexOf(sep))).trim()
                            );
                        z++;
                        buf.delete(0, buf.toString().indexOf(sep) + 1);
                        elements.add(z, buf.toString().trim());
                        z++;
                        buf.delete(0, buf.length());
                    }
                }
            }
        } else {
            elements.add(0, buf.toString());
        }

        buf = null;

        int t = elements.size();

        return elements;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixInvitroView.java 69
edu/columbia/rascal/presentation/appendix/pages/AppendixLabAbstractView.java 195
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 1012
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 1129
            creationDate = hah.getCreationDate().toString();

            String departmentName = (isEmpty(hah.getDeptName()) ? blank : hah.getDeptName());
            String departmentCode = (isEmpty(hah.getDeptNumber()) ? blank : hah.getDeptNumber());

            if (!departmentName.equals(blank)) {
                department = departmentName + "&nbsp" + "(" + departmentCode + ")";
            }

            department = (isEmpty(department) ? blank : department);

        } else {
            pTitle = blank;
            pNumber = blank;
            piString = blank;
            initiatorString = blank;
            creationDate = blank;
            department = blank;
        }

        add(getSubTitle());
        s.append("<p><table width=\"100%\" border=\"1\" bgcolor=\"#CCCCCC\">");
        s.append("<tr> ");
        s.append("<td align= \"right\"> ");
        s.append("<font face=\"Comic Sans MS\" size=\"1\">Title</font>");
        s.append("</td>");

        // title
        s.append("<td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(pTitle).append("</font></td> ");

        // protocol number
        s.append("<td > ");
        s.append(
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">In-Vitro Number</font> </div>"
            );
        s.append("</td> <td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(pNumber);
        s.append("</font></td> </tr>");

        // creation date
        s.append(
            "<tr> <td><div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Date Created</font></div></td> <td> "
            );
        s.append("<font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(creationDate);
        s.append("</font></td>  ");

        // creation date
        s.append(
            "<td><div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Initiator</font></div>"
            );
        s.append("</td> <td> <font face=\"Comic Sans MS\" size=\"1\"> ");
        s.append(initiatorString).append("</font></td> </tr>  ");

        // pi
        s.append("</font></td></tr> ");
        s.append(
            " <tr> <td>  <div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Principal Investigator</font></div>"
            );
        s.append("</td> <td><font face=\"Comic Sans MS\" size=\"1\">");
        s.append(piString);

        // user
        s.append("</font></td> ");
        s.append(
            " <td>  <div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">You are</font></div>"
            );
        s.append("</td> <td><font face=\"Comic Sans MS\" size=\"1\">");
        s.append(getRascalUser().getNameFirst()).append(" ").append(getRascalUser().getNameLast()).append(" (").append(getRascalUser().getUserId()).append(")");
        s.append("</font></td></tr> ");
        s.append("</table> <br>");

        return s.toString();
    }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportDeviceStudyView.java 187
edu/columbia/rascal/presentation/irb/pages/IrbReportExpiredUnclosuredView.java 144
edu/columbia/rascal/presentation/irb/pages/IrbReportHarlemHospitalView.java 119
                    );
            description.setFontSize("-1");
            description.setIsBold(false);
            description.setAlignment("center");
            description.setFontName(getDefaultFontName());

            aForm.add(description);
            aForm.add("<br>");
        }

        if ((format != null) && format.equalsIgnoreCase("normal")) {
            CUHtmlTable table = new CUHtmlTable();
            Vector moreButtons = new Vector();

            table.setBorderWidth(0);

            // Sorting is complicated by one-to-many relationships, sorting defaulted to Protocol
            // Number. Developing a *useful* means to sort data will consume time. Will develop if
            // sorting becomes a demand. moreButtons.add(getSortHeaderForColumnNames(columns, "",
            // ""));
            CUHtmlText text = new CUHtmlText("Sorted&nbsp;by&nbsp;Protocol&nbsp;Number");
            text.setFontSize("1");
            moreButtons.add(text);
            table.add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell(getReportHelpFor("").getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "print", "Printable Form",
                    "return openNew('" + getServletName() +
                    "?format=print','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            pb = new CUHtmlPushButton("BUTTON", "download", "Downloadable Form",
                    "return openNew('" + getServletName() +
                    "?format=download','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);
            table.getRowAt(0).getCell(2).setWidth("90%");
            table.getRowAt(0).getCell(5).setAlign("right");

            aForm.add(table);
            aForm.add("<br>");
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aPackage  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String createFlatTable(CUSortVector aPackage) {
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentHtmlView.java 1239
edu/columbia/rascal/presentation/user/views/CuHtmlView.java 359
    }


    /** @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#setLabelName(java.lang.String) */
    @Override public void setLabelName(String newValue) {

        int index = newValue.indexOf(":");

        if (index > 0) {
            this.labelName = newValue.substring(0, index);
        } else {
            this.labelName = newValue;
        }
    }

    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#setLineParameters(java.util.Hashtable)
     */
    @Override public void setLineParameters(Hashtable params) {

        // Save parameters passed through URL in hidden fields of the form. Names of all
        // parameters are lowercase
        Enumeration e = params.keys();

        while (e.hasMoreElements()) {
            String key = (String) e.nextElement();
            String value = (String) params.get(key);

            getForm().add(new CUHtmlHiddenField(key, value));
        }
    }

    /**
     * Sets the mainTitle of this page. If aMainTitle is a String, use the default mainTitle
     * settings. if aMainTitle is CUHtmlText, override the default mainTitle settings.
     *
     * @param  aMainTitle  TODO: DOCUMENT ME!
     */
    public void setMainTitle(Object aMainTitle) {

        if (aMainTitle instanceof CUHtmlText) {
            mainTitle = (CUHtmlText) aMainTitle;
        } else {

            if (aMainTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aMainTitle);
                aText.setFontSize("+2");
                aText.setIsBold(true);
                aText.setAlignment("left");
                aText.setFontName(getDefaultFontName());
                mainTitle = aText;

                // Set also the title of the page to same.
                setTitle((String) aMainTitle);
            }
        }
    }


    /**
     * TODO: DOCUMENT ME!
     *
     * @param  newValue  TODO: DOCUMENT ME!
     */
    public void setRascalUser(RascalUser newValue) {
        this.rascalUser = newValue;
    }

    /**
     * Sets the subtitle of this page. If aSubTitle is a String, use the default subtitle settings.
     * if aSubTitle is CUHtmlText, override the default title settings.
     *
     * @param  aSubTitle  TODO: DOCUMENT ME!
     */
    public void setSubTitle(Object aSubTitle) {

        if (aSubTitle instanceof CUHtmlText) {
            subTitle = (CUHtmlText) aSubTitle;
        } else {

            if (aSubTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aSubTitle);
                aText.setFontSize("+2");
                aText.setAlignment("center");
                aText.setFontName(getDefaultFontName());
                subTitle = aText;
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   req      TODO: DOCUMENT ME!
     * @param   parName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    protected String getRequestParameter(HttpServletRequest req, String parName) {

        // FIXME XSS
        // String result = req.getParameter(parName);
        String result = HtmlUtils.htmlEscape(req.getParameter(parName));

        return (result.equals("")) ? null : result;
    }


    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    private EVector getDefaultMainFooter() {

        EVector result = new EVector();
        result.add(getRuler());
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDataSheetServlet.java 159
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDatabaseStoreUtilityServlet.java 205
        long committeeId = ah.getCommitteeId();


        Vector protocolAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector expeditableAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), PENDING
                );
        Vector otherTopicAttached = ah.getAllAgendaEventsByType("Other");
        Vector oldBusinessAttached = ah.getAllAgendaEventsByType("OldBusiness");
        Vector newBusinessAttached = ah.getAllAgendaEventsByType("NewBusiness");

        return new IrbAgendaPDFDataSheetView(ah, getUser(), protocolAttached, modificationAttached,
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixBReportView.java 332
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 800
                approvalDateStr = approvalDate.toString();

                if (approvalDateStr.equals("00/00/0000")) approvalDateStr = "";
            }

            // spacer
            addSpacerRows(aTable, 1, 2, "8");

            // Biosafety Officer
            aRow = new CUHtmlTableRow();

            String name = NOT_YET_APPROVED;

            if (approver > 0)
                name = ServiceLocator.getRascalUserService().findById(approver)
                        .getUserFirstLastNameUni();

            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_SAFETY_OFFICER), "300",
                    getTitleAlign()
            );
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(name), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            // Biosafety approval date
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_DATE), "300",
                    getTitleAlign()
            );
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(approvalDateStr), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            // Biosafety approval number
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(APPROVAL_NUMBER), "300",
                    getTitleAlign()
            );
            textValue = (getTracker().getEhsNumber() == null) ? "" : getTracker().getEhsNumber();
            aCell2 = utilGetHtmlTableCell(utilGetDefaultHtmlText(textValue), "500", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            // gather veterinarian approval data
            if ((getOwnerSurrogate().getSubject() != null) &&
                    !getOwnerSurrogate().getSubject().equals("Human")
                    ) {
                AppendixApproval vetApproval = getApproval(VETERINARIAN_TYPE, getTracker());
                approver = 0;
                approvalDate = null;
                approvalDateStr = "";

                if ((vetApproval != null) && (vetApproval.getApprovalType() != null) &&
                        (vetApproval.getApprovalType().equals(APPROVE) ||
                                vetApproval.getApprovalType().equals(MANUAL_APPROVE))
                        ) {
                    approver = vetApproval.getApproverRid();
                    approvalDate = vetApproval.getApprovalDate();
// approvalDateStr = CalendarTransformer.toString(approvalDate);
                    approvalDateStr = approvalDate.toString();
File Line
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 381
edu/columbia/rascal/presentation/propTrak/pages/PtHtmlView.java 306
        CUHtmlCheckBox cb = new CUHtmlCheckBox(aName, aValue, checked, aLabel);

        return cb;
    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   currentDate     TODO: DOCUMENT ME!
     * @param   dateFieldName   TODO: DOCUMENT ME!
     * @param   monthFieldName  TODO: DOCUMENT ME!
     * @param   dayFieldName    TODO: DOCUMENT ME!
     * @param   yearFieldName   TODO: DOCUMENT ME!
     *
     * @return  CUHtmlList
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = new Long(currentDate.substring(0, 2)).intValue();
        int dayIndex = new Long(currentDate.substring(3, 5)).intValue();
        int year = new Long(currentDate.substring(6)).intValue();

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   fieldName  TODO: DOCUMENT ME!
     * @param   dayIndex   TODO: DOCUMENT ME!
     *
     * @return  CUHtmlList
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {
File Line
edu/columbia/rascal/presentation/ic/views/IacucHtmlView.java 100
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 384
    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = new Long(currentDate.substring(0, 2)).intValue();
        int dayIndex = new Long(currentDate.substring(3, 5)).intValue();
        int year = new Long(currentDate.substring(6)).intValue();

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName,
                monthIndex
                );
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }

    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {


        Vector<String> list = new Vector<String>();
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportActiveApprovedProtocolView.java 74
edu/columbia/rascal/presentation/irb/pages/IrbReportInProcessProtocolView.java 71
        columns.addElement("Abbreviated_Title");

        if (!(getDownloadable())) {
            addHeader();
            getForm().add(addDate());
            getForm().add("<br>");
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);
            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);
            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentHtmlView.java 334
edu/columbia/rascal/presentation/ic/views/IacucHtmlView.java 100
edu/columbia/rascal/presentation/irb/pages/IrbHtmlView.java 376
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 384
edu/columbia/rascal/presentation/propTrak/pages/PtHtmlView.java 309
    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = new Long(currentDate.substring(0, 2)).intValue();
        int dayIndex = new Long(currentDate.substring(3, 5)).intValue();
        int year = new Long(currentDate.substring(6)).intValue();

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }


    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDataSheetServlet.java 69
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDatabaseStoreUtilityServlet.java 205
        long committeeId = ah.getCommitteeId();


        Vector protocolAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector expeditableAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getAgendaEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                ); 
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNonRascalEventsFor(ah.getId(), PENDING
                );

        Vector otherTopicAttached = ah.getAllAgendaEventsByType("Other");
        Vector oldBusinessAttached = ah.getAllAgendaEventsByType("OldBusiness");
        Vector newBusinessAttached = ah.getAllAgendaEventsByType("NewBusiness");

        return new IrbAgendaDataSheetView(ah, getUser(), protocolAttached, modificationAttached,
File Line
edu/columbia/rascal/presentation/controller/pt/PtApprovalsController.java 228
edu/columbia/rascal/presentation/controller/pt/PtProjectOfficerDataController.java 144
	}

	private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
		final Map<String, Object> recordHeading = new HashMap<String, Object>();

		// You are
		recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());

		if (proposal != null && proposal.getId() != null) {

			// Proposal TrakId
			recordHeading.put("trakId", "PT-" + proposal.getTrakId());
			// Deadline
			recordHeading.put("deadlineDate", proposal.getDeadlineDate());
			// Deadline Type
			recordHeading.put("deadlineType", proposal.getDeadlineType());
			// Date Created
			recordHeading.put("createDate", proposal.getCreationDate());

			// Sponsor
			final PtAgencyAddress ptAgencyAddress = ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);
			if (ptAgencyAddress != null) {
				recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());
			}

			// Logged in by SPA
			final List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(proposal,
					"Logged In");
			if (statuses != null && statuses.size() > 0) {
				recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());
			}

			RascalUser ru;

			// Initiator
			final PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);
			if (init != null) {
				ru = init.getRascalUser();
				if (ru != null) {
					recordHeading.put("initiator", ru.getUserFirstLastNameUni());
				}
			}

			// Principal Investigator
			final PtAccessControl pi = proposal.getLeadPerson();
			if (pi != null) {
				ru = pi.getRascalUser();
				if (ru != null) {
					recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
				}
			}

		} else {
			recordHeading.put("createDate", new Date());
			recordHeading.put("trakId", "PT-XXXX9999");
			recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
		}
		return recordHeading;
	}

	/**
	 * TODO: DOCUMENT ME!
	 * 
	 * @param ptAccessControlService TODO: DOCUMENT ME!
	 */
	protected void setPtAccessControlService(PtAccessControlService ptAccessControlService) {
		this.ptAccessControlService = ptAccessControlService;
	}
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 2983
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3468
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4158
        aBuffer.append("' and stat.parentObjectOid = header.oid and header.modificationNumber > 0 ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
                row.addElement(res.getString(5));                                                    // reviewer last name
                results.addElement(row.clone());
                row = new Vector(5);
            }

        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }


        return results;

    }

    /**
     * RASCAL (halayn) Creation date: (7/26/2002 14:53:52 PM)
     *
     * @param   aUser         TODO: DOCUMENT ME!
     * @param   reviewerType  TODO: DOCUMENT ME!
     *
     * @return  Vector of results
     */

    public static Vector getModificationEventsForReviewerQueue(RascalUser aUser, String reviewerType
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovalQueueView.java 734
edu/columbia/rascal/presentation/appendix/pages/AppendixSafetyOfficerApprovalQueueView.java 1044
        aCell.add(getTableCellData(level, "center"));
        colNum++;

        // appendix A
        aCell = aTable.getCell(rowCount, colNum);

        String required =
            ((queueItem.get(KEY_DNA_REQ) != null) &&
                (queueItem.get(KEY_DNA_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        aCell.setAlign("center");
        colNum++;

        // appendix B
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_INFECTIOUS_REQ) != null) &&
                (queueItem.get(KEY_INFECTIOUS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        aCell.setAlign("center");
        colNum++;

        // appendix C
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_HUMAN_MATERIAL_REQ) != null) &&
                (queueItem.get(KEY_HUMAN_MATERIAL_REQ)).toString().equalsIgnoreCase("y")) ? "x"
                                                                                          : "";
        aCell.add(getTableCellData(required, "center"));
        aCell.setAlign("center");
        colNum++;

        // appendix D
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_LASER_REQ) != null) &&
                (queueItem.get(KEY_LASER_REQ)).toString().equalsIgnoreCase("y")) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        aCell.setAlign("center");
        colNum++;

        // appendix E
        aCell = aTable.getCell(rowCount, colNum);
        required =
            ((queueItem.get(KEY_CHEMICALS_REQ) != null) &&
                (queueItem.get(KEY_CHEMICALS_REQ)).toString().equalsIgnoreCase(
                    "y"
                    )) ? "x" : "";
        aCell.add(getTableCellData(required, "center"));
        aCell.setAlign("center");
        colNum++;
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceCreateServlet.java 223
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceRespondServlet.java 397
            if (leadPerson != eventInitiatorRid) {     // PI
                recipient = new IrbCorrespondenceRecipient();
                recipient.setIrbCorrespondence(correspondence);
                recipient.setRecipientRid(leadPerson); // PI
                recipient.setProtocolRole("Principal Investigator");
                ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                correspondence.getIrbCorrespondenceRecipients().add(recipient);
                sentEmail(leadPerson, correspondence);
            }

            // study coordinator
            Vector<IrbStaff> studyCoordis = header.getStudyCoordinators();
            int studyCoorSize = studyCoordis.size();

            for (int i = 0; i < studyCoorSize; i++) {
                IrbStaff aStudyCor = studyCoordis.elementAt(i);

                if (!aStudyCor.getRid().equals(header.getCreatedBy()) &&
                        !aStudyCor.getRid().equals(Integer.valueOf(leadPerson))
                ) {
                    recipient = new IrbCorrespondenceRecipient();
                    recipient.setIrbCorrespondence(correspondence);
                    recipient.setRecipientRid(aStudyCor.getRid()); // PI
                    recipient.setProtocolRole("Study Coordinator");
                    ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                    correspondence.getIrbCorrespondenceRecipients().add(recipient);
                    sentEmail(aStudyCor.getRid(), correspondence);
                }
            }

            // Regulatory Coordinator
            Vector<IrbStaff> rcCoordis = header.getRegulatoryCoordinators();
            int rcCoorSize = rcCoordis.size();

            for (int i = 0; i < rcCoorSize; i++) {
                IrbStaff aRcCor = rcCoordis.elementAt(i);

                if ((!aRcCor.getRid().equals(header.getCreatedBy())) &&
                        (!aRcCor.getRid().equals(leadPerson))
                ) {
                    recipient = new IrbCorrespondenceRecipient();
                    recipient.setIrbCorrespondence(correspondence);
                    recipient.setRecipientRid(aRcCor.getRid()); // PI
                    recipient.setProtocolRole("Regulatory Coordinator");
                    ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                    correspondence.getIrbCorrespondenceRecipients().add(recipient);
                    sentEmail(aRcCor.getRid(), correspondence);
                }
            }
        } else {
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaDatabaseStoreUtilityServlet.java 288
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesChairSingleEventApprovalUtilityServlet.java 133
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesDataSheetServlet.java 70
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesDataSheetServlet.java 156
        Vector protocolAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector modificationAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector renewalAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL);
        Vector adverseEventAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector closureAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector unanticipateAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector meetingAttendants = ah.getAllMeetingAttendants();
        Vector expeditableAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector exemptAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector pendingAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), PENDING);
        Vector NRprotocolAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.PROTOCOL_HEADER
                );
        Vector NRmodificationAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.MODIFICATION
                );
        Vector NRrenewalAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.RENEWAL
                );
        Vector NRadverseEventAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.ADVERSE_EVENT
                );
        Vector NRclosureAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.CLOSURE
                );
        Vector NRunanticipateAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.UNANTICIPATED_PROBLEM
                );
        Vector NRexpeditableAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(),
        		IrbNameConstants.EXPEDITED
                );
        Vector NRexemptAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), IrbNameConstants.EXEMPT);
        Vector NRpendingAttached = IrbAgendaProtocolQuery.getNRMinutesEventsFor(ah.getId(), PENDING
                );
        Vector otherTopicAttached = IrbAgendaProtocolQuery.getMinutesEventsFor(ah.getId(), "Other");

        return new IrbAgendaMinutesDataSheetPDFView(ah, getUser(), protocolAttached,
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixDView.java 216
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 201
    }

    /**
     * @see  edu.columbia.rascal.presentation.appendix.pages.AppendixHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = Integer.valueOf(currentDate.substring(0, 2));
        int dayIndex = Integer.valueOf(currentDate.substring(3, 5));
        int year = Integer.valueOf(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;
    }

    /**
     * @see  edu.columbia.rascal.presentation.appendix.pages.AppendixHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {

        Vector<String> list = new Vector<String>();
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsFirstSubmissionStatusView.java 60
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsStatusView.java 62
                IrbReportClinicalTrialsFirstSubmissionStatusServlet.class.getName(), "GET"
                )
            );
        setPageTitle("RASCAL Human Subject");
        setSubTitle("Clinical Trials Report");


        setPrintable(print);
        setDownloadable(downloadable);
        setSortBy(sortColumn);

        String instruction = "";

        if (!(getDownloadable())) {
            addHeader(getBeginDate(), getEndDate());
            getForm().add(addDate());
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();

            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows, columns);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportDrugDeviceStudyView.java 188
edu/columbia/rascal/presentation/irb/pages/IrbReportExpiredUnclosuredView.java 146
edu/columbia/rascal/presentation/irb/pages/IrbReportHarlemHospitalView.java 121
            CUHtmlText description = new CUHtmlText(temp.toString());
            description.setAlignment("center");
            description.setFontName(getDefaultFontName());

            aForm.add(description);
            aForm.add("<br>");
        }

        if ((format != null) && format.equalsIgnoreCase("normal")) {
            CUHtmlTable table = new CUHtmlTable();
            Vector moreButtons = new Vector();

            table.setBorderWidth(0);

            // Sorting is complicated by one-to-many relationships, sorting defaulted to Protocol
            // Number. Developing a *useful* means to sort data will consume time. Will develop if
            // sorting becomes a demand. moreButtons.add(getSortHeaderForColumnNames(columns, "",
            // ""));
            CUHtmlText text = new CUHtmlText("Sorted&nbsp;by&nbsp;Protocol&nbsp;Number");
            text.setFontSize("1");
            moreButtons.add(text);
            table.add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell(getReportHelpFor("").getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "print", "Printable Form",
                    "return openNew('" + getServletName() +
                    "?format=print','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            moreButtons.add(new CUHtmlTableCell("&nbsp;"));
            table.getRowAt(0).add(moreButtons);

            moreButtons = new Vector();
            pb = new CUHtmlPushButton("BUTTON", "download", "Downloadable Form",
                    "return openNew('" + getServletName() +
                    "?format=download','','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=550');"
                    );
            moreButtons.add(new CUHtmlTableCell(pb.getHtml()));
            table.getRowAt(0).add(moreButtons);
            table.getRowAt(0).getCell(2).setWidth("90%");
            table.getRowAt(0).getCell(5).setAlign("right");

            aForm.add(table);
            aForm.add("<br>");
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aPackage  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String createFlatTable(CUSortVector aPackage) {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixFView.java 275
edu/columbia/rascal/presentation/appendix/pages/AppendixGView.java 301
        aCell2 = utilGetHtmlTableCell(fieldGet_0d_NumberOfAnimals("0d", defaultValue), "500", "left"
                );
        aCell2.setVAlign("bottom");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        addSpacerRows(aTable, 1, 2, "6");

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(getRowLabelLeftFor(TITLENOTE1), "100%", getTitleAlign());
        aCell1.setColumnsToSpan(2);

        aRow.add(aCell1);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(fieldGet_Spacer("10"), "100%", getTitleAlign());
        aCell1.setColumnsToSpan(2);

        aRow.add(aCell1);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(getRowLabelLeftFor(TITLE1_GENERAL), "100%", getTitleAlign());
        aCell1.setColumnsToSpan(2);

        aRow.add(aCell1);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(getRowLabelLeftFor(TITLE2), "300", "left");
        aCell2 = utilGetHtmlTableCell(fieldGet_2_SurvivalTime("2", defaultValue), "500", "left");
        aCell2.setVAlign("bottom");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(getRowLabelLeftFor(TITLE2_TITLE_GENERAL), "100%",
                getTitleAlign()
                );
        aCell1.setColumnsToSpan(2);

        aRow.add(aCell1);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(getRowLabelLeftFor(TITLE3), "300", "left");
        aCell2 = utilGetHtmlTableCell(fieldGet_3_IsotopeExcreted("3rb", defaultValue), "500", "left"
                );
        aCell2.setVAlign("bottom");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(getRowLabelLeftFor("If yes,explain. "), "300", "left");
File Line
edu/columbia/rascal/presentation/myRascal/views/MyRascalHtmlView.java 361
edu/columbia/rascal/presentation/user/views/CUInfoHtmlView.java 289
        setBgColor("#FFFFFF");
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  newValue  edu.columbia.rascal.presentation.presentation.tools.htmlGen.CUHtmlForm
     */
    @Override public void setForm(CUHtmlForm newValue) {
        this.form = newValue;
    }

    /**
     * @see  edu.columbia.rascal.presentation.common.views.CURascalHtmlView#setLineParameters(java.util.Hashtable)
     */
    @Override public void setLineParameters(Hashtable params) {

        // Save parameters passed through URL in hidden fields of the form. Names of all
        // parameters are lowercase
        Enumeration e = params.keys();

        while (e.hasMoreElements()) {
            String key = (String) e.nextElement();
            String value = (String) params.get(key);

            getForm().add(new CUHtmlHiddenField(key, value));
        }
    }

    /**
     * This method was created in VisualAge. Sets the mainTitle of this page. If aMainTitle is a
     * String, use the default mainTitle settings. if aMainTitle is CUHtmlText, override the default
     * mainTitle settings.
     *
     * @param  aMainTitle  TODO: DOCUMENT ME!
     */
    public void setMainTitle(Object aMainTitle) {

        if (aMainTitle instanceof CUHtmlText) {
            mainTitle = (CUHtmlText) aMainTitle;
        } else {

            if (aMainTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aMainTitle);
                aText.setFontSize("+2");
                aText.setIsBold(true);
                aText.setAlignment("left");
                aText.setFontName(getDefaultFontName());
                mainTitle = aText;

                // Set also the title of the page to same.
                setTitle((String) aMainTitle);
            }
        }
    }

    /**
     * This method was created in VisualAge. Sets the note of this page. If aNote is a String, use
     * the default note settings. if aNote is CUHtmlText, override the default note settings.
     *
     * @param  aMode  TODO: DOCUMENT ME!
     */
    public void setMode(String aMode) {
        mode = aMode;
    }

    /**
     * This method was created in VisualAge. Sets the note of this page. If aNote is a String, use
     * the default note settings. if aNote is CUHtmlText, override the default note settings.
     *
     * @param  aNote  TODO: DOCUMENT ME!
     */
    public void setNote(Object aNote) {

        if (aNote instanceof CUHtmlText) {
            note = (CUHtmlText) aNote;
        } else {

            if (aNote instanceof String) {
                CUHtmlMultiLineText aText = new CUHtmlMultiLineText((String) aNote);
                aText.setFontName(getDefaultFontName());
                aText.setMaxChar(600);
                aText.setIsBold(false);
                aText.setIsItalic(true);
                aText.addBreaks(3);
                note = aText;
            }
        }
    }

    /**
     * This method was created in VisualAge. Sets the subtitle of this page. If aSubTitle is a
     * String, use the default subtitle settings. if aSubTitle is CUHtmlText, override the default
     * title settings.
     *
     * @param  aSubTitle  TODO: DOCUMENT ME!
     */
    public void setSubTitle(Object aSubTitle) {

        if (aSubTitle instanceof CUHtmlText) {
            subTitle = (CUHtmlText) aSubTitle;
        } else {

            if (aSubTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aSubTitle);
                aText.setFontSize("+2");
                aText.setAlignment("center");
                aText.setFontName(getDefaultFontName());
                subTitle = aText;
            }
        }
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   req      TODO: DOCUMENT ME!
     * @param   parName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    protected String getRequestParameter(HttpServletRequest req, String parName) {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixDView.java 216
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 201
edu/columbia/rascal/presentation/user/views/RuHtmlView.java 160
    }

    /**
     * @see  edu.columbia.rascal.presentation.appendix.pages.AppendixHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = Integer.valueOf(currentDate.substring(0, 2));
        int dayIndex = Integer.valueOf(currentDate.substring(3, 5));
        int year = Integer.valueOf(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;
    }

    /**
     * @see  edu.columbia.rascal.presentation.appendix.pages.AppendixHtmlView#getDayWidget(java.lang.String, int)
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {
File Line
edu/columbia/rascal/presentation/irb/pages/HzAttestationCertifiedDataSheetView.java 152
edu/columbia/rascal/presentation/irb/pages/HzAttestationPDFTranslationView.java 168
    }

    /** TODO: DOCUMENT ME! */
    public void translateText() {
        addContent(" ", " ", theStyle);
        addContent(getFormObjectValue("line1"), "", theStyle);
        addContent(" ", " ", theStyle);
        addContent(getFormObjectValue("line2"), " ", theStyle);
        addContent(getFormObjectValue("line3"), " ", theStyle);
        addContent(" ", " ", theStyle);

        addContent(getFormObjectValue("line4"), " ", theStyle);
        addContent(getFormObjectValue("line5"), " ", theStyle);
        addContent(getFormObjectValue("line6"), " ", theStyle);
        addContent(getFormObjectValue("line7"), " ", theStyle);
        addContent(getFormObjectValue("line8"), " ", theStyle);
        addContent(" ", " ", theStyle);

        addContent(getFormObjectValue("line9"), " ", theStyle);
        addContent(getFormObjectValue("line10"), " ", theStyle);
        addContent(getFormObjectValue("line11"), " ", theStyle);
        addContent(getFormObjectValue("line12"), " ", theStyle);
        addContent(" ", " ", theStyle);

        addContent(getFormObjectValue("line13"), " ", theStyle);
        addContent(" ", " ", theStyle);

        addContent(getFormObjectValue("line14"), " ", theStyle);
        addContent(" ", " ", theStyle);

        addContent(getFormObjectValue("line15"), " ", theStyle);
        addContent(" ", " ", theStyle);

        addContent(getFormObjectValue("line16"), " ", theStyle);
        addContent(" ", " ", theStyle);
        addContent(getFormObjectValue("line17"), " ", theStyle);

        addContent(getFormObjectValue("line18"), " ", theStyle);

        addContent(" ", " ", theStyle);
        addContent(" ", " ", theStyle);
        addContent(getFormObjectValue("line19"), " ", theStyle);
        addContent(" ", " ", theStyle);
        addContent(getFormObjectValue("SignedLine"), " ", theStyle);
    }
}
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbReportApprovalStatusDateRangeServlet.java 46
edu/columbia/rascal/presentation/irb/servlets/IrbReportEventStatusDateRangeServlet.java 46
            return new IrbReportApprovalStatusDateRangeView(getUser());
        } catch (Exception e) {
            return new IrbMessageView("You are not authorized to view any proposals by department.");

        }
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     */
    @Override public void submit() {

        // pasting method
        String endDate = null;

        if (((endDate = getRequestParameter("endDate")) != null) && !endDate.trim().equals("")) {
            String range = getRequestParameter("range");
            Calendar startDay = CalendarTransformer.toCalendar(endDate);

            if (range.startsWith("Quarter")) {
                startDay.add(Calendar.MONTH, -3);
            } else if (range.startsWith("Month")) {
                startDay.add(Calendar.MONTH, -1);
            } else if (range.startsWith("Week")) {
                startDay.add(Calendar.DATE, -7);
            } else if (range.startsWith("Day")) {
                startDay.add(Calendar.DATE, -1);
            }

            startDay.setLenient(true); // fix for problem with 12/31/2000  (hh 7/10)

            String beginDate = CalendarTransformer.toString(startDay);
            Calendar oneMoreDay = CalendarTransformer.toCalendar(endDate);
            oneMoreDay.add(Calendar.DATE, 1); // add one more day to handle sybase date

            String endingDate = CalendarTransformer.toString(oneMoreDay);

            getSession().setAttribute("beginDate", beginDate);
            getSession().setAttribute("endDate", endingDate);
        }


        if (getRequestParameter("committeeList") != null) {
            String selectedCommittee = getRequestParameter("committeeList");
            getSession().setAttribute("selectedCommittee", selectedCommittee);
        }


        if (getRequestParameter("EventList") != null) {
            String EventList = getRequestParameter("EventList");
            getSession().setAttribute("EventList", EventList);
        }

        if (getRequest().getParameterValues("StatusList") != null) {
            getSession().setAttribute("StatusList",
                getListParms(getRequest().getParameterValues("StatusList"))
                );
        }

        redirectTo(IrbReportApprovalStatusServlet.class.getName());
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixReportProtocolHazMatView.java 724
edu/columbia/rascal/presentation/appendix/pages/AppendixReportPtHazMatView.java 696
        aTitle = getTableColumnName("Approval Date");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Appendix A
        aTitle = getTableColumnName("A");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Appendix B
        aTitle = getTableColumnName("B");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Appendix C
        aTitle = getTableColumnName("C");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Appendix D
        aTitle = getTableColumnName("D");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Appendix E
        aTitle = getTableColumnName("E");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Appendix F
        aTitle = getTableColumnName("F");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // Strong Radio Frequencies
        aTitle = getTableColumnName("R");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

        // X-Ray
        aTitle = getTableColumnName("O");
        header = aTable.getCell(0, cellNum);
        header.setIsHeader(true);
        header.add(aTitle);
        cellNum++;

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  newLocation  TODO: DOCUMENT ME!
     */
    public void setLocation(java.lang.String newLocation) {
        location = newLocation;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  newPrintable  TODO: DOCUMENT ME!
     */
    public void setPrintable(boolean newPrintable) {
        printable = newPrintable;
    }

    /**
     * setSortBy.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setSortBy(String aValue) {

        sortBy = aValue;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  newToDate  TODO: DOCUMENT ME!
     */
    public void setToDate(java.lang.String newToDate) {
        toDate = newToDate;
    }
}
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusDateRangeView.java 56
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusDateRangeView.java 57
        setSubTitle("IRB Approval Status Report");
        add(getSubTitle());
        setOnLoad("parent.frames[1].location='" + IrbReportLinkFrameServlet.class.getName() + "'");
        add(getHiddenWidgetFor("dateValid", "true"));
        addFields();
        render();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /** TODO: DOCUMENT ME! */
    public void addFields() {


        int numCells = 4;

        // Create the overall table for the page:
        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);

        // Add general fields:
        addGeneralRows(aTable, numCells);
        aTable.getCell(0, 0).setWidth("30%");

        aForm.add(aTable);
        aForm.add("<BR>");
        aForm.add(performMethod("getActionButtons", null));
        aForm.add("<BR>");

        CUHtmlTable anOutputTable = new CUHtmlTable();
        anOutputTable.setBorderWidth(0);

        Vector aRow = new Vector(2);

        aRow.addElement("");
        aRow.addElement("");
        anOutputTable.addRowFor(aRow);
        anOutputTable.getCell(0, 0).setWidth("5%");
        anOutputTable.getCell(0, 1).setWidth("95%");


        aForm.add(anOutputTable);
        aForm.add(getHiddenWidgetFor("dateValid", "true"));

        add(aForm);

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {

        String endDate = CalendarTransformer.toString(Calendar.getInstance());

        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        Object aWidget;

        aTable.setCellSpacing(15);


        aTable.addRowFor(columns);

        // event list
        aTable.getCell(row, 0).add(getRowLabelFor("Event :"));

        CUHtmlList eventList = new CUHtmlList(getEventList(), "EventList", "Protocol");
        aTable.getCell(row, 1).add(eventList);
        row++;

        // status list
        Vector selected = new Vector();
File Line
edu/columbia/rascal/presentation/appendix/jdbc/AppendixWorkListJdbcAccessor.java 43
edu/columbia/rascal/presentation/hipaa/jdbc/HipaaJdbcAccessor.java 43
        super();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   lastName   TODO: DOCUMENT ME!
     * @param   firstName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static String getFirstLastName(String lastName, String firstName) {

        String nameString;

        if (((lastName == null) || (lastName.trim().length() == 0)) &&
                ((firstName == null) || (firstName.trim().length() == 0))
        ) {
            nameString = "not specified";
        } else {
            nameString = (((firstName == null) || (firstName.trim().length() == 0)) ? "-"
                                                                                    : firstName) +
                " " + (((lastName == null) || (lastName.trim().length() == 0)) ? "-" : lastName);
        }

        return nameString;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   lastName   TODO: DOCUMENT ME!
     * @param   firstName  TODO: DOCUMENT ME!
     * @param   userId     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static String getFirstLastNameUni(String lastName, String firstName, String userId) {

        String nameString;

        if (((lastName == null) || (lastName.trim().length() == 0)) &&
                ((firstName == null) || (firstName.trim().length() == 0)) &&
                ((userId == null) || (userId.trim().length() == 0))
        ) {
            nameString = "not specified";
        } else {
            nameString = (((firstName == null) || (firstName.trim().length() == 0)) ? "-"
                                                                                    : firstName) +
                " " + (((lastName == null) || (lastName.trim().length() == 0)) ? "-" : lastName) +
                " (" + (((userId == null) || (userId.trim().length() == 0)) ? "-" : userId) + ")";
        }

        return nameString;
    }

    /**
     * The getInstance method comment.
     *
     * @return  AppendixWorkListJdbcAccessor
     */
    public static synchronized AppendixWorkListJdbcAccessor getInstance() {
File Line
edu/columbia/rascal/presentation/appendix/jdbc/AppendixWorkListJdbcAccessor.java 108
edu/columbia/rascal/presentation/hipaa/jdbc/HipaaJdbcAccessor.java 99
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   lastName   TODO: DOCUMENT ME!
     * @param   firstName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static String getLastFirstName(String lastName, String firstName) {

        String nameString;

        if (((lastName == null) || (lastName.trim().length() == 0)) &&
                ((firstName == null) || (firstName.trim().length() == 0))
        ) {
            nameString = "not specified";
        } else {
            nameString =
                (((lastName == null) || (lastName.trim().length() == 0)) ? "-" : lastName) + ", " +
                (((firstName == null) || (firstName.trim().length() == 0)) ? "-" : firstName);
        }

        return nameString;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   lastName   TODO: DOCUMENT ME!
     * @param   firstName  TODO: DOCUMENT ME!
     * @param   userId     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static String getLastFirstNameUni(String lastName, String firstName, String userId) {

        String nameString;

        if (((lastName == null) || (lastName.trim().length() == 0)) &&
                ((firstName == null) || (firstName.trim().length() == 0)) &&
                ((userId == null) || (userId.trim().length() == 0))
        ) {
            nameString = "not specified";
        } else {
            nameString =
                (((lastName == null) || (lastName.trim().length() == 0)) ? "-" : lastName) + ", " +
                (((firstName == null) || (firstName.trim().length() == 0)) ? "-" : firstName) +
                " (" + (((userId == null) || (userId.trim().length() == 0)) ? "-" : userId) + ")";
        }

        return nameString;
    }

    /**
     * Builds a row Hashtable with the SybResultSet.
     *
     * @param   resSet  com.sybase.jdbc.SybResultSet
     *
     * @return  java.util.Hashtable a row Hashtable
     */
    public java.util.Vector buildRowTableWithAccessSelectionListResultSet(java.sql.ResultSet resSet) {
File Line
edu/columbia/rascal/presentation/controller/pt/PtApprovalsController.java 228
edu/columbia/rascal/presentation/controller/pt/PtBudgetController.java 271
edu/columbia/rascal/presentation/controller/pt/PtGeneralInformationController.java 247
edu/columbia/rascal/presentation/controller/pt/PtProjectOfficerDataController.java 144
	}

	private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
		final Map<String, Object> recordHeading = new HashMap<String, Object>();

		// You are
		recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());

		if (proposal != null && proposal.getId() != null) {

			// Proposal TrakId
			recordHeading.put("trakId", "PT-" + proposal.getTrakId());
			// Deadline
			recordHeading.put("deadlineDate", proposal.getDeadlineDate());
			// Deadline Type
			recordHeading.put("deadlineType", proposal.getDeadlineType());
			// Date Created
			recordHeading.put("createDate", proposal.getCreationDate());

			// Sponsor
			final PtAgencyAddress ptAgencyAddress = ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);
			if (ptAgencyAddress != null) {
				recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());
			}

			// Logged in by SPA
			final List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(proposal,
					"Logged In");
			if (statuses != null && statuses.size() > 0) {
				recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());
			}

			RascalUser ru;

			// Initiator
			final PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);
			if (init != null) {
				ru = init.getRascalUser();
				if (ru != null) {
					recordHeading.put("initiator", ru.getUserFirstLastNameUni());
				}
			}

			// Principal Investigator
			final PtAccessControl pi = proposal.getLeadPerson();
			if (pi != null) {
				ru = pi.getRascalUser();
				if (ru != null) {
					recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
				}
			}

		} else {
			recordHeading.put("createDate", new Date());
			recordHeading.put("trakId", "PT-XXXX9999");
			recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
		}
		return recordHeading;
	}
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3074
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4250
        aBuffer.append("' and stat.parentObjectOid = header.oid and header.modificationNumber > 0 ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
                results.addElement(row.clone());
                row = new Vector(4);
            }

        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }


        return results;

    }

    /**
     * RASCAL (halayn) Creation date: (4/26/2002 12:53:52 PM)
     *
     * @param   committeeSqlString  TODO: DOCUMENT ME!
     *
     * @return  Vector of results
     */

    public static Vector getModificationsForChairQueue(String committeeSqlString) {
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaObjectHistoryView.java 283
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaProtocolEventBusinessView.java 199
            if (businessSize > 0) {
                getForm().add("<br>");
                getForm().add(getTableViewTitle("&nbsp;Old Business"));

                CUHtmlTable bTable = getTable(1, getColumns().size());

                bTable.setBorderWidth(1);
                bTable.setWidth("95%");
                bTable.setAlign("center");

                setBusinessMeetingHead(bTable);

                for (int k = 0; k < businessSize; k++) {
                    IrbAgendaEvent anEvent = ServiceLocator.getIrbAgendaEventService().findById(Long
                            .parseLong((String) ((Vector) oldBusiness.elementAt(k)).elementAt(0))
                            );
                    IrbMeetingAttributes anAttribute = anEvent.getIrbMeetingAttributes();
                    setBusinessMeetingTableDataRow(bTable, anEvent, anAttribute);

                }

                getForm().add(bTable);

            }

            if (newBusinessSize > 0) {
                getForm().add("<br>");
                getForm().add(getTableViewTitle("&nbsp;New Business"));

                CUHtmlTable cTable = getTable(1, getColumns().size());

                cTable.setBorderWidth(1);
                cTable.setWidth("95%");
                cTable.setAlign("center");

                setBusinessMeetingHead(cTable);

                for (int k = 0; k < newBusinessSize; k++) {
                    IrbAgendaEvent anEvent = ServiceLocator.getIrbAgendaEventService().findById(Long
                            .parseLong((String) ((Vector) newBusiness.elementAt(k)).elementAt(0))
                            );
                    IrbMeetingAttributes anAttribute = anEvent.getIrbMeetingAttributes();
                    setBusinessMeetingTableDataRow(cTable, anEvent, anAttribute);

                }

                getForm().add(cTable);

            }
        }


    }

    /**
     * Insert the method's description here. Creation date: (2/10/2003 12:07:30 PM)
     *
     * @return  java.util.Vector
     */
    public boolean canViewNotes() {

        return CURascalGuardian.hasIrbRascal() || CURascalGuardian.hasIrbCommitteeMember() || CURascalGuardian.hasIrbAdmin();

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public Vector getColumns() {

        String titles[] = { "Agenda Number", "Meeting Date", "Follow Up", "Notes", "Outcome" };
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportResearchSummaryServlet.java 83
edu/columbia/rascal/presentation/propTrak/servlets/PtReportResearchSummaryServlet.java 226
        Vector animalProtocolsYearlySummary = new Vector();

        // row - [academicYear, yearlyTotalNumberOfProposals]
        Vector row = new Vector(2);


        int curYearTotalNumberOfProtocols = 0;

        String trakId = "";

        Date dateTimeInForApproved = null;

        String curAcademicYearBeginMonthDayYear = "07/01/1900";
        String curAcademicYearEndMonthDayYear = "06/30/1901";
        String curYearEndMonthDayYear = "12/31/1900";

        String academicYearBeginMonthDay = "07/01";
        String academicYearEndMonthDay = "06/30";
        String yearEndMonthDay = "12/31";

        String strDateTimeInForApproved = "00/00/0000";
        Calendar calDateTimeInForApproved = null;
        int firstSemesterYear = 0;
        int secondSemesterYear = 0;
        int curMonth = 0;

        Enumeration protocolsEnum = protocolsHistory.elements();
        Vector protocolData = null;
        boolean isFirstProtocolData = true;

        while (protocolsEnum.hasMoreElements()) {

            // protocolData is a protocolsHistory row of the form:
            // [ protocolNumberYrMod, oid, approvalDate, effectiveDate, expiryDate, P.I. ]
            protocolData = (Vector) protocolsEnum.nextElement();

            // dateTimeIn for "Approved"
            dateTimeInForApproved = (Date) protocolData.elementAt(2);

            // curMonthDayYearStr -  "MM/DD/YYYY"
            strDateTimeInForApproved = CalendarTransformer.toString(dateTimeInForApproved);
            calDateTimeInForApproved = CalendarTransformer.toCalendar(strDateTimeInForApproved);

            if (isFirstProtocolData) { // get(Calendar.MONTH) returns the month represented by
                                       // this date (between 0 and 11) - with the value 0
                                       // representing January
                curMonth = calDateTimeInForApproved.get(Calendar.MONTH) + 1;

                if (curMonth > 6) {
                    firstSemesterYear = calDateTimeInForApproved.get(Calendar.YEAR);
                    secondSemesterYear = firstSemesterYear + 1;
                } else {
                    secondSemesterYear = calDateTimeInForApproved.get(Calendar.YEAR);
                    firstSemesterYear = secondSemesterYear - 1;
                }

                // Initialize curAcademicYearBeginMonthDayYear and curAcademicYearEndMonthDayYear
                curAcademicYearBeginMonthDayYear = academicYearBeginMonthDay + "/" +
                    firstSemesterYear;
                curAcademicYearEndMonthDayYear = academicYearEndMonthDay + "/" + secondSemesterYear;

                isFirstProtocolData = false;
            }

            // if the result is sorted by dateTimeIn asc, then  use the following condition:
            // if (isBefore(strDateTimeInForLoggedOut, curAcademicYearEndMonthDayYear))
            // if the result is sorted by dateTimeIn desc, then use the following condition:
            if (!isBefore(strDateTimeInForApproved, curAcademicYearBeginMonthDayYear)) { // The academic year of a proposal is same as the previous one.

                // Update curYearTotalAmountOfProposals and curYearTotalNumberOfProposals

                curYearTotalNumberOfProtocols = curYearTotalNumberOfProtocols + 1;
            } else { // The academic year of a proposal is not same as the previous one.

                // Update row
                row.addElement(firstSemesterYear + " - " + secondSemesterYear);
                row.addElement(Integer.toString(curYearTotalNumberOfProtocols));


                // Re-initialize curAcademicYearBeginMonthDayYear and curAcademicYearEndMonthDayYear
                // get(Calendar.MONTH) returns the month represented by this date (between 0 and 11)
                // - with the value 0 representing January
                curMonth = calDateTimeInForApproved.get(Calendar.MONTH) + 1;

                if (curMonth > 6) {
                    firstSemesterYear = calDateTimeInForApproved.get(Calendar.YEAR);
                    secondSemesterYear = firstSemesterYear + 1;
                } else {
                    secondSemesterYear = calDateTimeInForApproved.get(Calendar.YEAR);
                    firstSemesterYear = secondSemesterYear - 1;
                }

                curAcademicYearBeginMonthDayYear = academicYearBeginMonthDay + "/" +
                    firstSemesterYear;
                curAcademicYearEndMonthDayYear = academicYearEndMonthDay + "/" + secondSemesterYear;

                // Re-initialize curYearTotalNumberOfProtocols

                curYearTotalNumberOfProtocols = 1;
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentProtocolResultsDisplayView.java 361
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderResultsDisplayView.java 349
            next.setLink(ConsentProtocolSearchPageServlet.class.getName() +
                "?DisplayPage=NextPage"
                );
            next.setIsBold(true);
            next.setFontSize("1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }

    /**
     * @see  edu.columbia.rascal.presentation.consent.pages.ConsentHtmlView#getBooleanWidgetFor(java.lang.String, boolean)
     */
    @Override public Object getBooleanWidgetFor(String aName, boolean aValue) {


        CUHtmlCheckBox cb = new CUHtmlCheckBox(aName, aName, aValue);

        return cb;
    }
}
File Line
edu/columbia/rascal/presentation/controller/pt/PtHistoryController.java 170
edu/columbia/rascal/presentation/controller/pt/PtTrackingStatusController.java 131
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   proposal     TODO: DOCUMENT ME!
     * @param   currentUser  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
        Map<String, Object> recordHeading = new HashMap<String, Object>();

        // You are
        recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());

        if ((proposal != null) && (proposal.getId() != null)) { // Proposal TrakId
            recordHeading.put("trakId", "PT-" + proposal.getTrakId());

            // Deadline
            recordHeading.put("deadlineDate", proposal.getDeadlineDate());

            // Deadline Type
            recordHeading.put("deadlineType", proposal.getDeadlineType());

            // Date Created
            recordHeading.put("createDate", proposal.getCreationDate());

            // Sponsor
            PtAgencyAddress ptAgencyAddress =
                ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);

            if (ptAgencyAddress != null)
                recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());

            // Logged in by SPA
            List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(
                    proposal, "Logged In"
                    );

            if ((statuses != null) && (statuses.size() > 0))
                recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());

            RascalUser ru;

            // Initiator
            PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);

            if (init != null) {
                ru = init.getRascalUser();

                if (ru != null) recordHeading.put("initiator", ru.getUserFirstLastNameUni());
            }

            // Principal Investigator
            PtAccessControl pi = proposal.getLeadPerson();

            if (pi != null) {
                ru = pi.getRascalUser();

                if (ru != null) recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
            }

        } else {
            recordHeading.put("createDate", new Date());
            recordHeading.put("trakId", "PT-XXXX9999");
            recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
        }

        return recordHeading;
    }

}
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 436
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 527
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 618
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 713
    public static Vector buildCTSAApprovalResults(java.sql.ResultSet res, String name, Vector v) {
        Hashtable row = new Hashtable();
        int modify = 0;

        try {

            if (isProtocol(name)) {

                while (res.next()) {
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()
                        );                                      // protocol oid
                    modify = res.getInt(4);
                    row.put("ProtocolNumber",
                        res.getString(2) + " (Y" + res.getInt(3) + " M" +
                        ((modify < 10) ? ("0" + (Integer.valueOf(modify)).toString())
                                       : (Integer.valueOf(modify)).toString()) + ")"
                        );                                      // protocol number
                    row.put("EventName", name);
                    row.put("Title", res.getString(6));         // title
                    row.put("PI", res.getString(5));            // PI
                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()
                        );                                      // event oid
                    row.put("StatusName", res.getString(8));
                    row.put("ApprovalOid",
                        Integer.valueOf((new Float(res.getFloat(9))).intValue()).toString()
                        );                                      // approvalOid
                    row.put("ApprovalCode", res.getString(10)); // approval code

                    if (res.getDate(11) == null) {
                        row.put("StatusDate", "");
                    } else {
                        row.put("StatusDate", CalendarTransformer.formatMMDDYYYY(res.getDate(11)));
                    }
File Line
edu/columbia/rascal/presentation/controller/pt/PtHistoryController.java 170
edu/columbia/rascal/presentation/controller/pt/PtSpaceController.java 419
edu/columbia/rascal/presentation/controller/pt/PtTrackingStatusController.java 131
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   proposal     TODO: DOCUMENT ME!
     * @param   currentUser  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
        Map<String, Object> recordHeading = new HashMap<String, Object>();

        // You are
        recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());

        if ((proposal != null) && (proposal.getId() != null)) { // Proposal TrakId
            recordHeading.put("trakId", "PT-" + proposal.getTrakId());

            // Deadline
            recordHeading.put("deadlineDate", proposal.getDeadlineDate());

            // Deadline Type
            recordHeading.put("deadlineType", proposal.getDeadlineType());

            // Date Created
            recordHeading.put("createDate", proposal.getCreationDate());

            // Sponsor
            PtAgencyAddress ptAgencyAddress =
                ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);

            if (ptAgencyAddress != null)
                recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());

            // Logged in by SPA
            List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(
                    proposal, "Logged In"
                    );

            if ((statuses != null) && (statuses.size() > 0))
                recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());

            RascalUser ru;

            // Initiator
            PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);

            if (init != null) {
                ru = init.getRascalUser();

                if (ru != null) recordHeading.put("initiator", ru.getUserFirstLastNameUni());
            }

            // Principal Investigator
            PtAccessControl pi = proposal.getLeadPerson();

            if (pi != null) {
                ru = pi.getRascalUser();

                if (ru != null) recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
            }

        } else {
            recordHeading.put("createDate", new Date());
            recordHeading.put("trakId", "PT-XXXX9999");
            recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
        }

        return recordHeading;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixDSafetyOfficerApprovalView.java 174
edu/columbia/rascal/presentation/appendix/pages/AppendixISafetyOfficerApprovalView.java 140
        AppendixApproval biosafetyApproval = getApproval(SAFETY_OFFICE_TYPE, getTracker());
        int approver = 0;
        Date approvalDate = null;

        if (biosafetyApproval != null) {
            approver = ((biosafetyApproval.getApproverRid() == null)
                    ? 0 : biosafetyApproval.getApproverRid().intValue());
        }

        approvalDate =
            ((approver == 0) || (biosafetyApproval.getApprovalType() == null) ||
                biosafetyApproval.getApprovalType().equals(HOLD))
            ? null : biosafetyApproval.getApprovalDate();

        // Biosafety Officer
        aRow = new CUHtmlTableRow();

        String name = "<i>approval not yet obtained</i>";

        if (approver > 0)
            name = ServiceLocator.getRascalUserService().findById(approver)
                .getUserFirstLastNameUni();

        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(
                    "<b>" + APPROVAL_SAFETY_OFFICER + "</b>"
                    ), "300", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + name + "</b>", "500", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Biosafety approval date
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText("<b>" + APPROVAL_DATE + "</b>"), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("<b>" + (CalendarTransformer.formatMMDDYYYY(approvalDate)) +
                "</b>", "500", "left"
                );

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        // Owner's Number (Protocol Number, Proposal TrakId)
        String ownerNumberLabel =
            (getOwnerSurrogate().getOwnerType().equals(PROPOSAL_TRACKING_OWNER)) ? PROPOSAL_TRAK_ID
                                                                                 : PROTOCOL_NUMBER;

        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetDefaultHtmlText(ownerNumberLabel), "300",
                getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell(getOwnerSurrogate().getOwnerNumber(), "500", "left");
        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixDView.java 216
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 201
edu/columbia/rascal/presentation/tc/views/TCReportSelectFieldsView.java 291
edu/columbia/rascal/presentation/user/views/RuHtmlView.java 160
    }

    /**
     * @see  edu.columbia.rascal.presentation.appendix.pages.AppendixHtmlView#getDateTable(java.lang.String,java.lang.String,
     *       java.lang.String, java.lang.String, java.lang.String)
     */
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = Integer.valueOf(currentDate.substring(0, 2));
        int dayIndex = Integer.valueOf(currentDate.substring(3, 5));
        int year = Integer.valueOf(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;
    }
File Line
edu/columbia/rascal/presentation/common/views/CURascalHtmlView.java 479
edu/columbia/rascal/presentation/tc/views/TCReportSelectFieldsView.java 297
    public CUHtmlTable getDateTable(String currentDate, String dateFieldName, String monthFieldName,
        String dayFieldName, String yearFieldName
        ) {

        int monthIndex = Integer.valueOf(currentDate.substring(0, 2));
        int dayIndex = Integer.valueOf(currentDate.substring(3, 5));
        int year = Integer.valueOf(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName,
                monthIndex
                );
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   fieldName  TODO: DOCUMENT ME!
     * @param   dayIndex   TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getDayWidget(String fieldName, int dayIndex) {
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportResearchSummaryServlet.java 1704
edu/columbia/rascal/presentation/propTrak/servlets/PtReportResearchSummaryServlet.java 1789
            ResultSet res = acc.executeQuery(getQueryHumanProtocolHistoryByDept(deptCode, from, to));

            while (res.next()) {                   // protocolNumber
                protocolNumber = res.getString(1); // returns int or 0 if SQL NULL

                // protocolYear
                protYear = res.getString(2);

                if ((protYear == null) || protYear.trim().equals("")) protYear = "1";

                // modificationNumber
                modNum = res.getString(3);

                if ((modNum == null) || modNum.trim().equals("")) {
                    modNum = "00";
                } else if (modNum.trim().length() == 1) {
                    modNum = "0" + modNum;
                }

                // protocolNumberYrMod = "IRB-" + protocolNumber+"(Y"+protYear+" M"+modNum+")";
                protocolNumberYrMod = protocolNumber + "(Y" + protYear + " M" + modNum + ")";
                row.addElement(protocolNumberYrMod);

                // oid of a IrbProtocolHeader
                row.addElement(Long.toString(res.getLong(4)));

                // dateApproved
                if (res.getDate(5) == null) {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(5));
                }

                // effectiveDate
                if (res.getDate(6) == null) {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(6));
                }

                // expirationDate
                // Add a Date instead of a String to be sorted.
                if (res.getDate(7) == null) {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(7));
                }

                // P.I. - lastName, firstName (uni)
                row.addElement(buildLastFirstName(res.getString(8), res.getString(9)) + " (" +
                    res.getString(10) + ")"
                    );

                results.addElement(row.clone());
                row = new Vector(6);
            } // end while
        } catch (Exception e) {
            log.error(e);
        }

        return results;

    }

    /**
     * getSelectedDataHumanProtocolsHistoryByUni.
     *
     * @param   uni   String
     * @param   from  String
     * @param   to    String
     *
     * @return  Vector
     */
    public Vector getSelectedDataHumanProtocolsHistoryByUni(String uni, String from, String to) {
File Line
edu/columbia/rascal/presentation/user/views/RuICMExperimentalSurgeryTrainingAdminView.java 73
edu/columbia/rascal/presentation/user/views/RuOccupationalHealthProgramAdminView.java 71
edu/columbia/rascal/presentation/user/views/RuRadiationSafetyBadgeAdminView.java 70
                    RuICMExperimentalSurgeryTrainingAdminServlet.class.getName(), "POST"
                    )
                );
            render();
        }
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  numbCells  TODO: DOCUMENT ME!
     */
    public void addAdminControlRows(CUHtmlTable aTable, int numbCells) {

        Vector<Object> columns = new Vector<Object>(numbCells);

        for (int c = 0; c < numbCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        CUHtmlEntryField aWidget;

        // rascal UNI
        if (getModify() != null)
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", getModify().getUserId());
        else
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", "");

        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Enter UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for UNI Lookup

        columns.setElementAt(getUniLookup(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Lookup UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a button to the search servlet
        CUHtmlInput i2 = new CUHtmlInput();
        i2.setName("Find Certification");
        i2.setInputType("image");
        i2.setImageSource("/images/popup.gif");
        columns.setElementAt(i2.getHtmlTagLine(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Find Certification"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for data entry
        CUHtmlImage i3 = new CUHtmlImage("/images/popup.gif");
        i3.setAlt("Add Certification");
        i3.setLink(RuICMExperimentalSurgeryTrainingAdminServlet.class.getName());
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixDView.java 222
edu/columbia/rascal/presentation/common/views/CURascalHtmlView.java 479
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 207
edu/columbia/rascal/presentation/user/views/RuHtmlView.java 166
    @Override public CUHtmlTable getDateTable(String currentDate, String dateFieldName,
        String monthFieldName, String dayFieldName, String yearFieldName
        ) {

        int monthIndex = Integer.valueOf(currentDate.substring(0, 2));
        int dayIndex = Integer.valueOf(currentDate.substring(3, 5));
        int year = Integer.valueOf(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;
    }
File Line
edu/columbia/rascal/presentation/controller/irb/IrbClosureFileUploadController.java 209
edu/columbia/rascal/presentation/controller/irb/IrbClosureFileUploadInternalController.java 211
    public ModelAndView handleRequest(@RequestParam long anOid, HttpServletRequest request,
        HttpServletResponse response
        ) throws Exception {

        IrbClosureAttachment attachment = ServiceLocator.getIrbClosureAttachmentService()
            .findById(anOid);

        if (attachment != null) {
            IrbClosure currentIph = attachment.getIrbClosure();

            if (CURascalGuardian.hasIrbRascal() ||
                    ServiceLocator.getIrbClosureService().getAccessibleByUser(
                        getRascalUser(),
                        currentIph
                        )
            ) {
                InputStream content = attachment.getBlob().getBinaryStream();
                response.setContentType(attachment.getContentType());
                response.setHeader("Content-Disposition",
                    "attachment; filename=\"" + attachment.getFileName() + "\""
                    );

                FileCopyUtils.copy(content, response.getOutputStream());
                response.getOutputStream().flush();
                response.getOutputStream().close();

                return null;
            }
        }


        return new ModelAndView("uploadFailure");

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  dataBinder  TODO: DOCUMENT ME!
     */
    @InitBinder("attachment")
    public void initBinder(ServletRequestDataBinder dataBinder) {
        dataBinder.setAllowedFields(
                "oid", "documentIdentifier", "dateCreated", "fileName");
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   t  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    @ExceptionHandler(ResourceNotFoundException.class)
    public String notFoundException(Throwable t) {
        return "updateFailed";
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   attachment  TODO: DOCUMENT ME!
     * @param   result      TODO: DOCUMENT ME!
     * @param   model       TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     *
     * @throws  IOException  TODO: DOCUMENT ME!
     */
    @RequestMapping(
        value = "edit",
        method = RequestMethod.PUT
    )
    public String update(@ModelAttribute("attachment")
        @Valid IrbClosureAttachment attachment, BindingResult result, ModelMap model,@RequestParam("id") Long id
        ) {

        if (result.hasErrors()) {
            model.addAttribute("attachment", attachment);

            return "irb/closure/attachment/update";
        }

        if (log.isDebugEnabled()) log.debug("get post here!" + attachment.getDocumentIdentifier());

        IrbClosureAttachment att = ServiceLocator.getIrbClosureAttachmentService().findById(id);
        att.setDocumentIdentifier(attachment.getDocumentIdentifier());
        ServiceLocator.getIrbClosureAttachmentService().save(att);
        model.addAttribute("attachment", att);

        return "windowCloser";
    }

}
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 472
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 563
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 658
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 752
                    v.addElement(row);
                    row = new Hashtable();

                } // end while
            } else {

                while (res.next()) {
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()
                        );                                                                // protocol oid
                    row.put("ProtocolNumber", res.getString(2));
                    row.put("EventName", name);
                    row.put("Title", (res.getString(4) == null) ? "" : res.getString(4)); // title
                    row.put("PI", res.getString(3));                                      // PI
                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(5))).intValue()).toString()
                        );                                                                // event oid
                    row.put("StatusName", res.getString(6));
                    row.put("ApprovalOid",
                        Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()
                        );                                                                // ApprovalOid
                    row.put("ApprovalCode", res.getString(8));                            // approval code

                    if (res.getDate(9) == null) {
                        row.put("StatusDate", "");
                    } else {

                        if (name.equals("AdverseEvent"))
                            row.put("StatusDate", res.getString(9));
                        else
                            row.put("StatusDate", CalendarTransformer.formatMMDDYYYY(res.getDate(9))
                                );
                    }

                    v.addElement(row);
                    row = new Hashtable();

                } // end while
            }
        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return v;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   res   TODO: DOCUMENT ME!
     * @param   name  TODO: DOCUMENT ME!
     * @param   v     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static Vector buildCTSAApprovedResults(java.sql.ResultSet res, String name, Vector v) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbUnanticipatedAttachmentExternalView.java 251
edu/columbia/rascal/presentation/irb/pages/IrbUnanticipatedAttachmentView.java 242
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString    is the ProtocolNumber
     * @param   aLocation  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getLinkWidgetFor(String aString, String aLocation) {


        if ((aString == null) || aString.equals("")) {
            return new CUHtmlText("");
        }

        CUHtmlText text = new CUHtmlText(aString);
        text.setLink("'" + aLocation + "'");
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        return text;
    }

    /** @see  edu.columbia.rascal.presentation.irb.pages.IrbHtmlView#getProtocolGeneralHeaderHtml() */
    @Override public String getProtocolGeneralHeaderHtml() {

        String s = "";
        String blank = "<img src=\"/images/blank.gif\" border=\"0\">";
        IrbProtocolHeader ph = getProtocol().getLastProtocolHeader();
        setProtocolHeader(ph);

// String department = (getProtocolHeader().getOriginatingDepartment().trim().equals("") ? blank :
// getProtocolHeader().getOriginatingDepartment());

        String departmentCode = (getProtocolHeader().getOriginatingDepartment().trim().equals("")
                ? blank : getProtocolHeader().getOriginatingDepartment());
        String department = "";

        if (!departmentCode.equals(blank))
            department = ServiceLocator.getRascalDepartmentService().findById(departmentCode)
                .getName() + "&nbsp" + "(" + departmentCode + ")";
        else
            department = blank;

        add(getSubTitle());
        s += "<table width=\"100%\" border=\"1\" bgcolor=\"#CCCCCC\">";
        s += "<tr> ";
        s += "<td colspan=\"2\"> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Protocol Number</font> </div>";
        s += "</td> <td colspan=\"2\"> <font face=\"Comic Sans MS\" size=\"1\"> ";
        s += getPrefix() +
            ((getProtocolHeader().getIrbProtocol().getProtocolNumber() == null)
                ? "" : getProtocolHeader().getIrbProtocol().getProtocolNumber());
        s += "</font></td> </tr> <tr> <td width=\"25%\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">You are</font></div>";
        s += "</td> <td><font face=\"Comic Sans MS\" size=\"1\">";
        s += getRascalUser().getUserFirstLastNameUni();
        s += "</font></td> <td width=\"25%\"> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Department</font></div>";
        s += "</td> <td width=\"25%\"> <font face=\"Comic Sans MS\" size=\"1\"> ";
        s += department + "</font></td> </tr> <tr> <td> ";
        s +=
            "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Principal Investigator</font></div></td><td>";
        s +=
            (((CUHtmlItem) getWidgetFor(
                        ServiceLocator.getIrbProtocolHeaderService().getParticipantString(
                            "Principal Investigator", getProtocolHeader()
                            )
                        )).getHtml());
        s += "</td> <td> ";
        s += "<div align=\"right\"><font face=\"Comic Sans MS\" size=\"1\">Initiator</font></div>";
        s += "</td> <td>";

        if ((getUnanticipatedProblem() != null) && (getUnanticipatedProblem().getCreatedBy() != 0)
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtPHS2590Servlet.java 74
edu/columbia/rascal/presentation/propTrak/servlets/PtPHS398Servlet.java 75
    public PtPHS2590Servlet() {
        bigFacelessLicenceKey();
        java.lang.System.setProperty(
            "org.faceless.pdf.warning.UnknownCharacter", "OFF"
            );
    }

    //~ Methods ------------------------------------------------------------------------------------

    /** TODO: DOCUMENT ME! */
    public void bigFacelessLicenceKey() {

        // set the LicenseKey for the Big Faceless API
        PDF.setLicenseKey(CURascalPDFConstants.RASCALPDFKEY);
    }

    /**
     * used by PHS398 and PHS2590 the ending new line character will not be displayed change them to
     * be the " "
     *
     * @param   aString  todo: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     *
     * @author  Frances Wang
     */
    public String changeEndingNewLineCharToSpace(String aString) {

        if (aString != null) {
            char charArray[] = aString.toCharArray();
            int intCharArrayLength = charArray.length;
            int intCharCode = 0;

            for (int i = intCharArrayLength - 1; i >= 0; i--) {
                intCharCode = charArray[i];

                if ((intCharCode == 13) || (intCharCode == 10)) {
                    charArray[i] = 32;
                } else {
                    break;
                }
            }

            return new String(charArray);
        } else {
            return "";
        }
    }

    /**
     * @see  edu.columbia.rascal.presentation.propTrak.servlets.PtAbstractServlet#doGet(javax.servlet.http.HttpServletRequest,
     *       javax.servlet.http.HttpServletResponse)
     */
    @Override public void doGet(HttpServletRequest req, HttpServletResponse res) {

        try {
            setRequest(req);
            setResponse(res);
            setRedirectUrl(null);

            getLineParameters().clear();
            setLineParameters(req.getQueryString());

            nullify();
            initializeObjects();
            constructPDFForm();
            renderPDF();

        } catch (Exception e) {
            log.error(e);
            (new CURascalErrorMessageView(e, "doGet() " + getClassName())).draw(
                getResponse()
                );
        }
    }

    /** @see  edu.columbia.rascal.presentation.propTrak.servlets.PtAbstractServlet#getPage() */
    @Override public PtHtmlView getPage() {
        return null;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   value  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    private String checkFieldLimit(String value) {

        if (value.length() > 55) {
            String newValue = value.substring(0, 50);

            return newValue;
        }

        return value;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @throws  IOException  TODO: DOCUMENT ME!
     */
    private void constructPDFForm() throws IOException {

        try {

            PDFStyle fontStyle = new PDFStyle();

            fontStyle.setFont(new StandardFont(StandardFont.HELVETICA), 8);
            localPDFObject.getPage(0).setStyle(fontStyle);
File Line
edu/columbia/rascal/presentation/agenda/jdbc/IrbAgendaReportQuery.java 247
edu/columbia/rascal/presentation/agenda/jdbc/IrbAgendaReportQuery.java 329
                java.sql.ResultSet res = ServiceLocator.getCURascalJdbcAccessorService()
                    .executeQuery(getAgendaInfoForSql(event));

                while (res.next()) {
                    row.put("AgendaOid",
                        (((Integer.valueOf((new Float(res.getFloat(1))).intValue())) == null)
                            ? ""
                            : Integer.valueOf((new Float(res.getFloat(1))).intValue())
                                .toString())
                        ); // agendaoid
                    row.put("AgendaNumber", (res.getString(2) == null) ? "" : res.getString(2));

                    if (res.getDate(3) == null) // date
                    {
                        row.put("MeetingDate", "");
                    } else {
                        row.put("MeetingDate", res.getDate(3));
                    }

                    row.put("EventType", (res.getString(4) == null) ? "" : res.getString(4));
                    row.put("EventTitle", (res.getString(5) == null) ? "" : res.getString(5));
                    row.put("EventAbstract", (res.getString(6) == null) ? "" : res.getString(6));
                    row.put("RecommendedStatus", (res.getString(7) == null) ? ""
                                                                            : res.getString(7)
                        );
                    row.put("RecommendationText", (res.getString(8) == null) ? ""
                                                                             : res.getString(8)
                        );
                    row.put("FollowUp", (res.getString(9) == null) ? "" : res.getString(9));
File Line
edu/columbia/rascal/presentation/controller/pt/PtAttachmentsController.java 293
edu/columbia/rascal/presentation/controller/pt/PtChangeProjectOfficerController.java 127
edu/columbia/rascal/presentation/controller/pt/PtComplianceController.java 575
edu/columbia/rascal/presentation/controller/pt/PtHazMatsController.java 552
edu/columbia/rascal/presentation/controller/pt/PtNotesController.java 126
edu/columbia/rascal/presentation/controller/pt/PtPersonnelController.java 494
edu/columbia/rascal/presentation/controller/pt/PtPrintMenuController.java 84
edu/columbia/rascal/presentation/controller/pt/PtSponsorController.java 129
    }

    private Map<String, Object> recordHeading(PtProposalHeader proposal, RascalUser currentUser) {
    	Map<String, Object> recordHeading = new HashMap<String, Object>();
    	
    	//You are
    	recordHeading.put("currentUser", currentUser.getUserFirstLastNameUni());
    	
    	if (proposal != null && proposal.getId() != null) {
    		
        	//Proposal TrakId
    		recordHeading.put("trakId", "PT-" + proposal.getTrakId());
	    	//Deadline
	    	recordHeading.put("deadlineDate", proposal.getDeadlineDate());
	    	//Deadline Type
	    	recordHeading.put("deadlineType", proposal.getDeadlineType());
	    	//Date Created
	    	recordHeading.put("createDate", proposal.getCreationDate());

	    	//Sponsor
	    	PtAgencyAddress ptAgencyAddress = ptAgencyAddressService.getLastAgencyAddressForPtProposalHeader(proposal);
	    	if (ptAgencyAddress != null) recordHeading.put("sponsor", ptAgencyAddress.getAgencyName());
	    	
	    	//Logged in by SPA
	    	List<PtTracking> statuses = ptTrackingService.findByPtProposalHeaderAndTrackingLocation(proposal, "Logged In");
	    	if (statuses != null && statuses.size() > 0) recordHeading.put("loginDate", statuses.get(0).getDateTimeIn());
	    	
	    	RascalUser ru;
	    	
	    	//Initiator
	    	PtAccessControl init = ptAccessControlService.getInitiatorForProposal(proposal);
	    	if (init != null) {
	    		ru = init.getRascalUser();
	    		if (ru != null) recordHeading.put("initiator", ru.getUserFirstLastNameUni());
	    	}
	    	
	    	//Principal Investigator
	    	PtAccessControl pi = proposal.getLeadPerson();
	    	if (pi != null) {
	    		ru = pi.getRascalUser();
	    		if (ru != null) recordHeading.put("leadInvestigator", ru.getUserFirstLastNameUni());
	    	}
	    	
	    } else {
	    	recordHeading.put("createDate", new Date());
	    	recordHeading.put("trakId", "PT-XXXX9999");
	    	recordHeading.put("initiator", currentUser.getUserFirstLastNameUni());
	    }
    	return recordHeading;
    }
    
    private String checkApprovers(PtProposalHeader proposal) {
File Line
edu/columbia/rascal/presentation/hipaa/servlets/HipaaAbstractServlet.java 155
edu/columbia/rascal/presentation/lab/servlets/HzAbstractServlet.java 162
                super.redirectTo(getRedirectUrl());
            }
        } catch (Exception e) {
            ts.setRollbackOnly();
            log.error("Got Exception", e);
            (new CURascalErrorMessageView(e, "Exception " + getClassName())).draw(getResponse());
        } finally {

            if (!ts.isCompleted()) {

                if (ts.isRollbackOnly()) {
                    log.info("transaction is marked for rollback");
                    tm.rollback(ts);
                } else
                    tm.commit(ts);
            } else {
                log.error("transaction has already completed.");
            }
        }
    }

    /**
     * This method was created in VisualAge. @2003 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * <p>Override the doPost in CURascalVAPServlet and CURascalServlet.</p>
     *
     * <p>hh 5/19/03</p>
     *
     * @param  req  TODO: DOCUMENT ME!
     * @param  res  TODO: DOCUMENT ME!
     */
    @Override public void doPost(HttpServletRequest req, HttpServletResponse res) {

        setRequest(req);
        setResponse(res);
        setRedirectUrl(null);

        getLineParameters().clear();
        setLineParameters(req.getQueryString());

        WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(this
                .getServletContext()
                );
        PlatformTransactionManager tm = (PlatformTransactionManager) ctx.getBean(
                "transactionManager"
                );
        TransactionStatus ts = tm.getTransaction(
                new DefaultTransactionDefinition()
                );

        try {

            if (validatePost()) {
                submit();
            } else {
                ts.setRollbackOnly();
            }

            if (getRedirectUrl() != null) {
                super.redirectTo(getRedirectUrl());
            }
        } catch (Exception e) {
            ts.setRollbackOnly();
            log.error("Got Exception", e);
            (new CURascalErrorMessageView(e, "Exception " + getClassName())).draw(getResponse());
        } finally {

            if (!ts.isCompleted()) {

                if (ts.isRollbackOnly()) {
                    log.info("transaction is marked for rollback");
                    tm.rollback(ts);
                } else
                    tm.commit(ts);
            } else {
                log.error("transaction has already completed.");
            }
        }
    }

    /**
     * Insert the method's description here. Creation date: (6/30/2003 10:26:12 AM)
     *
     * @return  insert the method's description here.
     */
    public HipaaForm getHipaaForm() {
File Line
edu/columbia/rascal/presentation/user/views/RuICMExperimentalSurgeryTrainingAdminView.java 73
edu/columbia/rascal/presentation/user/views/RuSimpleTrainingEnrollmentAdminView.java 80
                    RuICMExperimentalSurgeryTrainingAdminServlet.class.getName(), "POST"
                    )
                );
            render();
        }
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable     TODO: DOCUMENT ME!
     * @param  numbCells  TODO: DOCUMENT ME!
     */
    public void addAdminControlRows(CUHtmlTable aTable, int numbCells) {

        Vector<Object> columns = new Vector<Object>(numbCells);

        for (int c = 0; c < numbCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        CUHtmlEntryField aWidget;

        // rascal UNI
        if (getModify() != null)
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", getModify().getUserId());
        else
            aWidget = new CUHtmlEntryField(KEY_RASCAL_UNI, "15", "15", "");

        columns.setElementAt(aWidget, 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Enter UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        aTable.getCell(row, 2).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for UNI Lookup

        columns.setElementAt(getUniLookup(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Lookup UNI"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a button to the search servlet
        CUHtmlInput i2 = new CUHtmlInput();
        i2.setName("Find Certification");
        i2.setInputType("image");
        i2.setImageSource("/images/popup.gif");
        columns.setElementAt(i2.getHtmlTagLine(), 2);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Find Certification"));
        aTable.getCell(row, 0).setColumnsToSpan(2);
        row++;

        // a link to the pop up window for data entry
        CUHtmlImage i3 = new CUHtmlImage("/images/popup.gif");
        i3.setAlt("Add Certification");
        i3.setLink(RuICMExperimentalSurgeryTrainingAdminServlet.class.getName());
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 1121
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5249
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5917
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("') and f.whoRid =");
        aBuffer.append(whoAmI.getId());
        aBuffer.append(" and f.type = '");
        aBuffer.append(reviewerType);
        aBuffer.append("' order by a.protocolNumber");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                row.addElement(res.getString(2));                                                    // protocol number
                row.addElement(res.getString(3));                                                    // identifier

                if (res.getDate(4) == null) // status date
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(4));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(5))).intValue()).toString()); // protocolOid

                if (res.getDate(6) == null) // reviewed date
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(6));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()); // reviwedOid
                row.addElement(res.getString(8));                                                    // status Name
                row.addElement("");                                                                  // meetingdate
                results.addElement(row.clone());
                row = new Vector(9);
            } // end while


            int len = results.size();
            int oid = 0;
            java.sql.ResultSet res3 = null;
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportActiveApprovedProtocolView.java 79
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusView.java 99
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusView.java 97
edu/columbia/rascal/presentation/irb/pages/IrbReportExpirationDateView.java 84
edu/columbia/rascal/presentation/irb/pages/IrbReportInProcessProtocolView.java 76
            getForm().add("<br>");
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);
            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);
            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixEReportView.java 335
edu/columbia/rascal/presentation/appendix/pages/AppendixIReportView.java 642
        );

        for (int i = 0; i < locations.size(); i++) {
            AppendixLocation aLocation = (AppendixLocation) locations.elementAt(i);

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell cell;
            String textValue;

            textValue = aLocation.getLocationType();

            if ((textValue != null) && (textValue.trim().length() > 0)) {
                textValue = APPENDIX_HTML_SPACE + textValue;
            }

            cell = new CUHtmlTableCell();
            cell.add(getTableCellData(textValue));
            cell.setAlign("left");
            aRow.add(cell);

            textValue = aLocation.getBuilding();

            if ((textValue != null) && (textValue.trim().length() > 0)) {
                textValue = APPENDIX_HTML_SPACE + textValue;
            }

            cell = new CUHtmlTableCell();
            cell.add(getTableCellData(textValue));
            cell.setAlign("left");
            aRow.add(cell);

            textValue = aLocation.getFloor();

            if ((textValue != null) && (textValue.trim().length() > 0)) {
                textValue = APPENDIX_HTML_SPACE + textValue;
            }

            cell = new CUHtmlTableCell();
            cell.add(getTableCellData(textValue));
            cell.setAlign("left");
            aRow.add(cell);

            textValue = aLocation.getRoom();

            if ((textValue != null) && (textValue.trim().length() > 0)) {
                textValue = APPENDIX_HTML_SPACE + textValue;
            }

            cell = new CUHtmlTableCell();
            cell.add(getTableCellData(textValue));
            cell.setAlign("left");
            aRow.add(cell);

            aTable.add(aRow);
        }

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 396
edu/columbia/rascal/presentation/appendix/pages/AppendixApproverViewReleasedQueueView.java 678
edu/columbia/rascal/presentation/appendix/pages/AppendixVeterinarianApprovalQueueView.java 280
        aTitle1 = getTableColumnName("Pain");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendices
        aTitle = getTableColumnName("Appendices");
        header = aTable.getCell(0, colNum);
        header.setIsHeader(true);
        header.add(aTitle);
        header.setColumnsToSpan(6);

        // Appendix A
        aTitle1 = getTableColumnName("A");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix B
        aTitle1 = getTableColumnName("B");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix C
        aTitle1 = getTableColumnName("C");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix D
        aTitle1 = getTableColumnName("D");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix E
        aTitle1 = getTableColumnName("E");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Appendix F
        aTitle1 = getTableColumnName("F");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // Strong Radio Frequency
        aTitle1 = getTableColumnName("SRF");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;

        // XRay
        aTitle1 = getTableColumnName("XRay");
        header = aTable.getCell(1, colNum);
        header.setIsHeader(true);
        header.add(aTitle1);
        colNum++;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable     CUHtmlTable
     * @param  rowCount   int
     * @param  queueItem  Hashtable
     */
    public void setAnimalCareQueueViewTableDataRow(CUHtmlTable aTable, int rowCount,
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtReportDeptView.java 105
edu/columbia/rascal/presentation/propTrak/pages/PtReportDeptView.java 240
        setSortBy(sortColumn);

        String instruction = "";

        if (!getDownloadable()) {
            addHeader(getBeginDate(), getEndDate(), deptCodeName);
            getForm().add(addDate());
            getForm().add("<br>");
        }

        if (!getPrintable()) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(getInstruction(instruction));
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(
                getSortHeaderForColumnNames(
                    getKeywordListForColumns(columns),
                    "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton(
                    "BUTTON",
                    "BUTTON",
                    "Printable Form",
                    getUrlToPrintReport("A", getServletName(), "PtDeptCenter")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton(
                    "BUTTON",
                    "BUTTON",
                    "Downloadable Form",
                    getUrlToViewForDownload("A", getServletName(), "PtDeptCenter")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows, columns);
File Line
edu/columbia/rascal/presentation/irb/pages/HzAttestationSearchView.java 92
edu/columbia/rascal/presentation/irb/pages/IrbProtocolSearchView.java 91
edu/columbia/rascal/presentation/lab/pages/HzAppendixHeaderSearchView.java 75
        getAForm().add("<BR> <BR>");

        getAForm().add(buildSearchFields());

        getAForm().add(getButtons());


        add(getAForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable buildSearchFields() {

        // set main table for page:
        Vector columns = new Vector(2);
        columns.addElement("");
        columns.addElement("");

        int row = 0;

        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellPading(0);
        aTable.setCellSpacing(0);


        columns.setElementAt(new CUHtmlEntryField("RascalUserUni", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Uni  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelLeftFor("OR"), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("RascalUser", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Last Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;
File Line
edu/columbia/rascal/presentation/irb/pages/IrbProtocolAdminChairSearchView.java 170
edu/columbia/rascal/presentation/lab/pages/HzAppendixHeaderSearchView.java 77
        getAForm().add(buildSearchFields());

        getAForm().add(getButtons());


        add(getAForm());

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable buildSearchFields() {

        // set main table for page:
        Vector columns = new Vector(2);
        columns.addElement("");
        columns.addElement("");

        int row = 0;

        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellPading(0);
        aTable.setCellSpacing(0);


        columns.setElementAt(new CUHtmlEntryField("RascalUserUni", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Uni  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(getRowLabelLeftFor("OR"), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor(""));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;

        columns.setElementAt(new CUHtmlEntryField("RascalUser", "20", "20", ""), 1);
        aTable.addRowFor((Vector) columns.clone());
        aTable.getCell(row, 0).add(getRowLabelFor("Personnel Last Name  "));
        aTable.getCell(row, 0).setAlign("RIGHT");
        aTable.getCell(row, 1).setAlign("LEFT");
        row++;
File Line
edu/columbia/rascal/presentation/propTrak/pages/PtProposalRascalResultsDisplayView.java 240
edu/columbia/rascal/presentation/propTrak/pages/PtProposalResultsDisplayView.java 297
            next.setLink(PtProposalRascalSearchPageServlet.class.getName() + "?startAt=" +
                startPos + "&&pageSize=" + pageSize
                );
            next.setIsBold(true);
            next.setFontSize("+1");
            next.setFontName(getDefaultFontName());
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector<Object>) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
}
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3264
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4445
        aBuffer.append(") Order by e.statusDate ");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                // this row
                /*      (1) protocol header oid
                 *      (2) protocolNumber     (3) title     (4) PI last name     (5) statud date
                 *  (6) protocol oid     (7) committee name     (8) times in count     (9)
                 * originating department     (10) exempt flag
                 */
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                row.addElement(res.getString(2));                                                    // protocol number
                row.addElement(res.getString(3));                                                    // protocol title
                row.addElement(res.getString(4));                                                    // PI name last

                if (res.getDate(5) == null) // date submitted
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(5));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(6))).intValue()).toString()); // protocol parent
                row.addElement(res.getString(7));                                                    // committee name
                row.addElement(res.getString(8));                                                    // times in count
                row.addElement(res.getString(9));                                                    // original dept code

                String exp = res.getString(11);
                row.addElement(((exp == null) || exp.equals(""))
                        ? (((res.getString(10) != null) && res.getString(10).equals("Y")) ? "Exe"
                                                                                          : "")
                        : "Exp"
                    ); // exempt marker
                results.addElement(row.clone());
                row = new Vector(10);
            } // end while


        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return results;
    }

    /**
     * RASCAL (maggie) Creation date: (4/1/2003 11:13:52 PM)
     *
     * @return  Vector of results
     */

    public static Vector getPaperProtocolsForValidationQueue() {
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaReportByProtocolNumberView.java 89
edu/columbia/rascal/presentation/irb/pages/IrbReportCancerCenterStatusView.java 86
edu/columbia/rascal/presentation/irb/pages/IrbReportCancerCenterStatusView.java 218
            getForm().add("<br><br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("irb205.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" + IrbAgendaMainMenuServlet.class.getName() + "'"
File Line
edu/columbia/rascal/presentation/irb/pages/IrbQueueReviewerForChairView.java 112
edu/columbia/rascal/presentation/irb/pages/IrbQueueReviewerView.java 194
        add(getForm());
// render();

        protocolResults.clear();
        adverseEventResults.clear();
        closureResults.clear();
        unanticipateResults.clear();
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable getActionButtons(String aName) {
        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("left");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", aName, "Reviewed");
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
            aCell.setVAlign("center");
        }

        return aTable;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   isExpedited      TODO: DOCUMENT ME!
     * @param   isPending        TODO: DOCUMENT ME!
     * @param   aReviwerOid      TODO: DOCUMENT ME!
     * @param   parentObjectOid  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable getActionButtons(boolean isExpedited, boolean isPending, String aReviwerOid,
        String parentObjectOid
        ) {
        CUHtmlTable aTable = getTable(1, 2);
        aTable.setBorderWidth(0);
        aTable.setAlign("left");
        aTable.setWidth("30%");

        if (getAllowEdit()) {

            if (isExpedited || isPending) {

                CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "Id" + aReviwerOid,
                        "Approval", "irbReviewerApproveConfirm('ProtocolHeader','" + parentObjectOid + "','" + aReviwerOid + "')"
                        );
                CUHtmlTableCell aCell = aTable.getCell(0, 0);
                aCell.add(pb1);

                if (isExpedited) {
                    String message =
                        "Are you sure you want to send this to Full Committee Review? Any expeditable declarations will be removed.";
                    CUHtmlPushButton pb = new CUHtmlPushButton("SUBMIT", "Irb" + parentObjectOid,
                            "Full Committee Review",
                            "return(irbReviewerConfirm('" + message + "'));"
                            );
                    aCell = aTable.getCell(0, 1);
                    aCell.add(pb);
                }
            } else {
                CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "Id" + parentObjectOid,
                        "Reviewed"
                        );
                CUHtmlTableCell aCell = aTable.getCell(0, 0);
                aCell.add(pb1);
                aCell.setVAlign("center");
            }


        }

        return aTable;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString    is the ProtocolNumber
     * @param   aLocation  TODO: DOCUMENT ME!
     * @param   euOid      TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    public Object getEuLinkWidgetFor(String aString, String aLocation, String euOid) {
File Line
edu/columbia/rascal/presentation/common/pdf/CURascalPDFFormConstruction.java 284
edu/columbia/rascal/presentation/irb/pages/IrbProtocolPDFApprovalLetterView.java 246
        setHeight(oriHeight);
        setPDFPage(originalPage);
        lineSpace = style2.getFontLeading();

        while (contentToken.hasMoreElements()) {

            nextTokenValue = contentToken.nextElement().toString();

            overflow = addContentItem(getPDFPage(), nextTokenValue, getRightStarting(),
                    getPageWidth() - getLeftPageMargin(), style2
                    );

            if (overflow == 0) { // overflow = lineSpace;
            }

            if (previousPageNum == getPDFPage().getPageNumber()) {
                lastLineOverflow += overflow;
                setHeight(getHeight() - overflow);
            } else {
                lastLineOverflow = overflow;
                previousPageNum = getPDFPage().getPageNumber();
                setPDFPage(getPDFObject().getPage(previousPageNum - 1));
                setHeight(getPageHeight() - getTopPageMargin() - overflow);
            }
        }

        setHeight(oriHeight);

        // the last page
        setPDFPage(getPDFObject().getPage(getPDFObject().getNumberOfPages() - 1));

        if (originalPage.equals(getPDFPage())) { // no overflow, label and content on the save page;
            lastLineOverflow = (lastLineOverflow < lastLabelOverflow) ? lastLabelOverflow
                                                                      : lastLineOverflow;

            // setHeight(getHeight() - lastLineOverflow-getPDFPage().POINTS/2);
            setHeight(getHeight() - lastLineOverflow - lineSpace);
        } else {

            if (labelPage.getPageNumber() == getPDFPage().getPageNumber()) {       // labeloverflow fall on same page with lineoverflow
                lastLineOverflow = (lastLineOverflow < lastLabelOverflow) ? lastLabelOverflow
                                                                          : lastLineOverflow;
            } else if (labelPage.getPageNumber() < getPDFPage().getPageNumber()) { // lineoverflow more pages than label(labeloverflow)

                // lastLineOverflow=lastLineOverflow;
            } else if (labelPage.getPageNumber() > getPDFPage().getPageNumber()) { // labeloverflow more pages than content(lineoverflow)
                lastLineOverflow = lastLabelOverflow;
            }

            /*
             * int difference = getPDFPage().getPageNumber() - originalPage.getPageNumber();
             * if(oriHeight <= getBottomPageMargin() + style.getFontLeading()){//just enough
             * difference = 0; }else{     difference = difference % 2 + 1; }
             * setHeight(getPageHeight()- getTopPageMargin()-lastLineOverflow - difference *
             * lineSpace - getPDFPage().POINTS/2);
             */
            setHeight(getPageHeight() - getTopPageMargin() - lastLineOverflow -
                Math.max(style.getFontLeading(), style2.getFontLeading())
                );

        }
        // setPageFeature();
    }
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 841
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 932
        aBuffer.append(" and stat.parentObjectName = '");
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("' and stat.parentObjectOid = header.oid ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("')) order by currentStatus.statusDate DESC");


        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));                                                    // current status Name

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 2981
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3072
        aBuffer.append(" and stat.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and stat.parentObjectOid = header.oid and header.modificationNumber > 0 ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4154
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4246
        aBuffer.append(" and stat.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append(
            "' and stat.parentObjectOid = header.oid and (header.protocolYear > 1 and header.modificationNumber = 0) "
            );
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5062
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5151
        aBuffer.append(" and stat.parentObjectName = '");
        aBuffer.append(IrbNameConstants.CLOSURE);
        aBuffer.append("' and stat.parentObjectOid = header.oid ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.CLOSURE);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.CLOSURE);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.CLOSURE);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // eventOid
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5531
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5623
        aBuffer.append(" and stat.parentObjectName = '");
        aBuffer.append(IrbNameConstants.UNANTICIPATED_PROBLEM);
        aBuffer.append("' and stat.parentObjectOid = header.oid ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.UNANTICIPATED_PROBLEM);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.UNANTICIPATED_PROBLEM);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.UNANTICIPATED_PROBLEM);
        aBuffer.append("')) order by currentStatus.statusDate DESC");


        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));                                                    // current status Name

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
File Line
edu/columbia/rascal/presentation/appendix/servlets/AppendixAcknowledgementServlet.java 127
edu/columbia/rascal/presentation/appendix/servlets/AppendixReleaseServlet.java 120
                        ) {
                            return false;
                        }
                    }
                }

                return true;

            case 'F':
                return !((AppendixF) getAppendix()).getAppendixIsotopes().isEmpty() &&
                    !ServiceLocator.getAppendixLocationService().getAllByOwnerOidAndType(
                        ((AppendixF) getAppendix()).getId(), "AppendixF"
                        ).isEmpty();

            case 'G':
            	AppendixG apxG = (AppendixG) getAppendix();
            	// Isotopes
            	if ( apxG.getAppendixIsotopes().isEmpty() ) return false;
            	// Locations
            	if ( ServiceLocator.getAppendixLocationService().getAllByOwnerOidAndType(
                    	apxG.getId(), "AppendixG"
                    ).isEmpty()) return false;
            	
           		// If either irradiator is in use, check we have at least one exposure value
            	if ( StringUtils.equalsIgnoreCase("Y", apxG.getIcrc()) || StringUtils.equalsIgnoreCase("Y", apxG.getVc11()) ) {
            		boolean hasExposure = false;
            		if ( apxG.getExposure1() != null && apxG.getExposure1() > 0 ) hasExposure = true;
            		if ( !hasExposure && apxG.getExposure2() != null && apxG.getExposure2() > 0 ) hasExposure = true;
            		if ( !hasExposure && apxG.getExposure3() != null && apxG.getExposure3() > 0 ) hasExposure = true;
            		if ( !hasExposure && apxG.getExposure4() != null && apxG.getExposure4() > 0 ) hasExposure = true;
            		if ( !hasExposure && apxG.getExposure5() != null && apxG.getExposure5() > 0 ) hasExposure = true;
            		if ( !hasExposure && apxG.getExposure6() != null && apxG.getExposure6() > 0 ) hasExposure = true;
            		if ( !hasExposure ) return false;
            	}
File Line
edu/columbia/rascal/presentation/irb/pages/IrbQueueReviewerForChairView.java 72
edu/columbia/rascal/presentation/irb/pages/IrbQueueReviewerView.java 154
        CUHtmlText txt1 = new CUHtmlText("Manage Reviewer Queue for " + reviewer);
        txt1.setIsBold(true);
        txt1.setFontSize("+1");
        txt1.setFontName("Comic Sans MS");
        txt1.setAlignment("CENTER");
        getForm().add(txt1);

        getForm().add("<BR>");

        getForm().add(getGenHelpFor("GENERAL INSTRUCTIONS ", "irb261.html"));
        getForm().add(getGenHelpFor("DISPLAY EXEMPT & EXPEDITABLE CATEGORIES ", "irb262.html"));
        getForm().add(getGenHelpFor("REVIEWER FORMS ", "irb264.html"));

        getForm().add("<BR>");

        if (protocolResults.size() > 0) addQueueSection(protocolResults, IrbNameConstants.PROTOCOL);

        if (modificationResults.size() > 0) addQueueSection(modificationResults, IrbNameConstants.MODIFICATION);

        if (renewalResults.size() > 0) addQueueSection(renewalResults, IrbNameConstants.RENEWAL);

        if (adverseEventResults.size() > 0) addQueueSection(adverseEventResults, IrbNameConstants.ADVERSE_EVENT);

        if (closureResults.size() > 0) addQueueSection(closureResults, IrbNameConstants.CLOSURE);

        if (unanticipateResults.size() > 0)
            addQueueSection(unanticipateResults, IrbNameConstants.UNANTICIPATED_PROBLEM);

        getForm().add("<BR>");

        getForm().add(getHiddenWidgetFor("action"));
        getForm().add(getHiddenWidgetFor("itemName"));
        getForm().add(getHiddenWidgetFor("itemOid"));
        getForm().add(getHiddenWidgetFor("reviewerOid"));
        getForm().add(getHiddenWidgetFor("onAgenda"));
        getForm().add(getHiddenWidgetFor("reviewedEventOid"));
        getForm().add(getHiddenWidgetFor("reviewedEventName"));
        getForm().add(getHiddenWidgetFor("reviewedProtNumber"));
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixOwnerHistoryDisplayView.java 339
edu/columbia/rascal/presentation/appendix/pages/AppendixOwnerHistoryDisplayView.java 416
    public void setOwnerHistoryDisplayViewTableDataRow(CUHtmlTable aTable, Hashtable queueItem) {

        String aText;
        CUHtmlTableRow aRow = new CUHtmlTableRow();
        CUHtmlTableCell aCell;

        // ownerType
        aText = getOwnerTypeDisplay((String) queueItem.get(KEY_PARM_OWNER_TYPE));
        aCell = new CUHtmlTableCell(getTableCellData(aText));
        aCell.setVAlign("top");
        aRow.add(aCell);



        // ownerNumber

        String ownerNumb = (String) queueItem.get(KEY_PARM_OWNER_NUMBER);
        String protocolOid = (String) queueItem.get(KEY_PARM_OWNER_OID);
        CUHtmlText protocolNumbTxt = getTableCellData(ownerNumb);
        String type = (String) queueItem.get(KEY_PARM_OWNER_TYPE);

        if (type.equals(ANIMAL_CARE_OWNER)) {
            protocolNumbTxt = getLinkToReviewAnimalCareProtocolDataSheet(
                    ownerNumb, protocolOid
                    );
        } else if (type.equals(IRB_OWNER)) {
            protocolNumbTxt = getLinkToReviewIrbProtocolDataSheet(ownerNumb,
                    protocolOid
                    );
        } else if (type.equals(PROPOSAL_TRACKING_OWNER)) {
            protocolNumbTxt = getLinkToReviewPtProposalCoverSheet(ownerNumb,
                    ownerNumb.substring(3, 11)
                    );
        }

        aCell = new CUHtmlTableCell();
        aCell.add(protocolNumbTxt);
        aCell.setAlign("top");
        aCell.setWidth("25%");
        aRow.add(aCell);


        // P.I.
        aText = (String) queueItem.get(KEY_PARM_OWNER_PI_NAME);
        aCell = new CUHtmlTableCell(getTableCellData(aText));
        aCell.setVAlign("top");
        aRow.add(aCell);

        // ehsNumber
        aText = (String) queueItem.get(KEY_PARM_TRACKING_EHS);

        if ((aText == null) || (aText.trim().length() < 1)) {
            aText = "not assigned";
        }

        aCell = new CUHtmlTableCell(getTableCellData(aText));
        aCell.setVAlign("top");
        aRow.add(aCell);

        // blank space
        aCell = new CUHtmlTableCell();
        aCell.add("");
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 214
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 297
        Vector row = new Vector(colSize);

        for (int i = 0; i < colSize; i++) {
            row.addElement("");
        }

        try {

            if (name.equals(IrbNameConstants.PROTOCOL_HEADER)) {

                while (res.next()) {
                    row.setElementAt(String.valueOf(res.getInt(1)), 0); // protocol oid
                    row.setElementAt(res.getString(2), 1);              // protocol number //
                                                                        // REMOVED THE (Y1 M00) hh
                                                                        // 1//18/2003

                    if (res.getInt(4) > 0)
                        row.setElementAt(IrbNameConstants.MODIFICATION, 2);
                    else if ((res.getInt(3) > 1) && (res.getInt(4) == 0))
                        row.setElementAt(IrbNameConstants.RENEWAL, 2);
                    else
                        row.setElementAt(name, 2);

                    row.setElementAt(res.getString(6), 3);               // title
                    row.setElementAt(res.getString(5), 4);               // PI
                    row.setElementAt(String.valueOf(res.getLong(7)), 5); // event oid

                    if (res.getString(8) == null) {
                        row.setElementAt("", 6);
                    } else {
                        row.setElementAt(res.getString(8), 6);
                    }

                    row.setElementAt(String.valueOf(res.getLong(9)), 7);  // correspondence oid
                    row.setElementAt(String.valueOf(res.getLong(10)), 8); // recipient oid
                    row.setElementAt(res.getString(11), 9);               // correspondence Author
                    row.setElementAt(res.getString(12), 10);              // current statusName
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaHtmlView.java 108
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 114
    public void addHipaaObjectHeader() { }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     * @param  addRows   TODO: DOCUMENT ME!
     * @param  height    TODO: DOCUMENT ME!
     */
    public void addSpacerRows(CUHtmlTable aTable, int numCells, int addRows, String height) {
        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();

        for (int i = 0; i < addRows; i++) {
            aTable.addRowFor(columns);
            aTable.getCell(row, 0).setHeight(height);
            row++;
        }
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  rowCount  TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     * @param  addRows   TODO: DOCUMENT ME!
     * @param  height    TODO: DOCUMENT ME!
     */
    public void addSpacerRows(CUHtmlTable aTable, int rowCount, int numCells, int addRows,
        String height
        ) {
        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        for (int i = 0; i < addRows; i++) {
            aTable.addRowFor(columns);
            aTable.getCell(rowCount, 0).setHeight(height);
            rowCount++;
        }
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   parmString  protocolOid String
     *
     * @return  String
     */
    public String encodeUrlParam(String parmString) {
        String aString = "";

        if (parmString != null) {
            aString = parmString.replace(' ', '+');
        }

        return aString;
    }

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 2);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Save");
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
            aCell.setAlign("center");
        }

        return aTable;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aValue     TODO: DOCUMENT ME!
     * @param   inputName  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getBiggerMultilineTextWidgetFor(String aValue, String inputName) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbProtocolRascalResultsDisplayView.java 373
edu/columbia/rascal/presentation/irb/pages/IrbProtocolResultsDisplayView.java 490
            next.setLink(IrbProtocolRascalSearchPageServlet.class.getName() +
                "?DisplayPage=NextPage"
                );
            next.setIsBold(true);
            next.setFontSize("+1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
    
    private static final SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbReportApprovalStatusServlet.java 59
edu/columbia/rascal/presentation/irb/servlets/IrbReportEventStatusServlet.java 59
        results = IrbReportQuery.getIrbReportApprovalStatus(dateRangeWhere, selectedComm, eventList,
                statusList
                );

        return results;


    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @return  this method was created in VisualAge.
     */
    @Override public CURascalHtmlView getPage() {

        String selectedCommittee = (String) getSession().getAttribute("selectedCommittee");
        String beginDate = (String) getSession().getAttribute("beginDate");
        String endDate = (String) getSession().getAttribute("endDate");
        String eventList = (String) getSession().getAttribute("EventList");
        Vector statusList = (Vector) getSession().getAttribute("StatusList");

        Vector columns = new Vector();

        // columns.addElement("EventName");
        columns.addElement("ProtocolNumber");
        columns.addElement("PI");

        if (eventList.equals("Protocol") || eventList.equals("Renewal") ||
                eventList.equals("Modification")
        ) columns.addElement("COI");

        columns.addElement("Committee");
        columns.addElement("StatusDate");
        // columns.addElement("CurrentStatus");


        CURascalHtmlView view = null;

        CUSortVector rows = new CUSortVector(getSelectedData(beginDate, endDate,
                    selectedCommittee, eventList, statusList
                    )
                );
        String sortBy = getLineParameter("sortBy");

        if (sortBy != null) {
            rows.setColumnNames(columns);

            // sortBy = sortBy.replace('-',' ').trim();
            rows.sortByColumn(sortBy);

            // view = new IrbMessageView("you selected Committee:"+selectedCommittee+
            // "<BR>"+"Begin date "+beginDate+"<BR>"+"end date"+endDate);
        } else {
            sortBy = new String();
        }


        boolean printable = false;
        boolean downloadable = false;
        String printableString = getLineParameter("printable");

        if ((printableString != null) && !printableString.equals("")) {
            printable = printableString.equalsIgnoreCase("true");
        }

        String downloadableString = getLineParameter("downloadable");

        if ((downloadableString != null) && !downloadableString.equals("")) {
            downloadable = downloadableString.equalsIgnoreCase("true");
        }
        // if ((rows == null) || (rows.isEmpty())) { String link=
        // "parent.frames[1].location='edu.columbia.rascal.presentation.propTrak.servlets.PtLinkFrameServlet?trakId=XXXX9999'";
        // String main=
        // "parent.frames[2].location='edu.columbia.rascal.presentation.propTrak.servlets.PtReportStatusDateRangeServlet'";

        // view = new IrbMessageView("There are no proposals to view that fit your criteria.",
        // link, main); } if (getSession().getAttribute("column0") == null ||
        // getSession().getAttribute("column0").equals("")) { view = new IrbMessageView("You
        // have not selected any criteria for this report."); } else
        {
            view = new IrbReportApprovalStatusView(rows, printable, sortBy, selectedCommittee,
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentProtocolResultsDisplayView.java 361
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderResultsDisplayView.java 349
edu/columbia/rascal/presentation/lab/pages/HzAppendixHeaderResultsDisplayView.java 364
            next.setLink(ConsentProtocolSearchPageServlet.class.getName() +
                "?DisplayPage=NextPage"
                );
            next.setIsBold(true);
            next.setFontSize("1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/hipaa/jdbc/HipaaReportQueryFormat.java 174
edu/columbia/rascal/presentation/hipaa/jdbc/HipaaReportQueryFormat.java 277
        String status3 = "";

        StringBuilder whereStatus = new StringBuilder(200);
        whereStatus.append(" AND ch.oid = status.hipaaHeader_Oid");
        whereStatus.append(" AND status.oid = (");
        whereStatus.append("SELECT max(oid)");
        whereStatus.append(" FROM HipaaStatus");
        whereStatus.append(" WHERE ch.oid = hipaaHeader_Oid");

        String whereHipaaTitle = "";
        String whereAccessorName = "";
        String whereAccessorId = "";
        StringBuilder dateBuffer = new StringBuilder(100);

        // select based on formType (as indicated by form title)
        CURascalBasicSearchParameter hipaaTitle = params.getHipaaTitle();

        if (isNotEmpty(hipaaTitle)) {
            whereHipaaTitle = " AND hForm.templateName LIKE '" + hipaaTitle.getKeyword() + "%'";
        }

        // select by current status
        CURascalBasicSearchParameter statusParm = params.getStatusParm();

        if (isNotEmpty(statusParm) && !statusParm.getKeyword().equals("All")) {
            whereStatus.append(" AND '");
            whereStatus.append(statusParm.getKeyword());
            whereStatus.append("' = statusName");

// status3 = " HipaaStatus status3";
        }

        whereStatus.append(')');

        // select by name of a person with access
        CURascalBasicSearchParameter accessorName = params.getAccessControlUser();

        if (isNotEmpty(accessorName)) {
            whereAccessorName =
                " AND (ch.oid = cac2.hipaaHeader_Oid AND cac2.rid IN (SELECT rid FROM RASCAL_USER WHERE rid = rid";
            whereAccessorName = whereAccessorName +
                buildWhereClauseForSelection(accessorName, "name_last") + "))";
            fromAccessControl2 = ", HipaaAccessControl cac2";
        }

        // select by Uni of a person with access
        CURascalBasicSearchParameter accessorId = params.getAccessControlUserId();

        if (isNotEmpty(accessorId)) {
            whereAccessorId =
                " AND (ch.oid = cac2.hipaaHeader_Oid AND cac2.rid = (SELECT rid FROM RASCAL_USER WHERE rid = rid";
            whereAccessorId = whereAccessorId +
                buildWhereClauseForSelectionByExactCaseMatch(accessorId, "user_id") + "))";
            fromAccessControl2 = ", HipaaAccessControl cac2";
        }

        // select by submit date (match or date range)
        String fromDate = params.getFromDate();
        String toDate = params.getToDate();

        if (!isEmpty(fromDate) && !isEmpty(toDate)) {
            dateBuffer.append(" AND status2.oid = ");
            dateBuffer.append("(SELECT max(oid)");
            dateBuffer.append(" FROM HipaaStatus");
            dateBuffer.append(" WHERE ch.oid = hipaaHeader_Oid");
            dateBuffer.append(" AND 'Submit' = statusName");
            dateBuffer.append(" AND statusDate BETWEEN '");
            dateBuffer.append(fromDate);
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3175
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3663
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4350
        aBuffer.append(" order by a.protocolNumber");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                // this row:
                /* (1)oid,
                 *      (2)protocolNumber(AAAA1234),      (3)title,      (4)PI last name (?),
                 * (5)submit date,      (6)protocol parent,      (7)committee name,      (8)status,
                 *     (9)exempt/expeditable
                 */
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                row.addElement(res.getString(2));
                row.addElement(res.getString(4));                                                    // protocol title
                row.addElement(res.getString(5));

                if (res.getDate(7) == null) // date submitted
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(7));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(8))).intValue()).toString()); // protocol parent
                row.addElement(res.getString(9));                                                    // committee name
                row.addElement(res.getString(10));                                                   // submit times in

                String exp = res.getString(11);
                row.addElement(((exp == null) || exp.equals(""))
                        ? (((res.getString(3) != null) && res.getString(3).equals("Y")) ? "Exe"
                                                                                        : "")
                        : "Exp"
                    ); // exempt marker
                results.addElement(row.clone());
                row = new Vector(9);
            } // end while

        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return results;

    }

    /**
     * RASCAL (halayn) Creation date: (4/24/2002 12:53:52 PM)
     *
     * @param   whoAmI  TODO: DOCUMENT ME!
     *
     * @return  Vector of results
     */

    public static Vector getModificationsToLogIn(RascalUser whoAmI) {
File Line
edu/columbia/rascal/presentation/irb/pages/HzAttestationResultDisplayView.java 374
edu/columbia/rascal/presentation/irb/pages/IrbProtocolRascalResultsDisplayView.java 373
edu/columbia/rascal/presentation/irb/pages/IrbProtocolResultsDisplayView.java 490
            next.setLink(HzAttestationSearchPageServlet.class.getName() + "?DisplayPage=NextPage");
            next.setIsBold(true);
            next.setFontSize("+1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportResearchSummaryServlet.java 1287
edu/columbia/rascal/presentation/propTrak/servlets/PtReportResearchSummaryServlet.java 1372
            ResultSet res = acc.executeQuery(getQueryAnimalProtocolHistoryByDept(deptCode, from, to)
                    );

            while (res.next()) {                   // protocolNumber
                protocolNumber = res.getString(1); // returns int or 0 if SQL NULL

                // protocolYear
                protYear = res.getString(2);

                if ((protYear == null) || protYear.trim().equals("")) protYear = "1";

                // modificationNumber
                modNum = res.getString(3);

                if ((modNum == null) || modNum.trim().equals("")) modNum = "00";

                // protocolNumberYrMod = "AC-" + protocolNumber+"(Y"+protYear+" M"+modNum+")";
                protocolNumberYrMod = protocolNumber + "(Y" + protYear + " M" + modNum + ")";
                row.addElement(protocolNumberYrMod);

                // oid of a IacucProtocolHeader
                row.addElement(Long.toString(res.getLong(4)));

                // dateApproved
                if (res.getDate(5) == null) {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(5));
                }

                // effectiveDate
                if (res.getDate(6) == null) {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(6));
                }

                // expirationDate
                // Add a Date instead of a String to be sorted.
                if (res.getDate(7) == null) {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(7));
                }


                // P.I. - lastName, firstName (uni)
                row.addElement(buildLastFirstName(res.getString(8), res.getString(9)) + " (" +
                    res.getString(10) + ")"
                    );

                results.addElement(row.clone());
                row = new Vector(6);
            } // end while
        } catch (Exception e) {
            log.error(e);
        }

        return results;

    }

    /**
     * getSelectedDataHumanProtocolsHistoryByUni.
     *
     * @param   uni   String
     * @param   from  String
     * @param   to    String
     *
     * @return  Vector
     */
    public Vector getSelectedDataAnimalProtocolsHistoryByUni(String uni, String from, String to) {
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesChairApprovalServlet.java 514
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinutesChairSingleEventApprovalServlet.java 327
        if (parentObjectName.equals(IrbNameConstants.PROTOCOL_HEADER)) {
            ph = ServiceLocator.getIrbProtocolService().getByProtocolNumber(corr
                    .getProtocolNumber(), getUser()
                    ).getLastProtocolHeader();
            pi = ServiceLocator.getRascalUserService().findById(ph.getPI().getRid());
            title = "\n\nTitle: " + ph.getTitle();
            abbrebiatedTitle = ph.getAbbreviatedTitle();

            piName = "\nPI: " + pi.getNameFirst() + " " + pi.getNameLast();
        } else {
            IrbProtocol prot = ServiceLocator.getIrbProtocolService().getByProtocolNumber(
                    corr.getProtocolNumber(), getUser()
                    );
            ph =
                ((ServiceLocator.getIrbProtocolService().getLastApprovedProtocolHeader(prot) ==
                        null)
                    ? ServiceLocator.getIrbProtocolService().getLastExpiredProtocolHeader(prot)
                    : ServiceLocator.getIrbProtocolService().getLastApprovedProtocolHeader(prot));
            pi = ServiceLocator.getRascalUserService().findById(ph.getPI().getRid());
            title = "\n\nTitle: " + ph.getTitle();
            abbrebiatedTitle = ph == null? "" : ph.getAbbreviatedTitle();
            piName = "\nPI: " + pi.getNameFirst() + " " + pi.getNameLast();
        }

        IrbStatusEmailMessage email = null;

        // sent email

        //Only APPROVED Emails are sent now. See https://bugzilla.cc.columbia.edu/show_bug.cgi?id=13509
        
        if (statusName.equalsIgnoreCase(IrbStatusConstants.APPROVE) && !(parentObjectName.startsWith(IrbNameConstants.CLOSURE)))
        {
	        email = new IrbStatusEmailMessage(parentObjectName, protNum, abbrebiatedTitle, statusName, toName, toAddress,
	                RascalProperties.getProperty("DbUserId"), title, piName
	                );
	
	        try {
	            sender.openConnection();
	            sender.sendEmail(email);
	        } catch (IOException e2) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportActiveApprovedProtocolView.java 74
edu/columbia/rascal/presentation/irb/pages/IrbReportInProcessProtocolView.java 71
edu/columbia/rascal/presentation/propTrak/pages/PtReportResearchSummaryByUNIView.java 78
        columns.addElement("Abbreviated_Title");

        if (!(getDownloadable())) {
            addHeader();
            getForm().add(addDate());
            getForm().add("<br>");
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);
            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);
            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaHtmlView.java 1029
edu/columbia/rascal/presentation/lab/pages/HzHtmlView.java 1256
    }

    /**
     * This method creates and formats a CUHtmlText object for the string "aLabel" as a standardized
     * label for a table row.
     *
     * <p>This method was created in VisualAge.</p>
     *
     * @param   aLabel  TODO: DOCUMENT ME!
     *
     * @return  CUHtmlText
     */
    public CUHtmlText getRowLabelFor(String aLabel) {
        String preparedString = aLabel.trim();

        if (!preparedString.endsWith("&nbsp") && !preparedString.endsWith("&nbsp;")) {
            preparedString = preparedString + " &nbsp;";
        }

        CUHtmlText txt = new CUHtmlText(preparedString);
        txt.setFontName(getDefaultFontName());
        txt.setFontSize("1");
        txt.setIsBold(true);
        txt.setAlignment("right");

        return txt;
    }

    /**
     * This method creates and formats a CUHtmlText object for the string "aLabel" as a standardized
     * label for a table row It puts the CUHtmlText object in a table with a Image that contains the
     * link to the help page hh 5/12/00.
     *
     * <p>This method was created in VisualAge.</p>
     *
     * @param   aLabel  = is the label that will be shown on the screen
     * @param   source  = the string that represents the location of the help html page.
     *
     * @return  CUHtmlTable
     */
    public CUHtmlTable getRowLabelFor(String aLabel, String source) {

        CUHtmlTable t = new CUHtmlTable();
        t.setBorderWidth(0);

        Vector v = new Vector(2);

        String preparedString = aLabel.trim();

        if (!preparedString.endsWith("&nbsp") && !preparedString.endsWith("&nbsp;")) {
            preparedString = preparedString + " &nbsp;";
        }

        CUHtmlText txt = new CUHtmlText(preparedString);
        txt.setFontName(getDefaultFontName());
        txt.setFontSize("1");
        txt.setIsBold(true);
        txt.setAlignment("right");

        v.addElement(txt);
        v.addElement(getHelpFor(source)); // get the CUHtmlImage and link

        t.addRowFor(v);
        t.getCell(0, 0).setWidth("95%");
        t.getCell(0, 0).setAlign("right");
        t.getCell(0, 1).setWidth("5%");
        t.setCellSpacing(0);
        t.setCellPading(0);

        return t;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aLabel  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlText getRowLabelLeftFor(String aLabel) {

        CUHtmlText txt = new CUHtmlText(aLabel);
        txt.setFontName("Comic Sans MS");
        txt.setFontSize("1");
        txt.setIsBold(true);
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusView.java 255
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusView.java 255
edu/columbia/rascal/presentation/irb/pages/IrbReportHistoryView.java 278
edu/columbia/rascal/presentation/irb/pages/IrbReportHistoryView.java 380
        t.addRowFor(columns);
        elements = new Vector();

        int rowSize = rows.size();

        for (int n = 0; n < rowSize; n++) {
            Hashtable currentRow = (Hashtable) rows.elementAt(n);
            String name = (String) currentRow.get("EventName");

            if (name.equals("Protocol") || name.equals("Modification") || name.equals("Renewal") ||
                    name.equals("AdverseEvent") || name.equals(IrbNameConstants.UNANTICIPATED_PROBLEM) ||
                     name.equals("Closure")
            ) {

                if (!(getPrintable())) {

                    if (name.equals("Protocol") || name.equals("Modification") ||
                            name.equals("Renewal")
                    ) {
                        elements.addElement(getObjectLinkWidgetFor(name,
                                (String) currentRow.get("EventOid"), "ProtocolHeader",
                                (String) currentRow.get("ProtocolOid")
                                )
                            ); // Event
                    } else {
                        elements.addElement(getObjectLinkWidgetFor(name,
                                (String) currentRow.get("EventOid"), name,
                                (String) currentRow.get("ProtocolOid")
                                )
                            );
                    }

                    elements.addElement(getProtocolLinkWidgetFor(
                            (String) currentRow.get("ProtocolNumber"),
                            (String) currentRow.get("ProtocolOid")
                            )
                        ); // Protocol Number
                } else {
                    elements.addElement(getWidgetFor((String) currentRow.get("EventName")));
                    elements.addElement(getWidgetFor((String) currentRow.get("ProtocolNumber")));
                }
            }

            elements.addElement(getWidgetFor((String) currentRow.get("Committee"))); // Committee
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceCreateServlet.java 145
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceCreateServlet.java 229
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceRespondServlet.java 403
	                    correspondence.getIrbCorrespondenceRecipients().add(recipient2);
	                    sentEmail(leadPerson, correspondence);
                    }
 
                    //Send to Study Coordinator
                    
                    Vector<IrbStaff> studyCoordis = header.getStudyCoordinators();
                    int studyCoorSize = studyCoordis.size();

                    for (int i = 0; i < studyCoorSize; i++) {
                        IrbStaff aStudyCor = studyCoordis.elementAt(i);

                        if (!aStudyCor.getRid().equals(header.getCreatedBy()) &&
                                !aStudyCor.getRid().equals(Integer.valueOf(leadPerson))
                        ) {
                            recipient = new IrbCorrespondenceRecipient();
                            recipient.setIrbCorrespondence(correspondence);
                            recipient.setRecipientRid(aStudyCor.getRid());
                            recipient.setProtocolRole("Study Coordinator");
                            ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                            correspondence.getIrbCorrespondenceRecipients().add(recipient);
                            sentEmail(aStudyCor.getRid(), correspondence);
                        }
                    }

                    //Send to Regulatory Coordinator
                    
                    Vector<IrbStaff> rcCoordis = header.getRegulatoryCoordinators();
                    int rcCoorSize = rcCoordis.size();

                    for (int i = 0; i < rcCoorSize; i++) {
                        IrbStaff aRcCor = rcCoordis.elementAt(i);

                        if ((!aRcCor.getRid().equals(header.getCreatedBy())) &&
                                (!aRcCor.getRid().equals(leadPerson))
                        ) {
                            recipient = new IrbCorrespondenceRecipient();
                            recipient.setIrbCorrespondence(correspondence);
                            recipient.setRecipientRid(aRcCor.getRid());
                            recipient.setProtocolRole("Regulatory Coordinator");
                            ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                            correspondence.getIrbCorrespondenceRecipients().add(recipient);
                            sentEmail(aRcCor.getRid(), correspondence);
                        }
                    }                    
                }
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaQueueAssignedToMeetingView.java 259
edu/columbia/rascal/presentation/hipaa/pages/HipaaQueueSubmittedView.java 315
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable  CUHtmlTable
     */
    public void setQueueTableHead(CUHtmlTable aTable) {

        CUHtmlText aTitle;
        CUHtmlTableCell aCell;
        int cellNum = 0;

        // headerNumber
        aTitle = getTableColumnName("HIPAA<br>Number", "left");
        aCell = aTable.getCell(0, cellNum);
        aCell.setIsHeader(true);
        aCell.add(aTitle);
        aCell.setVAlign("bottom");
        aCell.setAlign("left");
        cellNum++;

        // HIPAA Title
        aTitle = getTableColumnName("Form Template", "left");
        aCell = aTable.getCell(0, cellNum);
        aCell.setIsHeader(true);
        aCell.add(aTitle);
        aCell.setVAlign("bottom");
        aCell.setAlign("left");
        cellNum++;

/*
 *      // Form Type     aTitle= getTableColumnName("Form<br>Type", "left");     aCell =
 * aTable.getCell(0,cellNum);     aCell.setIsHeader(true);     aCell.add(aTitle);
 * aCell.setVAlign("bottom");     aCell.setAlign("left");     cellNum++;
 */
        // IRB Protocol Number
        aTitle = getTableColumnName("IRB Protocol<br>Number", "left");
        aCell = aTable.getCell(0, cellNum);
        aCell.setIsHeader(true);
        aCell.add(aTitle);
        aCell.setVAlign("bottom");
        aCell.setAlign("left");
        cellNum++;

        // HIPAA history
        aTitle = getTableColumnName("History", "Center");
        aCell = aTable.getCell(0, cellNum);
        aCell.setIsHeader(true);
        aCell.add(aTitle);
        aCell.setVAlign("bottom");
        aCell.setAlign("left");
        cellNum++;

        // View HIPAA Notes
        aTitle = getTableColumnName("View<br>HIPAA<br>Notes", "center");
        aCell = aTable.getCell(0, cellNum);
        aCell.setIsHeader(true);
        aCell.add(aTitle);
        aCell.setVAlign("bottom");
        aCell.setAlign("left");
        cellNum++;

        // Add HIPAA Notes
        aTitle = getTableColumnName("Add<br>HIPAA<br>Notes", "center");
        aCell = aTable.getCell(0, cellNum);
        aCell.setIsHeader(true);
        aCell.add(aTitle);
        aCell.setVAlign("bottom");
        aCell.setAlign("left");
        cellNum++;
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsFirstSubmissionStatusView.java 74
edu/columbia/rascal/presentation/irb/pages/IrbReportClinicalTrialsStatusView.java 76
edu/columbia/rascal/presentation/irb/pages/IrbReportDepartmentStatusView.java 84
            addHeader(getBeginDate(), getEndDate());
            getForm().add(addDate());
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();

            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("rpt1.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows, columns);

        if (!(getPrintable())) {
            CUHtmlTable bTable = getTable(1, 1);
            bTable.setBorderWidth(0);
            bTable.setAlign("center");
            bTable.setWidth("30%");

            CUHtmlPushButton pb1 = new CUHtmlPushButton("BUTTON", "BUTTON", "Return",
                    "parent.frames[2].location='" +
File Line
edu/columbia/rascal/presentation/lab/pages/HzAppendixCreatedView.java 286
edu/columbia/rascal/presentation/lab/pages/HzAppendixNewView.java 271
    }

    /** @see  edu.columbia.rascal.presentation.lab.pages.HzHtmlView#addHzAppendixHeader() */
    @Override public void addHzAppendixHeader() {

        setSubTitle("General Information");
        addFields();
        getForm().add(getHiddenWidgetFor(KEY_PARM_PROTOCOL_ID,
                getProtocol().getId().toString()
                )
            );

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aCell  TODO: DOCUMENT ME!
     */
    public void formatCell(CUHtmlTableCell aCell) {

        aCell.setVAlign("TOP");
        aCell.setAlign("RIGHT");
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aCell  TODO: DOCUMENT ME!
     */
    public void formatDataCell(CUHtmlTableCell aCell) {

        aCell.setVAlign("TOP");
        aCell.setAlign("LEFT");

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aType   TODO: DOCUMENT ME!
     * @param   aName   TODO: DOCUMENT ME!
     * @param   aValue  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getButtonWidgetFor(String aType, String aName, String aValue) {


        CUHtmlPushButton pb = new CUHtmlPushButton(aType, aName, aValue);

        return pb;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aType         TODO: DOCUMENT ME!
     * @param   aName         TODO: DOCUMENT ME!
     * @param   aValue        TODO: DOCUMENT ME!
     * @param   onClickValue  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getButtonWidgetFor(String aType, String aName, String aValue, String onClickValue) {


        CUHtmlPushButton pb = new CUHtmlPushButton(aType, aName, aValue,
                onClickValue
                );

        return pb;
    }

    /**
     * getDeptName.
     *
     * @return  String
     */
    /** @see  edu.columbia.rascal.presentation.lab.pages.HzAppendixCreationView#getDeptName() */
    @Override public String getDeptName() {

        String name = "Department Not Specified";

        try {
            name = ServiceLocator.getRascalDepartmentService().getRascalDepartmentByCode(
                    getDeptNum()
                    ).getName();
        } catch (Exception e) {
            name = "Department Lookup:";
        }

        return name;
    }

    /** @see  edu.columbia.rascal.presentation.lab.pages.HzAppendixCreationView#getDeptNum() */
    @Override public String getDeptNum() {

        return deptNumber;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   someText  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getTextWidgetFor(String someText) {

        CUHtmlText t = new CUHtmlText(someText);
        t.setFontSize("1");
        t.setFontName("Comic Sans MS");

        return t;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   aString  TODO: DOCUMENT ME!
     * @param   size     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getWidgetFor(String aString, String size) {

        CUHtmlText text = new CUHtmlText(aString);

        if (aString.lastIndexOf("http://") >= 0) {
            text.setLink(aString);
        }

        text.setFontSize(size);

        return text;
    }
}
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaResultsDisplayView.java 359
edu/columbia/rascal/presentation/irb/pages/HzAttestationResultDisplayView.java 374
edu/columbia/rascal/presentation/irb/pages/IrbProtocolRascalResultsDisplayView.java 373
edu/columbia/rascal/presentation/irb/pages/IrbProtocolResultsDisplayView.java 490
            next.setLink(location + "?DisplayPage=NextPage");


            next.setIsBold(true);
            next.setFontSize("+1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaMinuteHistoryDateRangeServlet.java 49
edu/columbia/rascal/presentation/irb/servlets/IrbReportHistoryDateRangeServlet.java 59
            return new IrbAgendaMessageView("You are not authorized to view minutes history.");

        }
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     */
    @Override public void submit() {


        String endDate = null;

        if (((endDate = getRequestParameter("endDate")) != null) && !endDate.trim().equals("")) {
            String range = getRequestParameter("range");
            Calendar startDay = CalendarTransformer.toCalendar(endDate);
            Calendar oneMoreDay = CalendarTransformer.toCalendar(endDate);
            oneMoreDay.add(Calendar.DATE, 1);

            if (range.startsWith("Year")) {
                startDay.add(Calendar.MONTH, -12);
            } else if (range.startsWith("Quarter")) {
                startDay.add(Calendar.MONTH, -3);
            } else if (range.startsWith("Month")) {
                startDay.add(Calendar.MONTH, -1);
            } else if (range.startsWith("Week")) {
                startDay.add(Calendar.DATE, -7);
            } else if (range.startsWith("Day")) {
                startDay.add(Calendar.DATE, -1);
            }

            startDay.setLenient(true);

            String beginDate = CalendarTransformer.toString(startDay);
            String endingDate = CalendarTransformer.toString(oneMoreDay);

            if (range.startsWith("to Date")) {
                getSession().setAttribute("beginDate", "");
                getSession().setAttribute("endDate",
                    CalendarTransformer.toString(Calendar.getInstance())
                    );
            } else {
                getSession().setAttribute("beginDate", beginDate);
                getSession().setAttribute("endDate", endingDate);
            }
        }
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixASafetyOfficerApprovalView.java 110
edu/columbia/rascal/presentation/appendix/pages/AppendixBSafetyOfficerApprovalView.java 111
edu/columbia/rascal/presentation/appendix/pages/AppendixCSafetyOfficerApprovalView.java 110
edu/columbia/rascal/presentation/appendix/pages/AppendixESafetyOfficerApprovalView.java 113
edu/columbia/rascal/presentation/appendix/pages/AppendixFSafetyOfficerApprovalView.java 112
edu/columbia/rascal/presentation/appendix/pages/AppendixGSafetyOfficerApprovalView.java 112
        addSpacerRows(aTable, 1, 2, "8");

        if (getOwnerSurrogate().getOwnerType().equals(ANIMAL_CARE_OWNER)) {
            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell(utilGetHtmlText(REC_ANIMAL_HOUSING, defaultFontSize, true,
                        false
                        ), "40%", getTitleAlign()
                    );
            aCell2 = utilGetHtmlTableCell("", "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);

            Iterator bpList = getBoilerPlateList(KEY_PARM_REC_HOUSE_REF_ID).iterator();

            while (bpList.hasNext()) {
                aRow = new CUHtmlTableRow();
                aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
                aCell2 = utilGetHtmlTableCell(bpList.next(), "60%", "left");

                aRow.add(aCell1);
                aRow.add(aCell2);
                aTable.add(aRow);
            }

            aRow = new CUHtmlTableRow();
            aCell1 = utilGetHtmlTableCell("", "40%", getTitleAlign());
            aCell2 = utilGetHtmlTableCell(fieldGet_2_RecommendedHousing("2"), "60%", "left");

            aRow.add(aCell1);
            aRow.add(aCell2);
            aTable.add(aRow);
        }

        String ppeLabel = (getOwnerSurrogate().getSubject().equals("Human")) ? REC_PPE_IRB
                                                                             : REC_PPE_IACUC;
        aRow = new CUHtmlTableRow();
        aCell1 = utilGetHtmlTableCell(utilGetHtmlText(ppeLabel, defaultFontSize, true, false),
                "40%", getTitleAlign()
                );
        aCell2 = utilGetHtmlTableCell("", "60%", "left");

        aRow.add(aCell1);
        aRow.add(aCell2);
        aTable.add(aRow);

        Iterator bpList = getBoilerPlateList(KEY_PARM_REC_PPE_REF_ID).iterator();
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaFormLayoutView.java 400
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderFormLayoutView.java 403
        HipaaQuestionLookup formElement
        ) {

        long questionOid = formElement.getId();
        long parentOid = formElement.getParentQuestionOid();
        CUHtmlTableCell cell;
        Object aWidget;

        // Parent Question or Question with no parent
        aWidget = getEditWidgetFor("sigSequenceNum" + rowCount, formElement.getSequenceNo() + "",
                "2", "2"
                );
        ((CUHtmlEntryField) aWidget).setOnKeyPress("return restrictFieldToNumbers(event)");

        cell = aTable.getCell(rowCount, 0);
        cell.add(aWidget);
        cell.setAlign("center");

        // Child Question
        aWidget = "<img src=\"/images/blank.gif\" border=\"0\">";

        cell = aTable.getCell(rowCount, 1);
        cell.add(aWidget);
        cell.setAlign("center");

        // Question Text
        String questionText = formElement.getQuestionText();

        if (questionText.length() > 200) {
            questionText = questionText.substring(0, 199);
        }

        cell = aTable.getCell(rowCount, 2);
        cell.add(getRowLabelLeftFor(questionText));
        cell.setAlign("left");

        // Question Oid
        String aFormOid = formElement.getId() + "";
        getForm().add(getHiddenWidgetFor("sigHiddenOid" + rowCount, aFormOid));

    }

    /**
     * This method was created in VisualAge.
     *
     * @param  aTable  CUHtmlTable
     */
    public void setSignatureTableHead(CUHtmlTable aTable) {

        CUHtmlText aTitle;
        CUHtmlTableCell header;
        String titles[] = { "Sequence", "<img src=\"/images/blank.gif\" border=\"0\">", "Signature Text" };

        int len = titles.length;

        for (int i = 0; i < len; i++) {
            aTitle = new CUHtmlText(titles[i]);
            aTitle.setFontName(getDefaultFontName());
            aTitle.setFontSize("1");
            aTitle.setIsBold(true);
            header = aTable.getCell(0, i);
            header.add(aTitle);
            header.setAlign("center");
        }

    }
}
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceCreateServlet.java 230
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceRespondServlet.java 285
                sentEmail(leadPerson, correspondence);
            }

            // study coordinator
            Vector<IrbStaff> studyCoordis = header.getStudyCoordinators();
            int studyCoorSize = studyCoordis.size();

            for (int i = 0; i < studyCoorSize; i++) {
                IrbStaff aStudyCor = studyCoordis.elementAt(i);

                if (!aStudyCor.getRid().equals(header.getCreatedBy()) &&
                        !aStudyCor.getRid().equals(Integer.valueOf(leadPerson))
                ) {
                    recipient = new IrbCorrespondenceRecipient();
                    recipient.setIrbCorrespondence(correspondence);
                    recipient.setRecipientRid(aStudyCor.getRid()); // PI
                    recipient.setProtocolRole("Study Coordinator");
                    ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                    correspondence.getIrbCorrespondenceRecipients().add(recipient);
                    sentEmail(aStudyCor.getRid(), correspondence);
                }
            }

            // Regulatory Coordinator
            Vector<IrbStaff> rcCoordis = header.getRegulatoryCoordinators();
            int rcCoorSize = rcCoordis.size();

            for (int i = 0; i < rcCoorSize; i++) {
                IrbStaff aRcCor = rcCoordis.elementAt(i);

                if ((!aRcCor.getRid().equals(header.getCreatedBy())) &&
                        (!aRcCor.getRid().equals(leadPerson))
                ) {
                    recipient = new IrbCorrespondenceRecipient();
                    recipient.setIrbCorrespondence(correspondence);
                    recipient.setRecipientRid(aRcCor.getRid()); // PI
                    recipient.setProtocolRole("Regulatory Coordinator");
                    ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                    correspondence.getIrbCorrespondenceRecipients().add(recipient);
                    sentEmail(aRcCor.getRid(), correspondence);
                }
            }
        } else {
File Line
edu/columbia/rascal/presentation/propTrak/servlets/PtReportDeptServlet.java 79
edu/columbia/rascal/presentation/propTrak/servlets/PtReportDeptServlet.java 131
        	if(columns.contains("FinalizedDate")){row.addElement((res[8] == null)?"":(Date)res[8]);i++;}
        	if(columns.contains("POSignOffDate")){row.addElement((res[9] == null)?"":(Date)res[9]);i++;}
        	if(columns.contains("Title")){row.addElement(res[14]);i++;}
        	if(columns.contains("AbbreviatedTitle")){row.addElement(res[10]);i++;}
        	if(columns.contains("IndirectCost")){row.addElement((res[15] == null)?"":((BigDecimal)res[15]).intValue());i++;}
        	if(columns.contains("DirectCost")){row.addElement((res[16] == null)?"":((BigDecimal)res[16]).intValue());i++;}
        	if(columns.contains("TotalMoneyReq.")){row.addElement((res[12] == null)?"":((BigDecimal)res[12]).intValue());i++;}
        	if(columns.contains("ExpenseType")){row.addElement(res[17]);i++;}
        	if(columns.contains("ForeignInvolvementCountry")){row.addElement(res[18]);i++;}
        	results.addElement(row.clone());
        	row = new Vector(i);        	
        }        

        return results;

    }


    /**
     * TODO: DOCUMENT ME!
     *
     * @param   from        TODO: DOCUMENT ME!
     * @param   to          TODO: DOCUMENT ME!
     * @param   deptNumber  TODO: DOCUMENT ME!
     * @param   columns     TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    @SuppressWarnings({ "unchecked", "rawtypes", "deprecation" })
File Line
edu/columbia/rascal/presentation/tc/views/TCReportDeptSelectionForTestLocationView.java 150
edu/columbia/rascal/presentation/tc/views/TCReportDeptSelectionView.java 220
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public final CUHtmlForm getAForm() {

        return aForm;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlList getDeptNameWidget() {

        Vector<Object> list = new Vector<Object>();
        RascalUser aUser = getRascalUser();
        RascalDepartment dept = null;
        String deptString;

        list.addElement(" ");

        if (CURascalGuardian.hasTcAdministration() || CURascalGuardian.isAuthorized(CURascalGuardianConstants.TC_ACCESS_ALL_DEPT)) {
            Vector<RascalDepartment> allDepts = new Vector<RascalDepartment>(
                    ServiceLocator.getRascalDepartmentService().getListOfAllPossibleDepartments()
                    );
            int allDeptsLen = allDepts.size();

            for (int k = 0; k < allDeptsLen; k++) {
                deptString = "";
                dept = allDepts.elementAt(k);

                if (dept != null) deptString = dept.getId() + " - " + dept.getName();

                list.addElement(deptString);
            }
        } else {
            Vector<RuAuthorizedDepartment> authDepts = aUser.getAuthorizedDepartmentsFor(
                    getRascalUser().getId(), "Tc"
                    );
            RuAuthorizedDepartment authDept;
            String code = null;
            int authDeptsLen = authDepts.size();

            for (int k = 0; k < authDeptsLen; k++) {
                deptString = "";
                authDept = authDepts.elementAt(k);

                if (authDept != null) code = authDept.getDeptCode();

                if (code != null)
                    dept = ServiceLocator.getRascalDepartmentService().getRascalDepartmentByCode(
                            code
                            );

                if (dept != null) deptString = dept.getId() + " - " + dept.getName();

                list.addElement(deptString);
            }
        }

        return getMultiSelectWidgetFor(list, " ", "deptCode");
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getTestLocationWidget() {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixHtmlView.java 849
edu/columbia/rascal/presentation/appendix/pages/AppendixHtmlView.java 940
    public CUHtmlText getLinkToEditAppendix(String text, String appendixOid, String appendixType) {

        String servletName = null;

        switch (appendixType.charAt(0)) {

            case 'A':
                servletName = AppendixAServlet.class.getName();
                break;

            case 'B':
                servletName = AppendixBServlet.class.getName();
                break;

            case 'C':
                servletName = AppendixCServlet.class.getName();
                break;

            case 'D':
                servletName = AppendixDServlet.class.getName();
                break;

            case 'E':
                servletName = AppendixEServlet.class.getName();
                break;

            case 'F':
                servletName = AppendixFServlet.class.getName();
                break;

            case 'G':
                servletName = AppendixGServlet.class.getName();
                break;

            case 'H':
            	break;

            case 'I':
                servletName = AppendixIServlet.class.getName();
                break;
            default:
                return null;
        }

        StringBuffer aBuffer = new StringBuffer(200);

        if ( StringUtils.equals(appendixType, "H") ) {
        	aBuffer.append("/hazMats/radiationSafety/");
        	aBuffer.append(appendixOid);
        	aBuffer.append("/study/general");
            CUHtmlText htmlText;
            htmlText = new CUHtmlText(text);
            htmlText.setLink("Javascript:parent.location='" + aBuffer.toString() + "';");
            htmlText.setFontSize("-2");
            htmlText.setIsBold(false);
            htmlText.setFontName(getDefaultFontName());
            return htmlText;
        } else {
	        aBuffer.append(CURascalStoreParmsToSessionAndRedirectServlet.class.getName());
	        aBuffer.append("?p1Nm=");
	        aBuffer.append(KEY_PARM_APPENDIX_OID);
	        aBuffer.append("&&p1Val=");
	        aBuffer.append(appendixOid);
	        aBuffer.append("&&p2Nm=");
	        aBuffer.append(KEY_PARM_APPENDIX_TYPE);
	        aBuffer.append("&&p2Val=");
	        aBuffer.append(appendixType);
	        aBuffer.append("&&targetServlet=");
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 2983
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4250
        aBuffer.append("' and stat.parentObjectOid = header.oid and header.modificationNumber > 0 ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3074
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3468
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4158
        aBuffer.append("' and stat.parentObjectOid = header.oid and header.modificationNumber > 0 ");
        aBuffer.append("and stat.oid = (select max(oid) from ");
        aBuffer.append("IrbStatus z where header.oid = z.parentObjectOid ");
        aBuffer.append("and z.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and z.statusName in ('");
        aBuffer.append(LOGGED_IN);
        aBuffer.append("' ,'");
        aBuffer.append(RETURNED_TO_CHAIR);
        aBuffer.append("')) and (currentStatus.parentObjectOid = header.oid ");
        aBuffer.append(" and currentStatus.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("' and currentStatus.statusName in ('");
        aBuffer.append(DISTRIBUTED);
        aBuffer.append("', '");
        aBuffer.append(ASSIGNED_TO_MEETING);
        aBuffer.append("' , '");
        aBuffer.append(DEFERRED);
        aBuffer.append("') and currentStatus.oid = (select max(x.oid) ");
        aBuffer.append("from IrbStatus x where x.parentObjectOid = header.oid and ");
        aBuffer.append("x.parentObjectName = '");
        aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
        aBuffer.append("')) order by currentStatus.statusDate DESC");

        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {

                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // eventOid
                row.addElement(res.getString(2));

                if (res.getDate(3) == null) // date reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(3));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(4))).intValue()).toString()); // reviewerOid
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportActiveApprovedProtocolView.java 247
edu/columbia/rascal/presentation/irb/pages/IrbReportInProcessProtocolView.java 241
            );
        getForm().add("</div>");

    }

    /**
     * This method was created in VisualAge.
     *
     * @return  boolean
     */
    public boolean getDownloadable() {
        return downloadable;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   columns  TODO: DOCUMENT ME!
     *
     * @return  Vector
     */
    public Vector getKeywordListForColumns(Vector columns) {

        Vector keyList = new Vector(15);
        keyList.addElement("");

        int colSize = columns.size();

        for (int i = 0; i < colSize; i++) {
            keyList.addElement(columns.elementAt(i));
        }

        return keyList;
    }

    /**
     * getPrintable.
     *
     * @return  getPrintable.
     */
    public boolean getPrintable() {

        return printable;
    }

    /**
     * getPrintable.
     *
     * @return  getPrintable.
     */
    public String getSortBy() {

        if (sortBy == null) sortBy = "";

        return sortBy;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   queueName  protocolOid String
     *
     * @return  String
     */
    public String getUrlToPrintReport(String queueName) {

        return "return openNewSorted(" + '\'' + getServletName() + "'," + "'columnNamesList" + queueName + "', '" + queueName + "'," + "'PtDeptReport', " + "'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600'" + ')';
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   queueName  protocolOid String
     *
     * @return  String
     */
    public String getUrlToViewReportForDownload(String queueName) {

        return "return openNewSortedForDownload(" + '\'' + getServletName() + "'," + "'columnNamesList" + queueName + "', '" + queueName + "'," + "'PtDeptReport', " + "'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600'" + ')';
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aString  TODO: DOCUMENT ME!
     *
     * @return  Object @2000 Copyright Columbia University - RASCAL. All Rights Reserved.
     */
    @Override public Object getWidgetFor(String aString) {

        if (aString == null) aString = "";

        CUHtmlText text = new CUHtmlText(aString);
        text.setFontSize("1");
        text.setFontName("Comic Sans MS");

        if (aString.startsWith("http://") || aString.startsWith("www.")) {
            text.setLink(aString);
        }

        return text;
    }

    /**
     * This method was created in VisualAge.
     *
     * @param  newValue  boolean
     */
    public void setDownloadable(boolean newValue) {
        this.downloadable = newValue;
    }

    /**
     * setPrintable.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setPrintable(boolean aValue) {

        printable = aValue;
    }

    /**
     * setSortBy.
     *
     * @param  aValue  TODO: DOCUMENT ME!
     */
    public void setSortBy(String aValue) {

        sortBy = aValue;
    }
}
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceRespondServlet.java 285
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceRespondServlet.java 404
                            sentEmail(initiator, correspondence);
                        }

                                                
                        //Send to Study Coordinator
                        Vector<IrbStaff> studyCoordis = header.getStudyCoordinators();
                        int studyCoorSize = studyCoordis.size();

                        for (int i = 0; i < studyCoorSize; i++) {
                            IrbStaff aStudyCor = studyCoordis.elementAt(i);

                            if (!aStudyCor.getRid().equals(header.getCreatedBy()) &&
                                    !aStudyCor.getRid().equals(Integer.valueOf(leadPerson))
                            ) {
                                recipient = new IrbCorrespondenceRecipient();
                                recipient.setIrbCorrespondence(correspondence);
                                recipient.setRecipientRid(aStudyCor.getRid());
                                recipient.setProtocolRole("Study Coordinator");
                                ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                                correspondence.getIrbCorrespondenceRecipients().add(recipient);
                                sentEmail(aStudyCor.getRid(), correspondence);
                            }
                        }
                        
                        //Send to Regulatory Coordinator
                        Vector<IrbStaff> rcCoordis = header.getRegulatoryCoordinators();
                        int rcCoorSize = rcCoordis.size();

                        for (int i = 0; i < rcCoorSize; i++) {
                            IrbStaff aRcCor = rcCoordis.elementAt(i);

                            if ((!aRcCor.getRid().equals(header.getCreatedBy())) &&
                                    (!aRcCor.getRid().equals(leadPerson))
                            ) {
                                recipient = new IrbCorrespondenceRecipient();
                                recipient.setIrbCorrespondence(correspondence);
                                recipient.setRecipientRid(aRcCor.getRid());
                                recipient.setProtocolRole("Regulatory Coordinator");
                                ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                                correspondence.getIrbCorrespondenceRecipients().add(recipient);
                                sentEmail(aRcCor.getRid(), correspondence);
                            }
                        }
                    } else {
File Line
edu/columbia/rascal/presentation/lab/pages/HzAppendixHeaderResultsDisplayView.java 366
edu/columbia/rascal/presentation/myRascal/views/MyRascalProposalResultsDisplayView.java 319
                );
            next.setIsBold(true);
            next.setFontSize("1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
}
File Line
edu/columbia/rascal/presentation/tc/views/TCReportAdminByDeptView.java 94
edu/columbia/rascal/presentation/tc/views/TCReportTestRequirementExceptionView.java 87
            if (!(getDownloadable())) {
                addHeader();
                getForm().add(addDate());
                getForm().add("<br>");
            }

            if (!(getPrintable())) {
                aTable = getTable(1, 1);
                aTable.setBorderWidth(0);
                aTable.setAlign("center");
                aTable.setWidth("100%");

                CUHtmlTableRow aRow = new CUHtmlTableRow();
                CUHtmlTableCell aCell1 = new CUHtmlTableCell();
                aCell1.setColumnsToSpan(2);
                aCell1.add(getInstruction(instruction));
                aRow.add(aCell1);
                aTable.add(aRow);

                aRow = new CUHtmlTableRow();
                aCell1 = new CUHtmlTableCell();
                aCell1.add(getSortHeaderForColumnNames(
                        getKeywordListForColumns(new Vector<Object>()), "A", getSortBy()
                        )
                    );
                aCell1.setWidth("70%");
                aCell1.setAlign("center");

                CUHtmlTableCell aCell4 = new CUHtmlTableCell();
                aCell4.add(getHelpFor("rpt1.html"));

                CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                        getUrlToPrintReport("A")
                        );
                CUHtmlTableCell aCell2 = new CUHtmlTableCell();
                aCell2.add(pb);

                pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                        getUrlToViewReportForDownload("A")
                        );

                CUHtmlTableCell aCell3 = new CUHtmlTableCell();
                aCell3.add(pb);

                aRow.add(aCell1);
                aRow.add(aCell4);
                aRow.add(aCell2);
                aRow.add(aCell3);
                aTable.add(aRow);

                getForm().add(aTable);
                getForm().add("<br>");

            }
File Line
edu/columbia/rascal/presentation/consent/pages/ConsentProtocolResultsDisplayView.java 363
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderResultsDisplayView.java 349
edu/columbia/rascal/presentation/myRascal/views/MyRascalProposalResultsDisplayView.java 319
                );
            next.setIsBold(true);
            next.setFontSize("1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceCreateServlet.java 146
edu/columbia/rascal/presentation/irb/servlets/IrbCorrespondenceRespondServlet.java 285
	                    sentEmail(leadPerson, correspondence);
                    }
 
                    //Send to Study Coordinator
                    
                    Vector<IrbStaff> studyCoordis = header.getStudyCoordinators();
                    int studyCoorSize = studyCoordis.size();

                    for (int i = 0; i < studyCoorSize; i++) {
                        IrbStaff aStudyCor = studyCoordis.elementAt(i);

                        if (!aStudyCor.getRid().equals(header.getCreatedBy()) &&
                                !aStudyCor.getRid().equals(Integer.valueOf(leadPerson))
                        ) {
                            recipient = new IrbCorrespondenceRecipient();
                            recipient.setIrbCorrespondence(correspondence);
                            recipient.setRecipientRid(aStudyCor.getRid());
                            recipient.setProtocolRole("Study Coordinator");
                            ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                            correspondence.getIrbCorrespondenceRecipients().add(recipient);
                            sentEmail(aStudyCor.getRid(), correspondence);
                        }
                    }

                    //Send to Regulatory Coordinator
                    
                    Vector<IrbStaff> rcCoordis = header.getRegulatoryCoordinators();
                    int rcCoorSize = rcCoordis.size();

                    for (int i = 0; i < rcCoorSize; i++) {
                        IrbStaff aRcCor = rcCoordis.elementAt(i);

                        if ((!aRcCor.getRid().equals(header.getCreatedBy())) &&
                                (!aRcCor.getRid().equals(leadPerson))
                        ) {
                            recipient = new IrbCorrespondenceRecipient();
                            recipient.setIrbCorrespondence(correspondence);
                            recipient.setRecipientRid(aRcCor.getRid());
                            recipient.setProtocolRole("Regulatory Coordinator");
                            ServiceLocator.getIrbCorrespondenceRecipientService().save(recipient);
                            correspondence.getIrbCorrespondenceRecipients().add(recipient);
                            sentEmail(aRcCor.getRid(), correspondence);
                        }
                    }                    
                }
File Line
edu/columbia/rascal/presentation/appendix/servlets/AppendixAServlet.java 147
edu/columbia/rascal/presentation/appendix/servlets/AppendixIServlet.java 122
                anAppendix = (AppendixA) getAppendix();
            }

            // the logic to handle the creation of invitro header. see
            // getRedirectUrl() for the deletion of invitro header
            if (isInvitroChecked()) { /* Retreives if Tracking object exists
                                       * else a new one is created and linked
                                       * here itself */

                AppendixTracking aTracker = getInvitroAppendixTrackingOidFor(anAppendix);
            }

            saveAppendixValues(anAppendix);

            boolean hasAccessForCreator = false;
            Vector res = ServiceLocator.getAppendixAccessControlService().getAllByAppendixIdAndType(
                    anAppendix.getId(), anAppendix.getAppendixType()
                    );
            int siz = res.size();

            for (int i = 0; i < siz; i++) {
                AppendixAccessControl ac = (AppendixAccessControl) res.elementAt(i);

                if ((ac.getRid() != null) &&
                        (ac.getRid().intValue() == anAppendix.getCreatedBy().intValue())
                ) {
                    hasAccessForCreator = true;

                    break;
                }
            }

            // make sure there is an 'edit' access control for creator
            if (!hasAccessForCreator) {
                AppendixAccessControl newAc = new AppendixAccessControl(anAppendix.getId(),
                        anAppendix.getAppendixType()
                        );
                ServiceLocator.getAppendixAccessControlService().save(newAc);
                newAc.setRid(anAppendix.getCreatedBy());
                newAc.setEditView(ACCESS_EDIT);
                ServiceLocator.getAppendixAccessControlService().save(newAc);
// anAppendix.getAllAccessControlEntries().addElement(newAc);
            }
        } catch (Exception e) {
            log.error("Exception creating appendix.", e);
        }
    }

    /** @see  edu.columbia.rascal.presentation.common.CURascalServlet#getRedirectUrl() */
    @Override protected String getRedirectUrl() {

        // if the check box for invitro is unchecked, show warning message
        // about deleting the invitro header
        if (!isInvitroChecked()) {
            String invitroAppendixTrackerOid = null;
            invitroAppendixTrackerOid = retreiveInvitroAppendixTrackingOidFor(
                    getAppendix()
                    );

            if (!isEmpty(invitroAppendixTrackerOid)) {
                return AppendixMessageServlet.class.getName() + "?" +
                    KEY_PARM_INVITRO_DELETE_REQUEST + "=true&&" +
                    KEY_PARM_INVITRO_APPDX_TRACKER_OID + "=" + invitroAppendixTrackerOid + "&&" +
                    KEY_PARM_INVITRO_APPDX_TYPE + "=" + getAppendix().getAppendixType();
            }
        }

        return AppendixAServlet.class.getName();
File Line
edu/columbia/rascal/presentation/appendix/servlets/AppendixIContrSubsEntryServlet.java 66
edu/columbia/rascal/presentation/appendix/servlets/AppendixLocationEntryServlet.java 94
    }


    /**
     * This method was created in VisualAge. @2002 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     */
    public void saveLocationValues() {

        String building = "";
        String floor = null;
        String room = null;
        String type = null;

        String ownerOid = getRequestParameter("OwnerOid");
        String ownerType = getRequestParameter("OwnerType");

        floor = getRequestParameter("floor");
        room = getRequestParameter("room");
        type = getRequestParameter("locationType");

        // translate 2 display values to their stored values
        if (type.equals(LOCATION_TYPE_LAB_USE_DISPLAY)) {
            type = LOCATION_TYPE_LAB_USE;
        } else if (type.equals(LOCATION_TYPE_SUBJECT_USE_DISPLAY)) {
            type = LOCATION_TYPE_SUBJECT_USE;
        }

        building = getRequestParameter("otherBuilding");

        if ((building == null) || isEmpty(building)) {
            building = getRequestParameter("appendixBuilding");

            if (building.contains("~")) {
                building = "";
            }
        }

        try {
            AppendixLocation locus = getCurrentLocation();

            if (locus == null) {

                if ((ownerOid != null) && (ownerType != null)) {
                    locus = new AppendixLocation(Long.parseLong(ownerOid), ownerType);
                    ServiceLocator.getAppendixLocationService().save(locus);

                } else {
                    AppendixMessageView aPage = new AppendixMessageView(
                            "Location owner not specified."
                            );
                    aPage.draw(getResponse());

                    return;
                }
            }

            locus = ServiceLocator.getAppendixLocationService().save(locus);
            locus.setLocationType(type);
            locus.setBuilding(building);
            locus.setFloor(floor);
            locus.setRoom(room);
            ServiceLocator.getAppendixLocationService().save(locus);
        } catch (Exception e) {
            log.error("Exception updating appendix location.", e);
        }
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     */
    @Override public void submit() {

        setIsEdit(true);

        String ownerId = getRequestParameter("ownerId");
File Line
edu/columbia/rascal/presentation/administration/views/AdminHtmlView.java 834
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 1311
            String key = (String) e.nextElement();
            String value = (String) params.get(key);

            getForm().add(new CUHtmlHiddenField(key, value));
        }
    }

    /**
     * This method was created in VisualAge. Sets the mainTitle of this page. If aMainTitle is a
     * String, use the default mainTitle settings. if aMainTitle is CUHtmlText, override the default
     * mainTitle settings.
     *
     * @param  aMainTitle  TODO: DOCUMENT ME!
     */
    public void setMainTitle(Object aMainTitle) {

        if (aMainTitle instanceof CUHtmlText) {
            mainTitle = (CUHtmlText) aMainTitle;
        } else {

            if (aMainTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aMainTitle);
                aText.setFontSize("+2");
                aText.setIsBold(true);
                aText.setAlignment("left");
                aText.setFontName(getDefaultFontName());
                mainTitle = aText;

                // Set also the title of the page to same.
                setTitle((String) aMainTitle);
            }
        }
    }

    /**
     * This method was created in VisualAge. Sets the note of this page. If aNote is a String, use
     * the default note settings. if aNote is CUHtmlText, override the default note settings.
     *
     * @param  aNote  TODO: DOCUMENT ME!
     */
    public void setNote(Object aNote) {

        if (aNote instanceof CUHtmlText) {
            note = (CUHtmlText) aNote;
        } else {

            if (aNote instanceof String) {
                CUHtmlMultiLineText aText = new CUHtmlMultiLineText((String) aNote);
                aText.setFontName(getDefaultFontName());
                aText.setMaxChar(600);
                aText.setIsBold(false);
                aText.setIsItalic(true);
                aText.addBreaks(3);
                note = aText;
            }
        }
    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  newValue  edu.columbia.rascal.presentation.user.business.objects.RascalUser
     */
    public void setRascalUser(RascalUser newValue) {
        this.rascalUser = newValue;
    }

    /**
     * This method was created in VisualAge. Sets the subtitle of this page. If aSubTitle is a
     * String, use the default subtitle settings. if aSubTitle is CUHtmlText, override the default
     * title settings.
     *
     * @param  aSubTitle  TODO: DOCUMENT ME!
     */
    public void setSubTitle(Object aSubTitle) {

        if (aSubTitle instanceof CUHtmlText) {
            subTitle = (CUHtmlText) aSubTitle;
        } else {

            if (aSubTitle instanceof String) {
                CUHtmlText aText = new CUHtmlText((String) aSubTitle);
                aText.setFontSize("+2");
                aText.setAlignment("center");
                aText.setFontName(getDefaultFontName());
                subTitle = aText;
            }
        }
    }
File Line
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaEventSearchServlet.java 126
edu/columbia/rascal/presentation/agenda/servlets/IrbAgendaSearchServlet.java 158
        String query;

        String pageInfoKeyword = (String) keywords.get("IrbAgendaSearchDisplayPageInfo");
        String pagesCacheKeyword = (String) keywords.get("IrbAgendaSearchDisplayPagesCached");

        try {
            srchParams = buildSearchParams(this);
            getSession().setAttribute("searchParameters", srchParams);
        } catch (edu.columbia.rascal.presentation.common.parser.CURascalParseException e) {
            handleException(e);

            return;
        }

        if (srchParams == null) {
            CURascalDisplayPageInfo emptyPageInfo = new CURascalDisplayPageInfo();
            CURascalDisplayPagesCached emptyPagesCached = new CURascalDisplayPagesCached();
            getSession().setAttribute(pageInfoKeyword, emptyPageInfo);
            getSession().setAttribute(pagesCacheKeyword, emptyPagesCached);
        } else {
            query = buildSearchQuery(srchParams);

            jdbcAccessor = IrbAgendaDocumentSearchJdbcAccessor.getInstance(this);

            String procRsltMethodNm = getProcessResultSetMethod();
            pageController = CURascalDisplayPageJdbcController.getInstance(this, jdbcAccessor,
                    pageInfoKeyword, pagesCacheKeyword, procRsltMethodNm
                    );

            int cacheMode = getCacheMode();
            int cacheSize = getCacheSize();
            int maxPageSize = getMaxPageSize();
            pageInfo = pageController.buildFirstPageInfo(query, cacheMode, cacheSize, maxPageSize);
        }

        if ((pageInfo != null) && (!pageInfo.isEmpty())) {
            view = new IrbAgendaResultsDisplayView(pageInfo.getDisplayPage(),
                    pageInfo.getPageBeginPos(), pageInfo.getPageSize(), pageInfo.getTotalMatch(),
                    pageInfo.getMaxPageSize(), getUser(), "Agenda"
                    );
        } else {
            view = new IrbAgendaResultsDisplayView(new java.util.Vector(), getUser());
        }

        view.draw(getResponse());

    }

    /**
     * Builds the PtDocSearchParameters.
     *
     * @param   servlet  edu.columbia.rascal.presentation.fo.alertService.servlets.FoasDocumentSearchServlet
     *
     * @return  edu.columbia.rascal.presentation.fo.alertService.auxiliary.objects.FoasDocSearchParameters
     *
     * @throws  edu.columbia.rascal.presentation.common.parser.CURascalParseException  TODO: DOCUMENT ME!
     */
    protected IrbAgendaSearchParameters buildSearchParams(IrbAgendaEventSearchServlet servlet)
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaMinuteHistoryDateRangeView.java 95
edu/columbia/rascal/presentation/agenda/pages/IrbMinuteSearchDateRangeView.java 102
        getAForm().add(getHiddenWidgetFor("dateValid", "true"));

        add(aForm);

    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {
        String endDate = CalendarTransformer.toString(Calendar.getInstance());

        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        aTable.setCellSpacing(15);
        aTable.addRowFor(columns);

        int row = aTable.elements.size();
        Object aWidget;

        aWidget = getReportRangeWidget();
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Select Range:"));
        row++;


        columns.setElementAt(getDateTable(endDate, "endDate", "endDateMonth", "endDateDay",
                "endDateYear"
                ), 1
            );
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Ending On:"));
        row++;


    }


    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public String getAction() {
        return action;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Submit",
                    "checkDateForSubmit(endDate);return isDateValid()"
                    );
            CUHtmlTableCell aCell = aTable.getCell(0, 0);
            aCell.add(pb1);
        }


        return aTable;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public final CUHtmlForm getAForm() {
        return aForm;
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public Object getReportRangeWidget() {
        EVector list = new EVector();
        list.addElement("Day");
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixHtmlView.java 2074
edu/columbia/rascal/presentation/appendix/servlets/AppendixAbstractServlet.java 1268
    }

    /**
     * Insert the method's description here. Creation date: (1/26/2006 5:19:02 PM)
     *
     * @param   anAppendix  java.lang.Object
     *
     * @return  java.lang.String
     */


    public String retreiveInvitroAppendixTrackingOidFor(AbstractAppendix anAppendix) {

        String appendixTrackerOid = null;
        AppendixA appendixA = null;
        AppendixB appendixB = null;
        AppendixC appendixC = null;
        AppendixE appendixE = null;
        AppendixI appendixI = null;

        try {

            if (anAppendix.getAppendixType().equalsIgnoreCase(APPENDIX_LETTER_A)) { // gets the tracker object if any appendix headers are associated with this appendix
                appendixA = (AppendixA) anAppendix;
                appendixTrackerOid = ServiceLocator.getAppendixService()
                    .getInvitroAppendixTrackingOid(appendixA.getId(), appendixA.getAppendixType(),
                        HAZMAT_HEADER_OWNER
                        );
            } else if (anAppendix.getAppendixType().equalsIgnoreCase(APPENDIX_LETTER_B)) {
                appendixB = (AppendixB) anAppendix;
                appendixTrackerOid = ServiceLocator.getAppendixService()
                    .getInvitroAppendixTrackingOid(appendixB.getId(), appendixB.getAppendixType(),
                        HAZMAT_HEADER_OWNER
                        );
            } else if (anAppendix.getAppendixType().equalsIgnoreCase(APPENDIX_LETTER_C)) {
                appendixC = (AppendixC) anAppendix;
                appendixTrackerOid = ServiceLocator.getAppendixService()
                    .getInvitroAppendixTrackingOid(appendixC.getId(), appendixC.getAppendixType(),
                        HAZMAT_HEADER_OWNER
                        );
            } else if (anAppendix.getAppendixType().equalsIgnoreCase(APPENDIX_LETTER_E)) {
            	appendixE = (AppendixE) anAppendix;
	              appendixTrackerOid = ServiceLocator.getAppendixService()
	                  .getInvitroAppendixTrackingOid(appendixE.getId(), appendixE.getAppendixType(),
	                      HAZMAT_HEADER_OWNER
	                      );
	       }  else if (anAppendix.getAppendixType().equalsIgnoreCase(APPENDIX_LETTER_I)) {
                appendixI = (AppendixI) anAppendix;
                  appendixTrackerOid = ServiceLocator.getAppendixService()
                      .getInvitroAppendixTrackingOid(appendixI.getId(), appendixI.getAppendixType(),
                          HAZMAT_HEADER_OWNER
                          );
           }

        } catch (Exception e) {
            log.error("Problem Retreiving Invitro Appendix Tracking Object for Appendix: " +
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3801
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 3935
        Vector row = new Vector(7);
        String modify = "";
        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {


            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                modify = res.getInt(4) + "";

                if (res.getInt(4) < 10) modify = "0" + modify;

                row.addElement(res.getString(2) + " (Y" + res.getInt(3) + " M" + modify + ")"); // protocol number
                row.addElement(res.getString(5));                                               // protocol title

                if (res.getDate(6) == null) // date submitted
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(6));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(7))).intValue()).toString()); // protocol parent

                if (res.getDate(8) == null) // date Reviewed
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(8));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(9))).intValue()).toString()); // reviewed Oid
                row.addElement(res.getString(10));
                row.addElement(res.getString(11));                                                   // PIName
File Line
edu/columbia/rascal/presentation/irb/pages/IrbApprovalEntryView.java 63
edu/columbia/rascal/presentation/irb/pages/IrbDepartmentApprovalEntryView.java 39
    public void addFields() {

        // set the number of cells in the table here:
        // (all "addRow" methods should be set up for this
        // number of cells per row)
        int numCells = 4;

        CUHtmlForm aForm = getAForm();

        // Create the overall table for the page:
        CUHtmlTable aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);

        // Add general fields:
        addGeneralRows(aTable, numCells);

        if (anOid == null)
            addEdit = "Add";
        else
            addEdit = "Edit";

        aForm.add(getHiddenWidgetFor("hiddenAddEdit", addEdit));
        aForm.add(getHiddenWidgetFor("hiddenOid", anOid));
        aTable.getCell(0, 0).setWidth("40%");


        aForm.add(aTable);
        aForm.add(performMethod("getActionButtons", null));

        add(aForm);

    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  aTable    TODO: DOCUMENT ME!
     * @param  numCells  TODO: DOCUMENT ME!
     */
    public void addGeneralRows(CUHtmlTable aTable, int numCells) {

        Vector columns = new Vector(numCells);

        for (int c = 0; c < numCells; c++) {
            columns.addElement("");
        }

        int row = aTable.elements.size();
        Object aWidget;


        // Uni
        aWidget = getEditWidgetFor("rascalUni", "", "15", "15");
        columns.setElementAt(aWidget, 1);


        columns.setElementAt(getWidgetFor("UNI Lookup"), 2);
        columns.setElementAt(getUniLookup(), 3);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Enter UNI"));
        row++;
        columns.setElementAt(null, 2); // clear the element
        columns.setElementAt(null, 3); // clear the element

        // Participant type
        aWidget = getApprovalRoleWidget();
        columns.setElementAt(aWidget, 1);

        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("What is this person's role"));
        row++;

    }
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportCurrentActivityStatusView.java 122
edu/columbia/rascal/presentation/irb/pages/IrbReportCurrentActivityStatusView.java 288
            addHeader(uni, reportType, statusList);
            getForm().add(addDate());
            getForm().add("<br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("left");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("irb205.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows, true);
        getForm().add("<br>");


        if (!(getPrintable())) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportCommitteeOverallStats2View.java 293
edu/columbia/rascal/presentation/irb/pages/IrbReportOverallCommStatsAfterLogInView.java 349
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyName, -2, false));
        aCell.setAlign("center");
        aCell.setVAlign("top");
        aRow.add(aCell);

        keyText = "The average number of days the PI has custody of the event from first " +
            "submission (regardless of date) to approval within specified date range.";
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(keyText, -2, false));
        aCell.setAlign("left");
        aCell.setVAlign("top");
        aRow.add(aCell);

        aTable.add(aRow);

        aTable.getCell(0, 0).setWidth("5%");
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  results  TODO: DOCUMENT ME!
     * @param  aTable   TODO: DOCUMENT ME!
     */
    public void getReportPart1Widget(Vector results, CUHtmlTable aTable) {

        CUHtmlTableRow aRow = new CUHtmlTableRow();
        CUHtmlTableCell aCell = new CUHtmlTableCell();


        String aTitle;
        CUHtmlTableCell header;
        String avgValue = null;
        CUHtmlText blank = new CUHtmlText("<img src=\"/images/blank.gif\" border=\"0\">");
        int counter = 0;

        Vector columns = getColumns();
        int colSize = columns.size();

        // add super column labels
        aCell = new CUHtmlTableCell();
        aCell.add(blank);
        aRow.add(aCell);

        aCell = new CUHtmlTableCell();
        aCell.add(blank);
        aRow.add(aCell);

        aCell = new CUHtmlTableCell();
        aCell.add(blank);
        aRow.add(aCell);

        aCell = new CUHtmlTableCell();
        aCell.add(blank);
        aRow.add(aCell);

        aTitle = ("Average Elapsed Days");
        aCell = new CUHtmlTableCell();
        aCell.add(getTextWidgetFor(aTitle, 1, false));
        aCell.setAlign("center");
        aCell.setVAlign("bottom");
        aCell.setColumnsToSpan(3);
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbReportQuery.java 348
edu/columbia/rascal/presentation/irb/jdbc/IrbReportQuery.java 469
    public static Vector buildCurrentActivityReportResult(java.sql.ResultSet res, String name) {

        Vector results = new Vector();
        Hashtable row = new Hashtable();
        int protocalyear = 0;
        int modificationNumber = 0;

        try {

            if (name.equals(IrbNameConstants.PROTOCOL_HEADER)) {

                while (res.next()) {
                    protocalyear = res.getInt(4);
                    modificationNumber = res.getInt(5);

                    if ((protocalyear == 1) && (modificationNumber == 0)) {
                        row.put("EventName", "Protocol");
                    } else if (modificationNumber > 0) {
                        row.put("EventName", "Modification");
                    } else if ((protocalyear > 1) && (modificationNumber == 0)) {
                        row.put("EventName", "Renewal");
                    }

                    row.put("EventOid",
                        Integer.valueOf((new Float(res.getFloat(2))).intValue()).toString()
                        );
                    row.put("ProtocolNumber", "IRB-" + res.getString(3));
                    row.put("ProtocolOid",
                        Integer.valueOf((new Float(res.getFloat(6))).intValue()).toString()
                        );
                    row.put("PI", res.getString(7));
                    row.put("Committee", res.getString(8));
                    row.put("DateAssigned", res.getDate(9));
                    row.put("CurrentStatus", res.getString(10));
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 1038
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 5834
        aBuffer.append(IrbNameConstants.ADVERSE_EVENT);
        aBuffer.append("') AND (b.parentObjectOid = a.oid and b.parentObjectName = 'Protocol') ");
        aBuffer.append("and b.committeeId = h.oid and a.administrativeLocationId ");
        aBuffer.append(getLogInAdminLocationStringFor(whoAmI));
        aBuffer.append(" Order by e.statusDate ");


        CURascalJdbcAccessorService acc = ServiceLocator.getCURascalJdbcAccessorService();

        try {
            java.sql.ResultSet res = acc.executeQuery(aBuffer.toString());

            while (res.next()) {
                row.addElement(Integer.valueOf((new Float(res.getFloat(1))).intValue()).toString()); // oid
                row.addElement(res.getString(2));                                                    // protocol number
                row.addElement(res.getString(4));                                                    // subjectIdentifier
                row.addElement(res.getString(3));                                                    // responsible person

                if (res.getDate(5) == null) // date submitted
                {
                    row.addElement("");
                } else {
                    row.addElement(res.getDate(5));
                }

                row.addElement(Integer.valueOf((new Float(res.getFloat(6))).intValue()).toString()); // protocol parent oid
                row.addElement(res.getString(7));                                                    // committee name
                row.addElement(res.getString(8));                                                    // times in
                row.addElement(res.getString(9));                                                    // original Dept code
                row.addElement("");
                results.addElement(row.clone());
                row = new Vector(10);
            }

        } catch (Exception e) {
            log.error("Exception while Running query", e);
        }

        return results;
    }

    /**
     * RASCAL (halayn) Creation date: (7/26/2002 14:53:52 PM)
     *
     * @param   whoAmI        TODO: DOCUMENT ME!
     * @param   reviewerType  TODO: DOCUMENT ME!
     *
     * @return  Vector of results
     */

    public static Vector getAdverseEventForReviewerQueue(RascalUser whoAmI, String reviewerType) {
File Line
edu/columbia/rascal/presentation/appendix/jdbc/AppendixWorkListQueryFormat.java 2823
edu/columbia/rascal/presentation/appendix/jdbc/AppendixWorkListQueryFormat.java 2931
        StringBuilder selectionList = new StringBuilder(300);

        selectionList.append(" iph.oid,");                      // 1
        selectionList.append(" iph.protocolNumber,");           // 2
        selectionList.append(" iph.protocolYear,");             // 3
        selectionList.append(" iph.modificationNumber,");       // 4
        selectionList.append(" iph.submitDate,");               // 5
        selectionList.append(" usr.name_first,");               // 6
        selectionList.append(" usr.name_last,");                // 7
        selectionList.append(" usr.user_id,");                  // 8
        selectionList.append(" iph.speciesName,");              // 9
        selectionList.append(" iph.protocolType,");             // 10
        selectionList.append(" iph.primarySite,");              // 11
        selectionList.append(" iph.currentStatus,");            // 12
        selectionList.append(" iph.painCategory1,");            // 13
        selectionList.append(" iph.painCategory2,");            // 14
        selectionList.append(" iph.painCategory3,");            // 15
        selectionList.append(" iph.painCategory4,");            // 16
        selectionList.append(" iph.dnaRequired,");              // 17 appendix A
        selectionList.append(" iph.infectiousAgentsRequired,"); // 18 appendix B
        selectionList.append(" iph.humanBloodRequired,");       // 19 appendix C
        selectionList.append(" iph.laserRequired,");            // 20 appendix D
        selectionList.append(" iph.chemicalsRequired,");        // 21 appendix E
        selectionList.append(" iph.radioIsotopesRequired,");    // 22 appendix F
        selectionList.append(" iph.humanCellLinesRequired,");   // 23 strong radio frequency
                                                                // required
        selectionList.append(" iph.xrayRequired");              // 24

        // construct the FROM statement and begin the WHERE statement
        StringBuilder fromWhere1 = new StringBuilder(300);
        fromWhere1.append(" FROM IacucProtocolHeader iph,");
        fromWhere1.append(" IacucStaff staff,");
        fromWhere1.append(" RASCAL_USER usr");
        fromWhere1.append(" WHERE");
        fromWhere1.append(" iph.currentStatus in('Hold', '" + KEY_ACTION_DISTRIBUTE + "','" +
            KEY_ACTION_REQ_FULL_REVIEW + "','" + KEY_ACTION_REJECT + "','" + KEY_ACTION_PREAPPROVE +
            "')"
            );

        // construct WHERE statement after the first variable
        StringBuilder fromWhere2 = new StringBuilder(300);
        fromWhere2.append(" AND exists (Select tracker.oid");
        fromWhere2.append(" FROM AppendixTracking tracker");
        fromWhere2.append(" WHERE iph.oid = tracker.ownerOid");

        fromWhere2.append(" AND '");
        fromWhere2.append(ANIMAL_CARE_OWNER);
        fromWhere2.append("' = tracker.ownerType");

        // construct the remainder of the WHERE statement after the second variable
        StringBuilder moreWhere = new StringBuilder(300);
        moreWhere.append(" = tracker.appendixType");
        moreWhere.append(" AND NOT EXISTS (SELECT * ");
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaReportByProtocolNumberView.java 87
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaReportDetailView.java 80
            addHeader("IRB-" + protocolNumber.toUpperCase());
            getForm().add(addDate());
            getForm().add("<br><br>");
        }

        if (!(getPrintable())) {
            CUHtmlTable aTable = getTable(1, 1);
            aTable.setBorderWidth(0);
            aTable.setAlign("center");
            aTable.setWidth("100%");

            CUHtmlTableRow aRow = new CUHtmlTableRow();
            CUHtmlTableCell aCell1 = new CUHtmlTableCell();
            aCell1.setColumnsToSpan(2);
            aCell1.add(" ");
            aRow.add(aCell1);
            aTable.add(aRow);

            aRow = new CUHtmlTableRow();
            aCell1 = new CUHtmlTableCell();
            aCell1.add(getSortHeaderForColumnNames(getKeywordListForColumns(columns), "A",
                    getSortBy()
                    )
                );
            aCell1.setWidth("70%");
            aCell1.setAlign("center");

            CUHtmlTableCell aCell4 = new CUHtmlTableCell();
            aCell4.add(getReportHelpFor("irb205.html"));

            CUHtmlPushButton pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Printable Form",
                    getUrlToPrintReport("A")
                    );
            CUHtmlTableCell aCell2 = new CUHtmlTableCell();
            aCell2.add(pb);

            pb = new CUHtmlPushButton("BUTTON", "BUTTON", "Downloadable Form",
                    getUrlToViewReportForDownload("A")
                    );

            CUHtmlTableCell aCell3 = new CUHtmlTableCell();
            aCell3.add(pb);

            aRow.add(aCell1);
            aRow.add(aCell4);
            aRow.add(aCell2);
            aRow.add(aCell3);
            aTable.add(aRow);

            getForm().add(aTable);
            getForm().add("<br>");

        }

        addGeneralInformation(rows);
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaResultsDisplayView.java 363
edu/columbia/rascal/presentation/lab/pages/HzAppendixHeaderResultsDisplayView.java 368
edu/columbia/rascal/presentation/myRascal/views/MyRascalProposalResultsDisplayView.java 321
            next.setFontSize("+1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
}
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaResultsDisplayView.java 363
edu/columbia/rascal/presentation/consent/pages/ConsentProtocolResultsDisplayView.java 365
edu/columbia/rascal/presentation/hipaa/pages/HipaaHeaderResultsDisplayView.java 351
edu/columbia/rascal/presentation/irb/pages/HzAttestationResultDisplayView.java 376
edu/columbia/rascal/presentation/irb/pages/IrbProtocolRascalResultsDisplayView.java 377
edu/columbia/rascal/presentation/irb/pages/IrbProtocolResultsDisplayView.java 492
edu/columbia/rascal/presentation/lab/pages/HzAppendixHeaderResultsDisplayView.java 368
edu/columbia/rascal/presentation/myRascal/views/MyRascalProposalResultsDisplayView.java 321
            next.setFontSize("+1");
            next.setFontName("Comic Sans MS");
            next.setFgColor("black");

            // next.setAlignment("RIGHT");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        } else { // Add the empty control to display the previous page
            next = new CUHtmlText("");
            pageControlRow.addElement(next);

            // Will be changed to add a hobo button with the right arrow
            String rightButton = "";
            pageControlRow.addElement(rightButton);
        }

        // Add the space in the right end
        pageControlRow.addElement("");

        // Add the pageControlRow to aTable
        aTable.addRowFor((Vector) pageControlRow.clone());

        // Set the width and alignment of each cell in the pageControlRow
        aTable.setBorderWidth(0);
        aTable.getCell(0, 0).setWidth("4%");  // space
        aTable.getCell(0, 0).setAlign("CENTER");
        aTable.getCell(0, 1).setWidth("10%"); // left arrow
        aTable.getCell(0, 1).setAlign("RIGHT");
        aTable.getCell(0, 2).setWidth("30%"); // prev page
        aTable.getCell(0, 2).setAlign("RIGHT");
        aTable.getCell(0, 3).setWidth("2%");  // space
        aTable.getCell(0, 3).setAlign("CENTER");
        aTable.getCell(0, 4).setWidth("30%"); // next page
        aTable.getCell(0, 4).setAlign("LEFT%");
        aTable.getCell(0, 5).setWidth("10%"); // right arrow
        aTable.getCell(0, 5).setAlign("LEFT%");
        aTable.getCell(0, 6).setWidth("4%");  // space
        aTable.getCell(0, 6).setAlign("CENTER");

        return aTable;
    }
File Line
edu/columbia/rascal/presentation/controller/iacuc/IacucFileUploadController.java 146
edu/columbia/rascal/presentation/controller/iacuc/IacucFileUploadInternalController.java 139
		return new ModelAndView("iacuc/attachment/update", "attachment", attachment);

	}

	/**
	 * This method is used to download the IacucExternal Attachment document
	 * 
	 * @param anOid Attachment document primary id
	 * @param request of type HttpServletRequest
	 * @param response of type HttpServletResponse
	 * @return ModelAndView
	 * @throws Exception
	 */
	@RequestMapping(value = "retrieve", method = RequestMethod.GET)
	public ModelAndView handleRequest(@RequestParam long anOid, HttpServletRequest request, HttpServletResponse response)
			throws Exception {

		final IacucAttachment attachment = iacucAttachmentService.findById(anOid);
		try {

			if (attachment != null) {

				final String filename = attachment.getFileName();
				final InputStream content = attachment.getBlob().getBinaryStream();
				response.setContentType(attachment.getContentType());
				response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
				FileCopyUtils.copy(content, response.getOutputStream());
				response.getOutputStream().flush();
				response.getOutputStream().close();

				return null;

			}
		} catch (final Exception e) {
			log.error("Exception while retrieving attachment.", e);
		}

		return new ModelAndView("updateFailed");
	}

	/**
	 * This is spring specific initBinder method to set allowedFields on IacucAttachment document page.
	 * 
	 * @param dataBinder of type ServletRequestBinder
	 */
	@InitBinder("attachment")
	public void initBinder(ServletRequestDataBinder dataBinder) {
		dataBinder.setAllowedFields(new String[] { "oid", "documentIdentifier", "dateCreated", "fileName" });
	}

	/**
	 * Page specific exception handler for resource not found scenario
	 * 
	 * @param t of type Throwable
	 * @return String
	 */
	@ExceptionHandler(ResourceNotFoundException.class)
	public String notFoundException(Throwable t) {
		return "updateFailed";
	}

	/**
	 * This method updates the IacucAttachment document.
	 * 
	 * @param attachment of type IacucAttachment
	 * @param result of type BindingResult
	 * @param model of type ModelMap
	 * @param anOid IacucAttachment primary id
	 * @return String
	 * @throws IOException
	 */
	@RequestMapping(value = "edit", method = RequestMethod.PUT)
	public String update(@RequestParam long anOid, @ModelAttribute("attachment") @Valid IacucAttachment attachment,
			BindingResult result, ModelMap model) throws IOException {

		if (result.hasErrors()) {
			model.addAttribute("attachment", attachment);

			return "iacuc/attachment/update";
File Line
edu/columbia/rascal/presentation/hipaa/pages/HipaaHtmlView.java 427
edu/columbia/rascal/presentation/propTrak/pages/PtHtmlView.java 361
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 255
        Vector list = new Vector();
        list.addElement("");
        list.addElement("01");
        list.addElement("02");
        list.addElement("03");
        list.addElement("04");
        list.addElement("05");
        list.addElement("06");
        list.addElement("07");
        list.addElement("08");
        list.addElement("09");
        list.addElement("10");
        list.addElement("11");
        list.addElement("12");
        list.addElement("13");
        list.addElement("14");
        list.addElement("15");
        list.addElement("16");
        list.addElement("17");
        list.addElement("18");
        list.addElement("19");
        list.addElement("20");
        list.addElement("21");
        list.addElement("22");
        list.addElement("23");
        list.addElement("24");
        list.addElement("25");
        list.addElement("26");
        list.addElement("27");
        list.addElement("28");
        list.addElement("29");
        list.addElement("30");
        list.addElement("31");

        getLabel(fieldName);

        return getSingleSelectWidgetFor(list, dayIndex);
    }

    /**
     * This method was created in VisualAge.
     *
     * @param   aInputName  java.lang.String
     * @param   aValue      java.lang.String
     * @param   size        TODO: DOCUMENT ME!
     *
     * @return  CUHtmlTextEntry
     */
    public Object getEditWidgetFor(String aInputName, String aValue, String size) {

        return new CUHtmlEntryField(aInputName, size, "60", aValue);
    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   aInputName  java.lang.String
     * @param   aValue      java.lang.String
     * @param   aSize       TODO: DOCUMENT ME!
     * @param   aMax        TODO: DOCUMENT ME!
     *
     * @return  CUHtmlTextEntry
     */
    @Override public Object getEditWidgetFor(String aInputName, String aValue, String aSize,
        String aMax
        ) {

        return new CUHtmlEntryField(aInputName, aSize, aMax, aValue);
    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   aValue  TODO: DOCUMENT ME!
     *
     * @return  CUHtmlRadioButton
     */
    public String getFloatToDollarStringFor(float aValue) {
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportApprovalStatusDateRangeView.java 146
edu/columbia/rascal/presentation/irb/pages/IrbReportEventStatusDateRangeView.java 148
edu/columbia/rascal/presentation/irb/pages/IrbReportExpirationDateRangeView.java 130
        Vector committeeNames = new Vector();

        if (CURascalGuardian.hasIrbRascal() || CURascalGuardian.hasIrbHighLevelAdminReports() ||
                CURascalGuardian.hasIrbCentralIrbReview()
        ) {
            committeeNames.addElement("All Committees");
            committeeNames.addAll(ServiceLocator.getIrbCommitteeService().getCommitteeNames());
        } else if (CURascalGuardian.hasIrbAdmin())
            committeeNames.addAll(IrbReportQuery.getIrbCommitteeNameFor(getRascalUser(),
                    "IrbAdminMember"
                    )
                );
        else // is Chair
            committeeNames.addAll(IrbReportQuery.getIrbCommitteeNameFor(getRascalUser(),
                    "IrbCommitteeMember"
                    )
                );

        CUHtmlList list = new CUHtmlList(committeeNames, "committeeList", "All Committees");
        columns.setElementAt(list, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Select Committee :"));
        row++;


        aWidget = getReportRangeWidget();
        columns.setElementAt(aWidget, 1);
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Select Range:"));
        row++;


        columns.setElementAt(getDateTable(endDate, "endDate", "endDateMonth", "endDateDay",
                "endDateYear"
                ), 1
            );
        aTable.addRowFor(columns);
        aTable.getCell(row, 0).add(getRowLabelFor("Ending On:"));
        row++;


    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public CUHtmlTable getActionButtons() {

        CUHtmlTable aTable = getTable(1, 1);
        aTable.setBorderWidth(0);
        aTable.setAlign("center");
        aTable.setWidth("30%");

        if (getAllowEdit()) {
            CUHtmlPushButton pb1 = new CUHtmlPushButton("SUBMIT", "SUBMIT", "Submit",
File Line
edu/columbia/rascal/presentation/irb/pages/IrbReportCommitteeOverallStats2View.java 50
edu/columbia/rascal/presentation/irb/pages/IrbReportOverallCommStatsAfterLogInView.java 87
                "?type=OverallCommittee2" + "'"
                );

        getForm().add("<BR>");
        getForm().add("<BR>");
        getForm().add(pb1);
    }

    //~ Methods ------------------------------------------------------------------------------------

    /**
     * This method was created in VisualAge.
     *
     * @return  this method was created in VisualAge.
     */
    public CUHtmlText addDate() {

        String today = new java.util.Date().toString();
        CUHtmlText date = new CUHtmlText(today);
        date.setFontSize("1");
        date.setAlignment("center");
        date.setFontName(getDefaultFontName());

        return date;
    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  result1            TODO: DOCUMENT ME!
     * @param  dateRange          TODO: DOCUMENT ME!
     * @param  selectedCommittee  TODO: DOCUMENT ME!
     */
    public void addFields(Vector result1, String dateRange, String selectedCommittee) {

        CUHtmlForm aForm = getForm();

        addHeader(dateRange, selectedCommittee);
        aForm.add(addDate());
        aForm.add("<BR>");

        CUHtmlTable aTable;

        aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellSpacing(0);
        aTable.setCellPadding(1);
        aTable.setWidth("95%");
        getReportPart1Widget(result1, aTable);
        aForm.add(aTable);

        aForm.add("<BR> <BR>");

        aTable = new CUHtmlTable();
        aTable.setBorderWidth(0);
        aTable.setCellSpacing(1);
        aTable.setCellPadding(1);
        aTable.setWidth("90%");
        aTable.setAlign("center");
        getReportExplanationKeyWidget(aTable);

        aForm.add(aTable);

        setBgColor("WHITE");

        add(aForm);


    }

    /**
     * This method was created in VisualAge. @2000 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param  dateRange          TODO: DOCUMENT ME!
     * @param  selectedCommittee  TODO: DOCUMENT ME!
     */
    public void addHeader(String dateRange, String selectedCommittee) {

        CUHtmlForm form = getForm();

        form.add("<div align=\"center\">");
        form.add("<p><font face=\"Comic Sans MS\" size=\"4\"> RASCAL Reporting <br>");
        form.add("Columbia University</font><br> </p> ");
        form.add("<p><font face=\"Comic Sans MS\"><b>" +
File Line
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 2667
edu/columbia/rascal/presentation/irb/jdbc/IrbQueueQuery.java 4727
                );
            aBuffer.append("and (b.oid = e.parentObjectOid and e.parentObjectName = '");
            aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
            aBuffer.append("') and e.statusName != '");
            aBuffer.append(RETURNED);
            aBuffer.append("' and e.statusName != '");
            aBuffer.append(WITHDRAWN);
            aBuffer.append(
                "' and e.oid = (select max(oid) from IrbStatus x where b.oid = x.parentObjectOid and x.parentObjectName = '"
                );
            aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
            aBuffer.append("') and f.parentObjectOid = b.oid and f.parentObjectName = '");
            aBuffer.append(IrbNameConstants.PROTOCOL_HEADER);
            aBuffer.append("' and f.approvedOn is null ");
            aBuffer.append("and f.approvalCode = ");
            aBuffer.append(approvalCode);
            aBuffer.append(" order by e.statusDate DESC");

        } else {

            if (name.equals(IrbNameConstants.CLOSURE)) {
                title = "''";
            }

            aBuffer.append("select distinct a.oid AS oid1, a.protocolNumber, c.name_last, ");
            aBuffer.append(title);
            aBuffer.append(", b.oid AS oid2, e.statusName, f.oid AS oid3, f.approvalCode, e.statusDate ");
            aBuffer.append("from IrbProtocol a, ");
            aBuffer.append(table);
            aBuffer.append(" b, RASCAL_USER c, IrbStatus e, IrbApproval f  ");
            aBuffer.append("where a.oid = b.parentProtocolOid and b.createdBy = c.rid ");
            aBuffer.append("and (b.oid = e.parentObjectOid and e.parentObjectName = '");
            aBuffer.append(name);
            aBuffer.append("') and e.statusName != '");
            aBuffer.append(WITHDRAWN);

            if (!(name.equals(IrbNameConstants.ADVERSE_EVENT) || name.equals(IrbNameConstants.UNANTICIPATED_PROBLEM))) {
                aBuffer.append("' and e.statusName != '");
                aBuffer.append(RETURNED);
            }

            aBuffer.append(
                "' and e.oid = (select max(oid) from IrbStatus x where b.oid = x.parentObjectOid and x.parentObjectName = '"
                );
            aBuffer.append(name);
            aBuffer.append("') and f.parentObjectOid = b.oid and f.parentObjectName = '");
            aBuffer.append(name);
            aBuffer.append("' and f.approvedOn is null and f.approvalCode = ");
            aBuffer.append(approvalCode);
            aBuffer.append(" order by e.statusDate DESC");

        }

        return aBuffer.toString();
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param   table         TODO: DOCUMENT ME!
     * @param   name          TODO: DOCUMENT ME!
     * @param   approvalCode  TODO: DOCUMENT ME!
     *
     * @return  TODO: DOCUMENT ME!
     */
    public static String getCTSAApprovedSqlStringFor(String table, String name,
File Line
edu/columbia/rascal/presentation/agenda/pages/IrbAgendaHtmlView.java 260
edu/columbia/rascal/presentation/appendix/pages/AppendixDView.java 228
edu/columbia/rascal/presentation/tc/views/TCHtmlView.java 213
        int year = Integer.parseInt(currentDate.substring(6));

        CUHtmlTable table = getTable(1, 4);
        CUHtmlList monthWidget = (CUHtmlList) getMonthWidget(monthFieldName, monthIndex);
        monthWidget.setOnChange("setMonth(" + dateFieldName + "," + monthFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 0).add(monthWidget);

        CUHtmlList dayWidget = (CUHtmlList) getDayWidget(dayFieldName, dayIndex);
        dayWidget.setOnChange("setDay(" + dateFieldName + "," + dayFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 1).add(dayWidget);

        CUHtmlList yearWidget = (CUHtmlList) getYearWidget(yearFieldName, year);
        yearWidget.setOnChange("setYear(" + dateFieldName + "," + yearFieldName + ");setDate(" +
            dateFieldName + "," + monthFieldName + "," + dayFieldName + "," + yearFieldName +
            ");checkDayMonth(" + dateFieldName + "," + monthFieldName + "," + dayFieldName + ");"
            );
        table.getCell(0, 2).add(yearWidget);
        table.getCell(0, 3).add(getHiddenWidgetFor(dateFieldName, currentDate));


        table.setBorderWidth(0);
        table.setWidth("80");

        return table;


    }

    /**
     * This method was created in VisualAge. @1999 Copyright Columbia University - RASCAL. All
     * Rights Reserved.
     *
     * @param   fieldName  TODO: DOCUMENT ME!
     * @param   dayIndex   TODO: DOCUMENT ME!
     *
     * @return  CUHtmlList
     */
    @Override public Object getDayWidget(String fieldName, int dayIndex) {
File Line
edu/columbia/rascal/presentation/appendix/pages/AppendixReportPtHazMatView.java 119
edu/columbia/rascal/presentation/propTrak/pages/PtReportHazMatView.java 93
    }

    /**
     * TODO: DOCUMENT ME!
     *
     * @param  dataTableVector  TODO: DOCUMENT ME!
     */
    public void addFields(Vector dataTableVector) {

        if ((dataTableVector == null) || dataTableVector.isEmpty()) {
            CUHtmlText msgTxt = new CUHtmlText(
                    "No Proposals were selected for these parameters."
                    );
            msgTxt.setFontName(getDefaultFontName());
            msgTxt.setIsBold(true);
            msgTxt.setFgColor("BLUE5");
            getForm().add(msgTxt);
        } else {

            if (!getDownloadable()) {
                addHeader(getFromDate(), getToDate(), getLocation(),
                    getApplication()
                    );