Example usage for com.vaadin.ui VerticalLayout setWidth

List of usage examples for com.vaadin.ui VerticalLayout setWidth

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout setWidth.

Prototype

@Override
    public void setWidth(String width) 

Source Link

Usage

From source file:com.terralcode.gestion.frontend.view.widgets.customer.CustomerView.java

private void buildAppointments() {
    appointmentsPanel = new CustomerAppointmentsPanel();
    appointmentsPanel.setWidth("100%");

    VerticalLayout wrapper = new VerticalLayout();
    wrapper.setCaption("Histrico citas");
    wrapper.addComponent(appointmentsPanel);
    wrapper.setWidth("100%");
    mainLayout.addComponent(wrapper);/*from  w  w w  . j  a  va 2 s.  c o m*/
}

From source file:com.wintindustries.pfserver.interfaces.view.dashboard.ErrorView.java

public ErrorView() {
    setSizeUndefined(); // <-- This is the important part

    this.setStyleName("error-page");
    setSizeFull();//from   w  w w . j  a va 2  s .  c om
    errorInfo = new VerticalLayout();
    this.addComponent(errorInfo);

    VerticalLayout errorTitle = new VerticalLayout();

    Label pagetitle = new Label("500");
    Label label = new Label("", Label.CONTENT_XHTML);

    label.setStyleName("error-page-line");
    label.setWidth("400px");
    pagetitle.setHeight("210px");
    Label errorType = new Label("Internal Server Error");
    pagetitle.setStyleName("error-page-title");
    errorTitle.addComponent(pagetitle);
    errorTitle.addComponent(label);
    errorTitle.setComponentAlignment(pagetitle, Alignment.BOTTOM_LEFT);
    errorTitle.setWidth("90%");
    errorInfo.setHeightUndefined();
    errorInfo.addComponent(errorTitle);
    errorInfo.setComponentAlignment(errorTitle, Alignment.BOTTOM_LEFT);

}

From source file:de.catma.ui.repository.wizard.IndexerOptionsPanel.java

License:Open Source License

private void initComponents() {
    setSpacing(true);/*from www  .  j av a 2 s.  c o  m*/
    setSizeFull();

    Label infoLabel = new Label();

    infoLabel.setContentMode(Label.CONTENT_XHTML);
    infoLabel.setValue("<p>This section allows you to finetune the creation "
            + "of the word list of your Source Document.</p>"
            + "<p>If you are unsure what to do, just select the language "
            + "and leave everything else unmodified.</p>");
    addComponent(infoLabel, 0, 0, 2, 0);

    cbUseApostrophe = new CheckBox("always use the apostrophe as a word separator");

    addComponent(cbUseApostrophe, 0, 1, 2, 1);

    Locale[] all = Locale.getAvailableLocales();

    sortedLangs = new TreeSet<LanguageItem>();
    for (Locale locale : all) {
        sortedLangs.add(new LanguageItem(locale));
    }

    languagesListSelect = new ListSelect("Please select the predominant language of the Source Document:",
            sortedLangs);
    languagesListSelect.setNullSelectionAllowed(false);
    languagesListSelect.setSizeFull();
    languagesListSelect.setImmediate(true);

    addComponent(languagesListSelect, 0, 2, 0, 3);

    unseparableCharacterSequencesListSelect = new ListSelect("Unseparable character sequences:");
    unseparableCharacterSequencesListSelect.setNullSelectionAllowed(false);
    unseparableCharacterSequencesListSelect.setSizeFull();
    unseparableCharacterSequencesListSelect.setImmediate(true);

    addComponent(unseparableCharacterSequencesListSelect, 1, 2, 1, 3);

    HorizontalLayout ucsAddRemoveLayout = new HorizontalLayout();
    Panel ucsAddRemovePanel = new Panel(ucsAddRemoveLayout);
    ucsAddRemovePanel.setStyleName(Reindeer.PANEL_LIGHT);
    ucsAddRemoveLayout.setSpacing(true);
    ucsAddRemoveLayout.setSizeFull();

    btAddUcs = new Button("Add entry");
    btAddUcs.setEnabled(false);
    ucsAddRemovePanel.addComponent(btAddUcs);
    tfUcs = new TextField();
    tfUcs.setInputPrompt("Add things like 'e.g.' as you see fit.");
    tfUcs.setImmediate(true);
    tfUcs.setTextChangeEventMode(TextChangeEventMode.EAGER);
    tfUcs.setWidth("100%");

    ucsAddRemovePanel.addComponent(tfUcs);
    ucsAddRemoveLayout.setExpandRatio(tfUcs, 2);
    btRemoveUcs = new Button("Remove entry");
    btRemoveUcs.setEnabled(false);
    ucsAddRemovePanel.addComponent(btRemoveUcs);

    addComponent(ucsAddRemovePanel, 1, 4);

    VerticalLayout loadSavePanel = new VerticalLayout();
    loadSavePanel.setSpacing(true);
    loadSavePanel.setWidth("80px");

    btLoadUcsList = new Button("Load list");
    loadSavePanel.addComponent(btLoadUcsList);
    btSaveUcsList = new Button("Save list");
    loadSavePanel.addComponent(btSaveUcsList);

    addComponent(loadSavePanel, 2, 2);

    setColumnExpandRatio(0, 2);
    setColumnExpandRatio(1, 2);

    setRowExpandRatio(2, 2);
    setRowExpandRatio(3, 2);
}

