Example usage for com.vaadin.ui CssLayout addComponent

List of usage examples for com.vaadin.ui CssLayout addComponent

Introduction

In this page you can find the example usage for com.vaadin.ui CssLayout addComponent.

Prototype

@Override
public void addComponent(Component c) 

Source Link

Document

Add a component into this container.

Usage

From source file:gov.va.ds4p.ds4pmobileportal.ui.AuditLogs.java

License:Open Source License

private Popover getPopoverTextArea(String val, String title) {
    Popover popover = new Popover();
    popover.setModal(true);// w  ww .jav  a2s. c  om
    popover.setClosable(true);
    popover.setWidth("700px");
    popover.setHeight("100%");
    CssLayout popLayout = new CssLayout();
    popLayout.setSizeFull();
    popLayout.setMargin(true);

    NavigationView navView = new NavigationView(popLayout);
    navView.setCaption(title);

    CssLayout layout2 = new CssLayout();
    TextArea textArea = new TextArea();
    textArea.setWidth("100%");
    textArea.setHeight("700px");
    textArea.setValue(val);
    textArea.setReadOnly(true);
    layout2.addComponent(textArea);

    popLayout.addComponent(layout2);

    Button close = new Button(null, new Button.ClickListener() {

        public void buttonClick(ClickEvent event) {
            event.getButton().getWindow().getParent().removeWindow(event.getButton().getWindow());
        }
    });
    close.setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
    navView.setRightComponent(close);

    popover.setContent(navView);

    return popover;
}

From source file:gov.va.ds4p.ds4pmobileportal.ui.eHealthDirect.java

License:Open Source License

private void buildView() {
    CssLayout content = new CssLayout();
    content.setWidth("100%");
    setCaption("eHealth Direct - " + AdminContext.getSessionAttributes().getUserId());

    hp.setStyleName(Runo.SPLITPANEL_SMALL);
    hp.setSplitPosition(20, Sizeable.UNITS_PERCENTAGE);
    hp.setHeight("450px");
    hp.setLocked(false);/*from   w  w  w  . ja  va 2 s.  c  o m*/
    hp.setFirstComponent(getDropArea());
    hp.setSecondComponent(getResultsTable());

    HorizontalComponentGroup hg = new HorizontalComponentGroup();
    hg.setWidth("100%");
    hg.addComponent(refresh);
    hg.addComponent(viewMetaData);
    hg.addComponent(viewEncryptedDoc);
    hg.addComponent(viewTransformed);
    hg.addComponent(testDisclosure);

    viewMetaData.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            processMetaDataForViewing();
        }
    });

    viewTransformed.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            //test for selection
            Directprocessing obj = getTableObject();
            if (obj != null) {
                String refrainPolicy = obj.getRefrainPolicy();
                String doc = obj.getDocument();
                if (refrainPolicy.equals("NORDSLCD")) {
                    getWindow().showNotification("Warning", disclosure,
                            Window.Notification.TYPE_WARNING_MESSAGE);
                }
                Popover popover = getPopoverLabel(getHTMLVersionOfCDA(doc), "Transformed Clinical Summary");
                popover.showRelativeTo(getNavigationBar());

            }
        }
    });

    content.addComponent(hp);
    content.addComponent(hg);

    setContent(content);

}

From source file:gov.va.ds4p.ds4pmobileportal.ui.eHealthDirect.java

License:Open Source License

private Popover getPopoverLabel(String val, String title) {
    Popover popover = new Popover();
    popover.setModal(true);/*from  w  w  w .  j  a  va 2 s. c  o m*/
    popover.setClosable(true);
    popover.setWidth("700px");
    popover.setHeight("100%");
    CssLayout popLayout = new CssLayout();
    popLayout.setSizeFull();
    popLayout.setMargin(true);

    NavigationView navView = new NavigationView(popLayout);
    navView.setCaption(title);

    CssLayout layout2 = new CssLayout();
    Label lbl = new Label();
    lbl.setContentMode(Label.CONTENT_XHTML);
    lbl.setStyleName(Runo.LABEL_SMALL);
    lbl.setValue(val);
    layout2.addComponent(lbl);

    popLayout.addComponent(layout2);

    Button close = new Button(null, new Button.ClickListener() {

        public void buttonClick(Button.ClickEvent event) {
            event.getButton().getWindow().getParent().removeWindow(event.getButton().getWindow());
        }
    });
    close.setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
    navView.setRightComponent(close);

    popover.setContent(navView);

    return popover;
}