From source file:de.fatalix.bookery.view.common.SuggestLaneLayout.java

License:Open Source License

private VerticalLayout createEmptyDummy() {
    Label label = new Label("hab nix gfundn");
    label.addStyleName(ValoTheme.LABEL_H2);
    label.addStyleName(ValoTheme.LABEL_COLORED);
    label.setSizeUndefined();//from  ww  w. ja  va 2 s  . c om
    VerticalLayout dummyLayout = new VerticalLayout(label);
    dummyLayout.setHeight("150px");
    dummyLayout.setWidth("800px");
    dummyLayout.setComponentAlignment(label, Alignment.MIDDLE_CENTER);
    return dummyLayout;
}

From source file:de.fzi.fhemapi.view.vaadin.ui.DeviceDetailsPanel.java

License:Apache License

@AutoGenerated
private VerticalLayout buildMainLayout() {
    // common part: create layout
    VerticalLayout layout = new VerticalLayout();
    layout.setImmediate(false);/*from  w  ww .  jav a 2  s.  c  o  m*/
    layout.setWidth("100.0%");
    layout.setHeight("-1");
    layout.setMargin(false);

    HorizontalLayout titleLayout = new HorizontalLayout();
    titleLayout.setImmediate(false);
    titleLayout.setWidth("-1");
    titleLayout.setHeight("50");
    titleLayout.setMargin(false);
    layout.addComponent(titleLayout);
    layout.setComponentAlignment(titleLayout, Alignment.TOP_CENTER);

    // deviceTitle
    deviceTitle = new TextField();
    deviceTitle.setImmediate(true);
    deviceTitle.setWidth("100%");
    deviceTitle.setHeight("-1px");
    deviceTitle.setValue(device.getName());
    deviceTitle.addListener(new Property.ValueChangeListener() {

        @Override
        public void valueChange(ValueChangeEvent event) {
            if (((String) event.getProperty().getValue()).length() > 1) {
                device.rename((String) event.getProperty().getValue());
                parent.reloadTree();
            }
        }
    });
    titleLayout.addComponent(deviceTitle);
    titleLayout.setComponentAlignment(deviceTitle, Alignment.TOP_CENTER);

    ComboBox combobox = new ComboBox();
    String[] classes = DeviceFactory.getAvailableDevicetypes();
    for (String name : classes) {
        combobox.addItem(name);
    }
    combobox.select(device.getClass().getSimpleName());
    combobox.addListener(new Property.ValueChangeListener() {

        @Override
        public void valueChange(ValueChangeEvent event) {
            setDeviceType((String) event.getProperty().getValue());
        }
    });
    combobox.setImmediate(true);

    deviceTypeHoriLayout = UIHelper.buildAttributePanel("Device Type", combobox);
    layout.addComponent(deviceTypeHoriLayout);
    layout.setComponentAlignment(deviceTypeHoriLayout, Alignment.TOP_CENTER);
    layout.setExpandRatio(deviceTypeHoriLayout, 1);

    ioDevHoriLayout = buildAttributePanel("IO Device", device.getType());
    layout.addComponent(ioDevHoriLayout);
    layout.setComponentAlignment(ioDevHoriLayout, Alignment.TOP_CENTER);
    layout.setExpandRatio(ioDevHoriLayout, 1);

    addDeviceDetails(DevicePanelManager.getDeviceDetails(device, this), layout);

    return layout;
}

From source file:de.fzi.fhemapi.view.vaadin.ui.HWindow.java

License:Apache License

@AutoGenerated
private HorizontalSplitPanel buildHorizontalSplitPanel_2() {
    // common part: create layout
    mainSplitPanel = new HorizontalSplitPanel();
    mainSplitPanel.setImmediate(false);// ww w .j a  v  a  2  s  .c  o  m
    mainSplitPanel.setWidth("100.0%");
    mainSplitPanel.setHeight("100.0%");
    mainSplitPanel.setMargin(false);

    VerticalLayout leftPanelLayout = new VerticalLayout();
    leftPanelLayout.setWidth("100%");
    leftPanelLayout.setHeight("-1");
    leftPanelLayout.setImmediate(false);
    mainSplitPanel.addComponent(leftPanelLayout);

    leftPanelLayout.addComponent(buildMenuBar());

    // devicesTree
    devicesTree = new Tree();
    devicesTree.setImmediate(false);
    devicesTree.setWidth("-1px");
    devicesTree.setHeight("-1px");
    leftPanelLayout.addComponent(devicesTree);

    // verticalLayout_1
    mainSplitPanel.addComponent(new HorizontalLayout());

    return mainSplitPanel;
}

From source file:de.unioninvestment.eai.portal.portlet.crud.export.ExportDialog.java

License:Apache License

@SuppressWarnings("serial")
private void init() {
    setCaption(Context.getMessage("portlet.crud.dialog.export.title"));
    setModal(true);/*  w  w  w .ja v  a  2 s. c  o m*/
    setResizable(false);
    setWidth("400px");
    addCloseListener(new CloseListener() {
        @Override
        public void windowClose(CloseEvent e) {
            handleWindowCloseEvent();
        }
    });

    indicator = new ProgressBar(0.0f);
    indicator.setWidth("100%");
    UI.getCurrent().setPollInterval(1000);

    if (automaticDownload) {
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        layout.addComponent(indicator);

        setContent(layout);
    } else {
        HorizontalLayout layout = new HorizontalLayout();
        layout.setWidth("100%");
        layout.setMargin(true);
        layout.setSpacing(true);

        downloadLink = new Link();
        downloadLink.setStyleName(LiferayTheme.BUTTON_LINK);
        downloadLink.setCaption(Context.getMessage("portlet.crud.dialog.export.download"));
        downloadLink.setEnabled(false);

        layout.addComponents(indicator, downloadLink);
        layout.setComponentAlignment(indicator, Alignment.MIDDLE_CENTER);
        layout.setComponentAlignment(downloadLink, Alignment.MIDDLE_CENTER);
        layout.setExpandRatio(indicator, 1f);

        setContent(layout);
    }

}

From source file:de.unioninvestment.eai.portal.portlet.crud.mvp.views.DefaultCompoundSearchView.java