From source file:gov.va.ds4p.ds4pmobileportal.ui.eHealthExchange.java

License:Open Source License

private void buildView() {
    CssLayout content = new CssLayout();
    content.setWidth("100%");
    setCaption("eHealth Exchange - " + AdminContext.getSessionAttributes().getSelectedPatientName());

    VerticalComponentGroup vGroup = new VerticalComponentGroup();

    Label displayAction = new Label(
            "<div style='color:#333;'><p>First perform a secured <b>Search</b> (DocumentQuery) for all available patient documents."
                    + "  Then <b>highlight</b> the document of interest in the table, then click"
                    + " on the <b>Retrieve Document</b> button to perform a secured DocumentRetrieve."
                    + "  Decrpyt the document by clicking any of the 2 <b>Decryption</b> buttons results may vary depending"
                    + " on you privileges.  Once decrypted you may view the HTML form by clicking on the <b>View Clinical Document</b>.</p></div>",
            Label.CONTENT_XHTML);

    vGroup.addComponent(displayAction);/*  w  w w  .  j  av a2  s. co  m*/

    Button searchBTN = new Button("Search");
    searchBTN.setStyleName(Runo.BUTTON_SMALL);
    searchBTN.setWidth("100");
    content.addComponent(vGroup);
    content.addComponent(searchBTN);

    table = new Table();
    table.setWidth("100%");
    table.setHeight("350px");
    table.setMultiSelect(false);
    table.setSelectable(true);
    table.setImmediate(true); // react at once when something is selected
    table.setEditable(false);
    table.setWriteThrough(true);
    table.setContainerDataSource(populateTable());

    table.setColumnReorderingAllowed(true);
    table.setColumnCollapsingAllowed(false);
    table.setVisibleColumns(new Object[] { "patientId", "docId", "docType", "respId", "msgId" });
    table.setColumnHeaders(
            new String[] { "Patient ID", "Document ID", "Document Type", "Repository", "Message" });

    content.addComponent(table);

    retrieveBTN = new Button("Retrieve Document");
    decryptDocBTN = new Button("Decrypt Document");
    decryptDocMaskBTN = new Button("Decrypt Doc and Entries");
    viewHTMLBTN = new Button("View Clinical Document");
    viewPDFBTN = new Button("Consent PDF");
    viewXACMLBTN = new Button("Consent Policy");
    viewSAMLBTN = new Button("View Authorization (SAML)");
    viewMetaData = new Button("View Meta Data");

    HorizontalComponentGroup hGroup = new HorizontalComponentGroup();
    hGroup.setWidth("100%");

    retrieveBTN.setEnabled(false);
    decryptDocBTN.setEnabled(false);
    decryptDocMaskBTN.setEnabled(false);
    viewHTMLBTN.setEnabled(false);
    viewPDFBTN.setEnabled(false);
    viewXACMLBTN.setEnabled(false);
    viewSAMLBTN.setEnabled(false);
    viewMetaData.setEnabled(false);

    hGroup.addComponent(retrieveBTN);
    hGroup.addComponent(decryptDocBTN);
    hGroup.addComponent(decryptDocMaskBTN);
    hGroup.addComponent(viewHTMLBTN);
    hGroup.addComponent(viewPDFBTN);
    hGroup.addComponent(viewXACMLBTN);
    hGroup.addComponent(viewSAMLBTN);
    hGroup.addComponent(viewMetaData);

    content.addComponent(hGroup);

    searchBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            patientId = AdminContext.getSessionAttributes().getSelectedPatientId();
            patientName = AdminContext.getSessionAttributes().getSelectedPatientName();
            currentDocument = "";
            decryptDocument = "";
            requestedService = "DocQuery";
            //area.setValue(currentDocument);
            //area.setCaption("No Documents Selected");

            String decision = "Permit";
            if (patientId.equals("PUI100015060013")) {
                PolicyEnforcementObject pObj = policyEngine.enforceResouce(
                        AdminContext.getSessionAttributes().getPurposeOfUse(), "PSY", "DocumentQueryOut");
                decision = pObj.getPdpDecision();
            }
            if (decision.equals("Permit")) {
                String res = lookUpPatient();
                metaData = res;
                if (res.indexOf("XDSDocumentEntry.uniqueId") > -1) {
                    AdhocQueryResponse adhoc = getQueryResponse(res);

                    RegistryObjectListType rList = adhoc.getRegistryObjectList();
                    List<ExchangeResults> xList = processMetaData(rList);
                    refreshTable(xList);
                } else {
                    //throw warning 
                    docId = "NA";
                    docType = "NA";
                    messageId = "NA";
                    respId = "1.3.6.1.4.1.21367.2010.1.2.1040";
                    ExchangeResults eR = new ExchangeResults(patientName, patientId, docId, docType, "", "", "",
                            messageId, respId);
                    List<ExchangeResults> xList = new ArrayList();
                    xList.add(eR);
                    refreshTable(xList);
                    displayErrorMessage(res);
                }
                retrieveBTN.setEnabled(false);
                decryptDocBTN.setEnabled(false);
                decryptDocMaskBTN.setEnabled(false);
                viewHTMLBTN.setEnabled(false);
                viewPDFBTN.setEnabled(false);
                viewXACMLBTN.setEnabled(false);
                viewSAMLBTN.setEnabled(true);
                viewMetaData.setEnabled(true);
            } else {
                getWindow().showNotification("Warning",
                        "You do not have the necessary authorization privileges to perform this operation.",
                        Window.Notification.TYPE_WARNING_MESSAGE);
            }
        }
    });

    table.addListener(new Property.ValueChangeListener() {

        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            Object rowId = table.getValue();
            if (rowId != null) {
                patientName = (String) table.getContainerProperty(rowId, "patientName").getValue();
                patientId = (String) table.getContainerProperty(rowId, "patientId").getValue();
                docId = (String) table.getContainerProperty(rowId, "docId").getValue();
                docType = (String) table.getContainerProperty(rowId, "docType").getValue();
                respId = (String) table.getContainerProperty(rowId, "respId").getValue();
                messageId = (String) table.getContainerProperty(rowId, "msgId").getValue();
                if (docType.equals("Consult Notes")) {
                    retrieveBTN.setEnabled(true);
                    decryptDocBTN.setEnabled(true);
                    decryptDocBTN.setCaption("Decrypt Document");
                    decryptDocMaskBTN.setEnabled(true);
                    viewHTMLBTN.setEnabled(true);
                    viewPDFBTN.setEnabled(false);
                    viewXACMLBTN.setEnabled(false);
                } else if (docType.equals("Consent Notes") || docType.equals("Consult")) {
                    retrieveBTN.setEnabled(true);
                    decryptDocBTN.setEnabled(true);
                    decryptDocBTN.setCaption("Extract Document");
                    decryptDocMaskBTN.setEnabled(false);
                    viewHTMLBTN.setEnabled(true);
                    viewPDFBTN.setEnabled(true);
                    viewXACMLBTN.setEnabled(true);
                } else {
                    getWindow().showNotification("Warning", "Could not determine document type for processing.",
                            Window.Notification.TYPE_WARNING_MESSAGE);
                }
            }

        }
    });

    retrieveBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            Object rowId = table.getValue();
            String decision = "Permit";
            if (patientId.equals("PUI100015060013")) {
                PolicyEnforcementObject pObj = policyEngine.enforceResouce(
                        AdminContext.getSessionAttributes().getPurposeOfUse(), "PSY", "DocumentRetrieveOut");
                decision = pObj.getPdpDecision();
            }
            if (decision.equals("Permit")) {
                if (rowId != null) {
                    getDocument();
                    requestedService = "DocRetrieve";
                    System.out.println("CURRENT DOCUMENT SIZE: " + currentDocument.length());
                    Popover popover = getPopoverTextArea(currentDocument, "Document Retrieve Response");
                    popover.showRelativeTo(getNavigationBar());
                } else {
                    getWindow().showNotification("Warning",
                            "No row selected, Please select document for retrieval.",
                            Window.Notification.TYPE_WARNING_MESSAGE);
                }
            } else {
                getWindow().showNotification("Warning",
                        "You do not have the necessary authorization privileges to perform this operation.",
                        Window.Notification.TYPE_WARNING_MESSAGE);
            }
        }
    });

    decryptDocBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            if (currentDocument.length() == 0) {
                getWindow().showNotification("Warning", "You must select and retrieve document first.",
                        Window.Notification.TYPE_WARNING_MESSAGE);
            } else {

                try {
                    String sOrg = AdminContext.getSessionAttributes().getSelectedOrg();
                    if (sOrg.equals("FEISystems")) {
                        ihe.iti.xds_b._2007.RetrieveDocumentSetResponse xdsbRetrieveDocumentSetResponse = unmarshallFromXml(
                                ihe.iti.xds_b._2007.RetrieveDocumentSetResponse.class, currentDocument);
                        ihe.iti.xds_b._2007.RetrieveDocumentSetResponse.DocumentResponse documentResponse = xdsbRetrieveDocumentSetResponse
                                .getDocumentResponse().get(0);
                        if (docType.equals("Consult Notes")) {
                            byte[] processDocBytes = documentResponse.getDocument();

                            decryptDocument = decryptDocumentExcludeElements(processDocBytes, keyD);
                        } else {
                            byte[] processDocBytes = documentResponse.getDocument();
                            decryptDocument = new String(processDocBytes);
                        }
                    } else {
                        decryptDocument = currentDocument;
                    }
                    Popover popover = getPopoverLabel(convertXMLtoXHTML(decryptDocument),
                            "Decrypted - Document Only");
                    popover.showRelativeTo(getNavigationBar());
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
        }
    });

    decryptDocMaskBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            if (currentDocument.length() == 0) {
                getWindow().showNotification("Warning", "You must select and retrieve document first.",
                        Window.Notification.TYPE_WARNING_MESSAGE);
            } else {
                String decision = "Permit";

                if (patientId.equals("PUI100015060013")) {
                    PolicyEnforcementObject pObj = policyEngine.enforceResouce(
                            AdminContext.getSessionAttributes().getPurposeOfUse(), "PSY",
                            "DocumentEntryUnMask");
                    decision = pObj.getPdpDecision();
                }
                if (decision.equals("Permit")) {
                    try {
                        ihe.iti.xds_b._2007.RetrieveDocumentSetResponse xdsbRetrieveDocumentSetResponse = unmarshallFromXml(
                                ihe.iti.xds_b._2007.RetrieveDocumentSetResponse.class, currentDocument);
                        ihe.iti.xds_b._2007.RetrieveDocumentSetResponse.DocumentResponse documentResponse = xdsbRetrieveDocumentSetResponse
                                .getDocumentResponse().get(0);
                        if (docType.equals("Consult Notes")) {
                            byte[] processDocBytes = documentResponse.getDocument();

                            decryptDocument = decryptDocument(processDocBytes, keyD, keyM);
                        } else {
                            byte[] processDocBytes = documentResponse.getDocument();
                            decryptDocument = new String(processDocBytes);
                        }
                        Popover popover = getPopoverLabel(convertXMLtoXHTML(decryptDocument),
                                "Decrypted - Document and Masked Entries");
                        popover.showRelativeTo(getNavigationBar());
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                } else {
                    getWindow().showNotification("Warning",
                            "You do not have the necessary authorization privileges to perform this operation.",
                            Window.Notification.TYPE_WARNING_MESSAGE);
                }
            }
        }
    });

    viewHTMLBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            if (decryptDocument.length() == 0) {
                getWindow().showNotification("Warning",
                        "You must select and retrieve document first, then view decrypted version, before attempting to transform it.",
                        Window.Notification.TYPE_WARNING_MESSAGE);
            } else {
                String decision = "Permit";

                if (patientId.equals("PUI100015060013")) {
                    PolicyEnforcementObject pObj = policyEngine.enforceResouce(
                            AdminContext.getSessionAttributes().getPurposeOfUse(), "PSY", "DocumentView");
                    decision = pObj.getPdpDecision();
                }
                if (decision.equals("Permit")) {
                    String sOrg = AdminContext.getSessionAttributes().getSelectedOrg();
                    if (sOrg.equals("FEISystems")) {
                        getWindow().showNotification("Warning", disclosure,
                                Window.Notification.TYPE_WARNING_MESSAGE);
                    }
                    String title = "";
                    if (docType.equals("Consult Notes")) {
                        title = "Summary of Episode - C32";
                    } else if (docType.equals("Consent Notes")) {
                        title = "CDA R2 Consent Directive";
                    } else {
                        title = "Unknown Document Type";
                    }

                    Popover popover = getPopoverLabel(getHTMLVersionOfCDA(decryptDocument), title);
                    popover.showRelativeTo(getNavigationBar());
                } else {
                    getWindow().showNotification("Warning",
                            "You do not have the necessary authorization privileges to perform this operation.",
                            Window.Notification.TYPE_WARNING_MESSAGE);
                }
            }
        }
    });

    viewPDFBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            processPDFForViewing();
        }
    });

    viewXACMLBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            processXACMLForViewing();
        }
    });

    viewSAMLBTN.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            processSAMLForViewing();
        }
    });

    viewMetaData.addListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            processMetaDataForViewing();
        }
    });

    setContent(content);

}