License:Apache License

protected Component createSearchInfo() {
    Table table = createColumnInfoTable();

    Label syntaxReference = new Label(getMessage("portlet.crud.compoundsearch.syntaxReference"),
            ContentMode.HTML);/*from   w w  w .ja  va  2  s. com*/

    VerticalLayout boxLayout = new VerticalLayout(table, syntaxReference);
    boxLayout.addStyleName("compsearchinfo");
    boxLayout.setWidth("350px");
    boxLayout.setSpacing(true);

    return boxLayout;
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.AddPatientView.java

License:Open Source License

/**
 * // ww w .  ja v  a 2  s.c  o m
 * @return
 */
void initOptionLayout() {
    optionLayout.removeAllComponents();
    optionLayout.setWidth("100%");
    optionLayout.setVisible(false);

    VerticalLayout optionLayoutContent = new VerticalLayout();

    Button addSample = new Button("Add Sample");
    addSample.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            sampleOptions.addBean(new NewIvacSampleBean("", 0, "", false, false, false, "", ""));
        }
    });

    optionLayoutContent.setMargin(new MarginInfo(true, false, false, false));
    optionLayoutContent.setHeight(null);
    optionLayoutContent.setWidth("100%");
    optionLayoutContent.setSpacing(true);

    final Grid optionGrid = new Grid();
    optionGrid.setWidth("80%");
    // optionGrid.setCaption("Which biological samples are available for the patient(s) and which
    // experiments will be performed?");

    gridInfo = new CustomVisibilityComponent(new Label(""));
    ((Label) gridInfo.getInnerComponent()).addStyleName(ValoTheme.LABEL_LARGE);

    Component gridInfoContent = Utils.questionize(gridInfo,
            "Which biological samples are available for the patient(s) and which experiments will be performed?",
            "Extracted Samples");

    // optionGrid.setSelectionMode(SelectionMode.MULTI);
    optionGrid.setEditorEnabled(true);

    optionGrid.setContainerDataSource(sampleOptions);
    optionGrid.setColumnOrder("type", "secondaryName", "tissue", "amount", "dnaSeq", "rnaSeq", "deepSeq");

    optionLayoutContent.addComponent(gridInfoContent);
    optionLayoutContent.addComponent(optionGrid);
    optionLayoutContent.addComponent(addSample);

    final GridEditForm form = new GridEditForm(
            datahandler.getOpenBisClient().getVocabCodesForVocab("Q_PRIMARY_TISSUES"),
            datahandler.getOpenBisClient().getVocabCodesForVocab("Q_SEQUENCER_DEVICES"));

    optionLayoutContent.addComponent(form);
    form.setVisible(false);

    optionGrid.addSelectionListener(new SelectionListener() {

        @Override
        public void select(SelectionEvent event) {
            BeanItem<NewIvacSampleBean> item = sampleOptions.getItem(optionGrid.getSelectedRow());
            form.fieldGroup.setItemDataSource(item);
            form.setVisible(true);
        }
    });

    optionLayout.addComponent(optionLayoutContent);
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.DatasetView.java

License:Open Source License

/**
 * Precondition: {DatasetView#table} has to be initialized. e.g. with
 * {DatasetView#buildFilterTable} If it is not, strange behaviour has to be expected. builds the
 * Layout of this view.//from  w ww. j a  v  a 2 s  . c  o  m
 */
private void buildLayout() {
    this.vert.removeAllComponents();

    int browserWidth = UI.getCurrent().getPage().getBrowserWindowWidth();
    int browserHeight = UI.getCurrent().getPage().getBrowserWindowHeight();

    this.vert.setWidth("100%");
    this.setWidth(String.format("%spx", (browserWidth * 0.6)));
    // this.setHeight(String.format("%spx", (browserHeight * 0.8)));

    VerticalLayout statistics = new VerticalLayout();
    HorizontalLayout statContent = new HorizontalLayout();
    statContent.setCaption("Statistics");
    statContent.setIcon(FontAwesome.BAR_CHART_O);
    statContent.addComponent(new Label(String.format("%s registered dataset(s).", numberOfDatasets)));
    statContent.setMargin(true);
    statContent.setSpacing(true);
    statistics.addComponent(statContent);
    statistics.setMargin(true);
    this.vert.addComponent(statistics);

    // Table (containing datasets) section
    VerticalLayout tableSection = new VerticalLayout();
    HorizontalLayout tableSectionContent = new HorizontalLayout();

    tableSectionContent.setCaption("Registered Datasets");
    tableSectionContent.setIcon(FontAwesome.FLASK);
    tableSectionContent.addComponent(this.table);

    tableSectionContent.setMargin(true);
    tableSection.setMargin(true);

    tableSection.addComponent(tableSectionContent);
    this.vert.addComponent(tableSection);

    table.setWidth("100%");
    tableSection.setWidth("100%");
    tableSectionContent.setWidth("100%");

    // this.table.setSizeFull();

    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setHeight(null);
    buttonLayout.setWidth("100%");
    buttonLayout.setSpacing(false);

    final Button visualize = new Button(VISUALIZE_BUTTON_CAPTION);
    buttonLayout.addComponent(this.download);
    buttonLayout.addComponent(visualize);

    Button checkAll = new Button("Select all datasets");
    checkAll.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            for (Object itemId : table.getItemIds()) {
                ((CheckBox) table.getItem(itemId).getItemProperty("Select").getValue()).setValue(true);
            }
        }
    });

    Button uncheckAll = new Button("Unselect all datasets");
    uncheckAll.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            for (Object itemId : table.getItemIds()) {
                ((CheckBox) table.getItem(itemId).getItemProperty("Select").getValue()).setValue(false);
            }
        }
    });

    buttonLayout.addComponent(checkAll);
    buttonLayout.addComponent(uncheckAll);
    /**
     * prepare download.
     */
    download.setResource(new ExternalResource("javascript:"));
    download.setEnabled(false);
    visualize.setEnabled(false);

    for (final Object itemId : this.table.getItemIds()) {
        setCheckedBox(itemId, (String) this.table.getItem(itemId).getItemProperty("CODE").getValue());
    }

    /*
     * Update the visualize button. It is only enabled, if the files can be visualized.
     */
    this.table.addValueChangeListener(new ValueChangeListener() {
        /**
         * 
         */
        private static final long serialVersionUID = -4875903343717437913L;

        /**
         * check for what selection can be visualized. If so, enable the button. TODO change to
         * checked.
         */
        @Override
        public void valueChange(ValueChangeEvent event) {
            // Nothing selected or more than one selected.
            Set<Object> selectedValues = (Set<Object>) event.getProperty().getValue();
            if (selectedValues == null || selectedValues.size() == 0 || selectedValues.size() > 1) {
                visualize.setEnabled(false);
                return;
            }
            // if one selected check whether its dataset type is either fastqc or qcml.
            // For now we only visulize these two file types.
            Iterator<Object> iterator = selectedValues.iterator();
            Object next = iterator.next();
            String datasetType = (String) table.getItem(next).getItemProperty("Dataset Type").getValue();
            String fileName = (String) table.getItem(next).getItemProperty("File Name").getValue();
            // TODO: No hardcoding!!
            // if (datasetType.equals("FASTQC") || datasetType.equals("QCML") ||
            // datasetType.equals("BAM")
            // || datasetType.equals("VCF")) {
            if (datasetType.equals("Q_WF_MS_QUALITYCONTROL_RESULTS")
                    && (fileName.endsWith(".html") || fileName.endsWith(".qcML"))) {
                visualize.setEnabled(true);
            } else if (datasetType.equals("Q_WF_MS_QUALITYCONTROL_LOGS")
                    && (fileName.endsWith(".err") || fileName.endsWith(".out"))) {
                visualize.setEnabled(true);
            } else {
                visualize.setEnabled(false);
            }
        }
    });

    // TODO Workflow Views should get those data and be happy
    /*
     * Send message that in datasetview the following was selected. WorkflowViews get those messages
     * and save them, if it is valid information for them.
     */
    this.table.addValueChangeListener(new ValueChangeListener() {
        /**
         * 
         */
        private static final long serialVersionUID = -3554627008191389648L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            // Nothing selected or more than one selected.
            Set<Object> selectedValues = (Set<Object>) event.getProperty().getValue();
            State state = (State) UI.getCurrent().getSession().getAttribute("state");
            ArrayList<String> message = new ArrayList<String>();
            message.add("DataSetView");
            if (selectedValues != null && selectedValues.size() == 1) {
                Iterator<Object> iterator = selectedValues.iterator();
                Object next = iterator.next();
                String datasetType = (String) table.getItem(next).getItemProperty("Dataset Type").getValue();
                message.add(datasetType);
                String project = (String) table.getItem(next).getItemProperty("Project").getValue();

                String space = datahandler.getOpenBisClient().getProjectByCode(project).getSpaceCode();// .getIdentifier().split("/")[1];
                message.add(project);
                message.add((String) table.getItem(next).getItemProperty("Sample").getValue());
                // message.add((String) table.getItem(next).getItemProperty("Sample Type").getValue());
                message.add((String) table.getItem(next).getItemProperty("dl_link").getValue());
                message.add((String) table.getItem(next).getItemProperty("File Name").getValue());
                message.add(space);
                // state.notifyObservers(message);
            } else {
                message.add("null");
            } // TODO
              // state.notifyObservers(message);

        }
    });

    // TODO get the GV to work here. Together with reverse proxy
    // Assumes that table Value Change listner is enabling or disabling the button if preconditions
    // are not fullfilled
    visualize.addClickListener(new ClickListener() {
        /**
         * 
         */
        private static final long serialVersionUID = 9015273307461506369L;

        @Override
        public void buttonClick(ClickEvent event) {
            Set<Object> selectedValues = (Set<Object>) table.getValue();
            Iterator<Object> iterator = selectedValues.iterator();
            Object next = iterator.next();
            String datasetCode = (String) table.getItem(next).getItemProperty("CODE").getValue();
            String datasetFileName = (String) table.getItem(next).getItemProperty("File Name").getValue();
            URL url;
            try {
                Object parent = table.getParent(next);
                if (parent != null) {
                    String parentDatasetFileName = (String) table.getItem(parent).getItemProperty("File Name")
                            .getValue();
                    url = datahandler.getOpenBisClient().getUrlForDataset(datasetCode,
                            parentDatasetFileName + "/" + datasetFileName);
                } else {
                    url = datahandler.getOpenBisClient().getUrlForDataset(datasetCode, datasetFileName);
                }

                Window subWindow = new Window(
                        "QC of Sample: " + (String) table.getItem(next).getItemProperty("Sample").getValue());
                VerticalLayout subContent = new VerticalLayout();
                subContent.setMargin(true);
                subWindow.setContent(subContent);
                QbicmainportletUI ui = (QbicmainportletUI) UI.getCurrent();
                // Put some components in it
                Resource res = null;
                String datasetType = (String) table.getItem(next).getItemProperty("Dataset Type").getValue();
                final RequestHandler rh = new ProxyForGenomeViewerRestApi();
                boolean rhAttached = false;
                if (datasetType.equals("Q_WF_MS_QUALITYCONTROL_RESULTS") && datasetFileName.endsWith(".qcML")) {
                    QcMlOpenbisSource re = new QcMlOpenbisSource(url);
                    StreamResource streamres = new StreamResource(re, datasetFileName);
                    streamres.setMIMEType("application/xml");
                    res = streamres;
                } else if (datasetType.equals("Q_WF_MS_QUALITYCONTROL_RESULTS")
                        && datasetFileName.endsWith(".html")) {
                    QcMlOpenbisSource re = new QcMlOpenbisSource(url);
                    StreamResource streamres = new StreamResource(re, datasetFileName);
                    streamres.setMIMEType("text/html");
                    res = streamres;
                } else if (datasetType.equals("Q_WF_MS_QUALITYCONTROL_LOGS")
                        && (datasetFileName.endsWith(".err") || datasetFileName.endsWith(".out"))) {
                    QcMlOpenbisSource re = new QcMlOpenbisSource(url);
                    StreamResource streamres = new StreamResource(re, datasetFileName);
                    streamres.setMIMEType("text/plain");
                    res = streamres;
                } else if (datasetType.equals("FASTQC")) {
                    res = new ExternalResource(url);
                } else if (datasetType.equals("BAM") || datasetType.equals("VCF")) {
                    String filePath = (String) table.getItem(next).getItemProperty("dl_link").getValue();
                    filePath = String.format("/store%s", filePath.split("store")[1]);
                    String fileId = (String) table.getItem(next).getItemProperty("File Name").getValue();
                    // fileId = "control.1kg.panel.samples.vcf.gz";
                    // UI.getCurrent().getSession().addRequestHandler(rh);
                    rhAttached = true;
                    ThemeDisplay themedisplay = (ThemeDisplay) VaadinService.getCurrentRequest()
                            .getAttribute(WebKeys.THEME_DISPLAY);
                    String hostTmp = "http://localhost:7778/vizrest/rest";// "http://localhost:8080/web/guest/mainportlet?p_p_id=QbicmainportletApplicationPortlet_WAR_QBiCMainPortlet_INSTANCE_5pPd5JQ8uGOt&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1";
                    // hostTmp +=
                    // "&qbicsession=" + UI.getCurrent().getSession().getAttribute("gv-restapi-session")
                    // + "&someblabla=";
                    // String hostTmp = themedisplay.getURLPortal() +
                    // UI.getCurrent().getPage().getLocation().getPath() + "?qbicsession=" +
                    // UI.getCurrent().getSession().getAttribute("gv-restapi-session") + "&someblabla=" ;
                    // String host = Base64.encode(hostTmp.getBytes());
                    String title = (String) table.getItem(next).getItemProperty("Sample").getValue();
                    // res =
                    // new ExternalResource(
                    // String
                    // .format(
                    // "http://localhost:7778/genomeviewer/?host=%s&title=%s&fileid=%s&featuretype=alignments&filepath=%s&removeZeroGenotypes=false",
                    // host, title, fileId, filePath));
                }
                BrowserFrame frame = new BrowserFrame("", res);
                if (rhAttached) {
                    frame.addDetachListener(new DetachListener() {

                        /**
                         * 
                         */
                        private static final long serialVersionUID = 1534523447730906543L;

                        @Override
                        public void detach(DetachEvent event) {
                            UI.getCurrent().getSession().removeRequestHandler(rh);
                        }

                    });
                }

                frame.setSizeFull();
                subContent.addComponent(frame);

                // Center it in the browser window
                subWindow.center();
                subWindow.setModal(true);
                subWindow.setSizeFull();

                frame.setHeight((int) (ui.getPage().getBrowserWindowHeight() * 0.8), Unit.PIXELS);
                // Open it in the UI
                ui.addWindow(subWindow);
            } catch (MalformedURLException e) {
                LOGGER.error(String.format("Visualization failed because of malformedURL for dataset: %s",
                        datasetCode));
                Notification.show(
                        "Given dataset has no file attached to it!! Please Contact your project manager. Or check whether it already has some data",
                        Notification.Type.ERROR_MESSAGE);
            }
        }
    });

    this.vert.addComponent(buttonLayout);

}