From source file:gov.va.ds4p.ds4pmobileportal.ui.eHealthExchange.java

License:Open Source License

private Popover getPopoverTextArea(String val, String title) {
    Popover popover = new Popover();
    popover.setModal(true);/* w  ww .j  a  v a 2 s . c  o  m*/
    popover.setClosable(true);
    popover.setWidth("700px");
    popover.setHeight("100%");
    CssLayout popLayout = new CssLayout();
    popLayout.setSizeFull();
    popLayout.setMargin(true);

    NavigationView navView = new NavigationView(popLayout);
    navView.setCaption(title);

    CssLayout layout2 = new CssLayout();
    TextArea textArea = new TextArea();
    textArea.setWidth("100%");
    textArea.setHeight("700px");
    textArea.setValue(val);
    textArea.setReadOnly(true);
    layout2.addComponent(textArea);

    popLayout.addComponent(layout2);

    Button close = new Button(null, new ClickListener() {

        public void buttonClick(ClickEvent event) {
            event.getButton().getWindow().getParent().removeWindow(event.getButton().getWindow());
        }
    });
    close.setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
    navView.setRightComponent(close);

    popover.setContent(navView);

    return popover;
}

From source file:gov.va.ds4p.ds4pmobileportal.ui.eHealthExchange.java

License:Open Source License

private Popover getPopoverLabel(String val, String title) {
    Popover popover = new Popover();
    popover.setModal(true);/*from www .  jav a2s .  c  o  m*/
    popover.setClosable(true);
    popover.setWidth("700px");
    popover.setHeight("100%");
    CssLayout popLayout = new CssLayout();
    popLayout.setSizeFull();
    popLayout.setMargin(true);

    NavigationView navView = new NavigationView(popLayout);
    navView.setCaption(title);

    CssLayout layout2 = new CssLayout();
    Label lbl = new Label();
    lbl.setContentMode(Label.CONTENT_XHTML);
    lbl.setStyleName(Runo.LABEL_SMALL);
    lbl.setValue(val);
    layout2.addComponent(lbl);

    popLayout.addComponent(layout2);

    Button close = new Button(null, new ClickListener() {

        public void buttonClick(ClickEvent event) {
            event.getButton().getWindow().getParent().removeWindow(event.getButton().getWindow());
        }
    });
    close.setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
    navView.setRightComponent(close);

    popover.setContent(navView);

    return popover;
}

From source file:gov.va.ds4p.ds4pmobileportal.ui.eHealthExchange.java

License:Open Source License

private Popover getPopoverPDF(String val, String title) {
    Popover popover = new Popover();
    popover.setModal(true);//  www .j  a  v  a2s . c  o m
    popover.setClosable(true);
    popover.setWidth("700px");
    popover.setHeight("100%");
    CssLayout popLayout = new CssLayout();
    popLayout.setSizeFull();
    popLayout.setMargin(true);

    NavigationView navView = new NavigationView(popLayout);
    navView.setCaption(title);

    CssLayout layout2 = new CssLayout();
    Embedded pdf = new Embedded();
    pdf.setType(Embedded.TYPE_BROWSER);
    pdf.setMimeType("application/pdf");
    pdf.setSizeFull();
    pdf.setWidth("100%");
    pdf.setHeight("700px");

    pdf.setSource(createPdf(val));

    layout2.addComponent(pdf);

    popLayout.addComponent(layout2);

    Button close = new Button(null, new ClickListener() {

        public void buttonClick(ClickEvent event) {
            event.getButton().getWindow().getParent().removeWindow(event.getButton().getWindow());
        }
    });
    close.setIcon(new ThemeResource("../runo/icons/64/cancel.png"));
    navView.setRightComponent(close);

    popover.setContent(navView);

    return popover;
}

From source file:gov.va.ds4p.ds4pmobileportal.ui.LoginView.java

License:Open Source License

private void buildView() {
    try {//w  w  w. j ava2 s. c o m
        CssLayout content = new CssLayout();
        content.setWidth("100%");
        content.setMargin(true, true, true, true);

        content.addComponent(getLoginPanel());
        setContent(content);
        setCaption("VA/SAMHSA DS4P Pilot Demonstrations - Please Login");
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}

From source file:gov.va.ds4p.ds4pmobileportal.ui.LogoutView.java

License:Open Source License

private void buildView() {
    CssLayout content = new CssLayout();
    content.setWidth("100%");
    setCaption("Logout / End Session");

    VerticalComponentGroup vGroup = new VerticalComponentGroup();
    logoutAction = new Label(
            "<div style='color:#333;'><p>You have requested to end your session, if true continue by clicking the \"Ok\" button.</p></div>",
            Label.CONTENT_XHTML);
    Button okBTN = new Button("Ok");
    okBTN.addListener(new Button.ClickListener() {

        @Override/*  w  w w  . j  a va  2s  .c o  m*/
        public void buttonClick(ClickEvent event) {
            ((MyVaadinApplication) getApplication()).logoutRequest();
        }
    });
    vGroup.addComponent(logoutAction);
    vGroup.addComponent(okBTN);
    content.addComponent(vGroup);
    setContent(content);

}

From source file:gov.va.ds4p.ds4pmobileportal.ui.PatientSelectView.java

License:Open Source License

private void buildView() {
    try {/* www .  ja  v  a 2  s .  c  om*/
        CssLayout content = new CssLayout();
        content.setWidth("100%");
        setCaption("Patient Selection");

        VerticalComponentGroup vGroup = new VerticalComponentGroup();

        Label selectaction = new Label(
                "<div style='color:#333;'><p>You must select a patient first prior to demonstrating"
                        + " <b>Data Segementation for Privacy</b> use cases.</p>"
                        + "<p> After patient is selected you may perform a secured"
                        + " eHealth Exchange (pull) or eHealth Direct (push) demonstration.</p></div>",
                Label.CONTENT_XHTML);

        patientList = new ComboBox("Available Patients");
        populatePatientList();

        patientList.addListener(new ComboBox.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                String val = (String) patientList.getValue();
                String valName = (String) patientList.getItemCaption(val);
                AdminContext.getSessionAttributes().setSelectedPatientId(val);
                AdminContext.getSessionAttributes().setSelectedPatientName(valName);
                setSessionValues(val);
            }
        });

        patientList.setImmediate(true);
        patientList.setTextInputAllowed(false);
        vGroup.addComponent(selectaction);
        vGroup.addComponent(patientList);

        content.addComponent(vGroup);

        setContent(content);
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}