Hiding Columns in TableView

Hi,
I have a TableView that displays 5 columns I am trying to hide Column 3.
When the TableView shows up it should show up with only 4 columns and with Column3 as hidden. Is this possible in Java.
Any help would be appreciated.
NAC

Hi NAC,
   This is what you do. When you build your model make your column 3 as last data column and then when you build the column names add all the columns except the one for column 3.
Example: In the following lines if you want to hide the city then you just take the city out of <b>colNames</b>.
String[][] data = createData();
String[] colNames = {"<center><h5>LASTNAME</h5></center>", "FIRSTNAME", "STREET", "ZIP", "CITY"};
model = new DefaultTableViewModel(data, colNames);
String[][] retVal = {
                            {"<h3>Backer</h3>", "Melissa", "528 34th Ave", "94121", "San Francisco"},
                            {"<i>Hamilton</i>", "Ann", "4752 17th St", "94117", "San Francisco"},
                            {"<b>Hudson</b>", "Bree", "16 Hudson Ct", "94124", "San Francisco"},
                            {"<h3>Watson</h3>", "David", "168 Cervantes Blvd", "94123", "San Francisco"},
                            {"Eastwood", "Kenneth", "3367 Troy Dr", "90068", "Los Angeles"},
                            {"Peter", "Smith", "524 Arvin St", "93308", "Bakersfield"},
                            {"Antony", "Miller", "10430 Wilshire Blvd", "90024", "Los Angeles"},
                            {"Moore", "Roger", "1815 W 82d", "90001", "Los Angeles"},
                            {"Jackson", "Michael", "3450 Sawtelle Blvd", "90066", "Los Angeles"}
Message was edited by: Prakash  Singh

Similar Messages

  • Event getting trigger after hiding columns in alv report

    Hi All,
              I having requirement like after hiding columns,i have to control some of the hard coded data in report output. Is there any event to know what all are the columns are selected to hide?

    You can use FM REUSE_ALV_LIST_LAYOUT_INFO_GET to read the fieldcat again.
    Look at the parameter it_event_exit on the ALV FM to now  user has press on some of the Layout buttons.
    In the fieldcatalog, look for
    - no_out = 'X'.  " column is not displayed but can be choosen when changing the layout
    -tech    = 'X'.
      " column is neither displayed nor availabe in the layout

  • Hiding Columns in a JTable

    Hi folks,
    I'm developing a program, one part of which should show in a table the information it got from the DB. It works just fine. The problem is - the user doesn't need to see all the columns (some of them are even unknown and are for intern use only). How could I hide those columns? Or should I create another TableModel and show it instead?
    Thanks in advance

    As a new member you should learn how to search the forum before asking a question.
    A simple search would use "hiding column jtable" as the keywords as an example.

  • How to increase the width of the column in Tableview

    Hi ALL,
    How to increase the width of the column in tableview?I have name column where big name is displaying in rows.Does any one have any idea how to increase the width of the column dynamically in tableview.Please respond its little urgent.
    Thanks in advance

    Hi Peter,
    Here is my Dynpage
    package com.ust.jcatotable;     
    import java.awt.Event;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.DropdownListBox;
    import com.sapportals.htmlb.event.TableNavigationEvent;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class Display extends PageProcessorComponent {
      public DynPage getPage(){
         return new DisplayDynPage();
    public static class DisplayDynPage extends JSPDynPage{
         private Object formatFlag;
         public static IConnection connection ;
         private IPortalComponentRequest request;
         private IPortalComponentContext context;
         private IPortalComponentProfile profile;
         private IPortalComponentResponse  response;
         private int visibleRow=1;
         TableBean myBean;
         public void doInitialization(){
                   response = (IPortalComponentResponse) this.getResponse();
                   request = (IPortalComponentRequest) this.getRequest();
                    context = request.getComponentContext();
                    profile = context.getProfile();
                    IPortalComponentProfile profile = context.getProfile();
                    Object o = context.getValue("myBean");
                    if(o==null || !(o instanceof TableBean)){
                       myBean = new TableBean();
                       setBeanFromProfile(profile, myBean);
                       context.putValue("myBean",myBean);
                     }else {
                       setBeanFromProfile(profile, myBean);
                        myBean = (TableBean) o;
                    this.getData();
         public void myOnNavigate(Event event) throws PageException{
              TableNavigationEvent tne = (TableNavigationEvent) event;
              this.visibleRow = tne.getFirstVisibleRowAfter();
              if(myBean!=null)
              myBean.setVisibleRow(new Integer(this.visibleRow).toString());

  • EVDRE reporting not stable: "hiding columns" & applying datarange formula"

    Hi,
    we use BPC 5.1. (SP6) With several EVDRE reports we experience that our excell session sometimes stops working, typically when changing the CV and expanding again. At the bottom of the excell we see the statements:
    "hiding columns" or also "applying datarange formulas".
    I wait for more than 10 minutes, but nothing changes and I can't do anything anymore and have to abort excell with CTRL + ALT + DEL ...
    Does anyone experience the same problems? (We work with Office 2007)
    regards
    Dries

    Hi,
    I cannot test with Office 2003 since I don't have it installed ..., I typically have it with EVDRE reports, not with schedules created from a template. Numbers of members to be expanded, maximum 10, for which 10 accounts are displayed (so max 100 lines) ... We do not have many data in our system yet, lets say 20.000 records max.
    D

  • Image Column in Tableview

    Hi all,
    here's the thing: I'm trying to add an image column to a tableview but it doesn't work (there's no error, but the image doesn't appear). I've tried it with an iterator.
    Page Layout:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design           = "design2003"
                   controlRendering = "SAP" >
      <htmlb:document>
        <htmlb:documentHead>
        </htmlb:documentHead>
        <htmlb:documentBody>
          <htmlb:form>
            <htmlb:tableView id            = "tableview_scarr"
                             table         = "<%= pa_tab_scarr %>"
                             headerText    = "Table SCARR"
                             headerVisible = "TRUE"
                             iterator      = "<%= application %>" >
            </htmlb:tableView>
            <%
      IF page->messages->num_messages( ) > 0.
            %>
            Error
            <%
      ENDIF.
            %>
          </htmlb:form>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    OnInitialization:
    SELECT * FROM scarr INTO TABLE pa_tab_scarr.
    My application class is my iterator. It implements GET_COLUMN_DEFINITIONS:
    METHOD if_htmlb_tableview_iterator~get_column_definitions.
      DATA tv_column TYPE tableviewcontrol.
      tv_column-columnname          = 'SHOW_ICON'.
      tv_column-title               = 'SHOW_ICON'.
      tv_column-encode = 'X'.
      tv_column-width               = '100'.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-columnname          = 'CARRID'.
      tv_column-width               = '100'.
      APPEND tv_column TO p_column_definitions.
    ENDMETHOD.
    ...and it implements RENDER_CELL_START:
    METHOD if_htmlb_tableview_iterator~render_cell_start.
      CASE p_column_key.
        WHEN 'SHOW_ICON'.
          DATA col_image TYPE REF TO cl_htmlb_image.
          CREATE OBJECT col_image.
          col_image->src = "@2N@".
          col_image->width = '16'.
          col_image->height = '14'.
          p_replacement_bee = col_image.
      ENDCASE.
    ENDMETHOD.
    I've checked the SICF, but all services concerning icons are activated. This is my first Iterator so i'm not sure if i've forgotten something. Why the image is not shown?
    Regards
    Mark-André

    Hi Mark,
    First of all, define an object named iterator in page attributes type ref to iterator_class_name
    i.e
    iterator TYPE REF TO ZCL_ITERATOR(or iterator_class_name)
    Then in <b>onInitialization</b> use
    create object iterator.
    Also you can use any name of the iterator object...but the name application is reserved for the application class....
    So your tableView code will be
            <htmlb:tableView id            = "tableview_scarr"
                             table         = "<%= pa_tab_scarr %>"
                             headerText    = "Table SCARR"
                             headerVisible = "TRUE"
                             iterator      = "<%= iterator %>" >
    Rest all is fine...!!
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Set filter for only one column in tableview

    Hi
    i am using in MVC a htmlb:tableview with filter in only one column of 8.
    This is all working fine, except that the user can enter a searchsting in the filterfield for all columns, but in handle_event (of the controller) ; i only react to a text in the filterfield of column 4 and ignore all other filtertext , which were maybe entered in the other columns.
    My question:
    how can i  enter the filter only for one column, in a way that the user cannot enter any text in the filterfield of the other columns, only in column 4 ?
    my view:
    <htmlb:tableView id             = "requirements"
                     table          = "//model/pdst_reqs"
                     filter         = "APPLICATION"                
                     keyColumn       = "EXTID"
                     iterator        = "<%=model%>"
                     footerVisible   = "FALSE"
                     encode          = "TRUE"
                     visibleRowCount = "<%=model->rowcount%>"
                     width           = "100%"/>
    Best Regards
    Britta

    You can disbale the Filter for the particular column by setting the DISABLE_FILTER in the Iterator method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. Here is the sample code
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
      CLEAR p_column_definitions.
      CLEAR p_overwrites.
      data tv_column TYPE TABLEVIEWCONTROL.
      tv_column-COLUMNNAME          = 'FLDATE'.
      tv_column-SORT                = 'X'.
      tv_column-EDIT                = 'X'.
      tv_column-ONCELLCLICK         = 'MyCellClick1'.
      tv_column-title               = 'Date '.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-COLUMNNAME          = 'PRICE'.
      tv_column-horizontalAlignment = 'right'.
      tv_column-verticalAlignment   = 'middle'.
      tv_column-ONCELLCLICK         = 'MyCellClick2'.
      tv_column-title               = 'Currency'. 
      tv_column-EDIT                = 'X'.
      tv_column-DISABLE_FILTER      = 'X'.    " <-------Like this
      APPEND tv_column TO p_column_definitions.
    endmethod.
    Hope this will solve your problem.
    Raja

  • Single column in Tableview

    Hi all,
            I want to know how can we display single column of a table using tableview. In the syntax we have  <htmlb:tableView table =......>
    My actual requirement is to display a single column on pressing F4 help and that needs to be done using tableview, but i want to display only one required column instead of all the columns. Plz suggest.
    Regards,
    Rohit Khetarpal

    Hi,
    this code sample can help you..
      <htmlb:tableView id              = "tab01"
                                   table           = "<%= itab2 %>"
                                   headerText      = "Channel and Account Details"
                                   headerVisible   = "TRUE"
                                   width           = "100%"
                                   filter          = "server"
                                   footerVisible   = "true"
                                   visibleRowCount = "10"
                                   onRowSelection  = "myEvent"
                                   selectionMode   = "LINEEDIT" >
                    <htmlb:tableViewColumns>
                      <htmlb:tableViewColumn title      = "Division "
                                             columnName = "DIVISION"
                                             wrapping   = "True" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Distribution Channel"
                                             columnName = "DISTR_CHAN" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Sales Org"
                                             columnName = "SALESORG" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Channel"
                                             columnName = "CHANNEL"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Account"
                                             columnName = "ACCOUNT"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                    </htmlb:tableViewColumns>
                  </htmlb:tableView>
    Regards,
    Ravikiran.

  • Hiding columns in a table?

    Hi there,
    I wonder if any of you know of an easy way to hide columns in a table in InDesign CS5? To further explain, i have two documents currently, one is a price guide and the other is bascially identical but without the prices, lets call that the product guide. It seems daft to have to update the two (especialy when i actually have four as i have each in two languages!) every time there is a slight change to the product listing. So, i was thinking if i have the price guide, make a PDF of that, hide the column with the prices in, and then hey presto, I've got the product guide. Seems simple but i can't seem ot find a simple way of hiding the column.
    Is there such an option? Or any suggestions as to how best do it? I don't want to delete it as i will need to update this column occasionally, and i really want to avoid having lots of different InDesign documents as i have this situation for 5 different country's guides, each with a local language and english language version, making 20 in total if i keep them separate (10 if i don't, which is enough imho) - mental i know! But thats the way work want it
    Cheers!
    (On Mac OSX 10.6.4 and running InDesign CS5)

    linziloop wrote:
    Hi there,
    I wonder if any of you know of an easy way to hide columns in a table in InDesign CS5? To further explain, i have two documents currently, one is a price guide and the other is bascially identical but without the prices, lets call that the product guide. It seems daft to have to update the two (especialy when i actually have four as i have each in two languages!) every time there is a slight change to the product listing. So, i was thinking if i have the price guide, make a PDF of that, hide the column with the prices in, and then hey presto, I've got the product guide. Seems simple but i can't seem ot find a simple way of hiding the column.
    Is there such an option? Or any suggestions as to how best do it? I don't want to delete it as i will need to update this column occasionally, and i really want to avoid having lots of different InDesign documents as i have this situation for 5 different country's guides, each with a local language and english language version, making 20 in total if i keep them separate (10 if i don't, which is enough imho) - mental i know! But thats the way work want it
    Cheers!
    (On Mac OSX 10.6.4 and running InDesign CS5)
    * If you experiment with some table cell settings, you can probably find a design that works when the columns are exposed, and when they're set to their minimum width - 3pt.
    Setting the column width to its minimum may not conceal cell content if the cell side margins are so small as to allow content to touch the cell sides, so you may need to pay attention to the margin values. If the column has vertical rulings, you may also need to pay attention to their stroke width and color.
    * Conditional text won't hide a column, but if the column is the furthest left or right, you might achieve what you want by applying a condition to the text in each cell of the column and hiding or showing it as needed. The width will be preserved, but no text will appear when hidden.
    * Similar to conditionalizing the cell content, you can define a paragraph style for only the cells in the column, and redefine the character color to None or Paper to hide the content, and redefining the color to Black to show it.
    * It may be possible to script a solution. I'm not familiar enough with available scripts. Inqire on the scripting forum.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Hiding column in table in smartform

    HI,
    Can we hide a column in a table on a specific condition?
    PLease let me know.
    Reagards
    Sandeep

    Hi,
      Here 2 options are there select based on requirement.
    1. Column will hide but there empty space will display. This can be acheived by setting the condition in condition tab of the column related text in that node(table).
    2.Completly hiding the cloumn and also empty space means create 2 tables table1 with 4 columns and table2 with3 columns. create alternative and put condition. if yes table1 display.if no means table2 will display.
    Thanks,
    Suma.

  • Adding inputhelp to a particular column in tableview

    Hi experts,
      I need to display a particlular column by providing inputhelp in tableview.My requirement is to save the data entered in the tableview to the database. but in particlular coulmn v should select data from the inpuhelp.please help me out.Please anybody help me how should i make particular column as inputhelp in tableview. This is urgent requirement.
    Thanks in advance.
    Regards,
    sireesha

    Hi,
    Can anybody tell me whats wrong with the following script.and also can see the layout here.
    <script language="JavaScript" type="text/javascript">
              function pass_data()
                   if (top.window.dialogArguments) {
                   if ( document.form1.row_sel.value )
    top.dialogArguments.document.form1.tab01_6_2.value=document.form1.row_sel.value;
                   top.close();
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          <htmlb:tableView id              = "tab01"
                           table           = "<%= flights %>"
                           visibleRowCount = "14"
                           width           = "100%"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           onRowSelection  = "my_event"
                           selectionMode   = "SINGLESELECT" >
          </htmlb:tableView>
          <htmlb:inputField id      = "row_sel"
                            value   = "<%= rowselected %>"
                            visible = "false" />
    In this script am getting the following error:
    <b>top.dialogArguments.document.form1.tab01_6_2.value is null or not an object.</b>
    In the OnInputProcessing the event is getting triggered when i click on the row in tableview. And that selected value is also assigned to the inputfield.But in the layout am getting the above error.Can anybody pls help me out.I dont know the javascript.
    How should i pass this selected value to the inputfield in the parent window.
    Pls help me out.
    Thanks in advance
    Regards
    sireesha
    In the OnInputProcessing

  • Hiding columns in view.

    Hi all,
    I need to hide two columns in a view. I need to save this view and use it in a web template. I can do this if the column is a key figure but not when it’s a selection in a structure. What are my options? I tried deleting and hiding the columns and then saving it as a view but when I execute the template, the columns come back. Please let me know what I can do.
    Thanks!

    Hi Uday,
    See if you can do this using the filter option: Right click on the Structure in the view and choose filter. Then move the selections that you want to the right, and other to the left.
    Hope this helps...

  • Hiding column in BPM workflow inbox

    There is a requirement to hide few columns. Using IBPMUICustomizations, I can show required columns. But as this list is bigger and can increase in future.
    Wanted to hide displaying few columns that are not required.
    Wanted to know is there a way of hiding few columns by name?
    Thanks in advance,
    Bhaskar

    any help?

  • Hiding columns in Presentation Layer, but still accessible in a report.

    Hi BI Devs,
    I have a question on how to hide certain columns in the presenation layer but still make them available in a dashboard/report.
    We have 3 sections in our Presenatation Layer...section_a, section_b, section_c. We have two groups created, group_max and group_lite. Group_max will have access to all the sections in the presentation layer but group_lite will only have access to section_a and section_b
    We have a report in a dashboard (lets call it full_dashboard) that contains columns from section_a, section_b and section_c. We want all users (group_max and group_lite) to have access to the report, run the report and return data.
    Our requirement is that the group_lite will not have access to the section_c in "Answers".
    When we set the permissions in the RPD for the different sections, the permissions work correctly in hiding the section_c from group_lite, but when they run the report full_dashboard, the report errors out for group_lite users.
    Is there a way to grant access to the group_lite users so that they can run full_dashboard but still deny them access to the columns in Answers?

    Here is my thinking about duplicationg the section_c
    1. If i duplicate section_c, it will still be visible to group_lite in the presenation layer.
    2. If i duplicate section_c, i will have to change the dashboard (a very complex one too) to point to the duplicated section. How will I be able to hide the duplicated section?
    I am just not sure how to hide section_c from the group_lite users and still have the reports in the dashboard access the columns, without having to change the report.
    Edited by: empyre on Mar 16, 2011 8:21 AM

  • Method to locate row and column in TableView

    In a TableView.setOnMouseClicked ()
    How to capture that row and column were clicked?

    I am having problem in populating data from a table in one screen to a Text Field in the other screen. I have two classes FirstClass containing a textbox and a button. On pressing a button a second window is opened containing a Table of values. As the user double clicks a row the value of the second column of the row should be inserted into the textbox of the FirstClass. Code of both the classes is attached. Thanking you in anticipation.
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class FirstClass extends Application {
    public static void main(String[] args) {
         launch(args);
    @Override
    public void start(final Stage primaryStage) {
         primaryStage.setTitle("First Class");
    GridPane gridpane = new GridPane();
              gridpane.setPadding(new Insets(5));
              gridpane.setHgap(5);
              gridpane.setVgap(5);
    final TextField userNameFld = new TextField();
    gridpane.add(userNameFld, 1, 1);
    Button btn = new Button();
    btn.setText("Show Table");
    gridpane.add(btn, 1, 3);
    btn.setOnAction(new EventHandler<ActionEvent>() {
    @Override
    public void handle(ActionEvent event) {
         String a = TableClass.showDialog(primaryStage, true, "Table Window" );
         userNameFld.setText(a);
    StackPane root = new StackPane();
    Scene scene =new Scene(root, 300, 250);
    root.getChildren().addAll(gridpane);
    primaryStage.setScene(scene);
    primaryStage.show();
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Modality;
    import javafx.stage.Stage;
    public class TableClass extends Stage {
         private static TableClass dialog;
         private static String value = "";
         public static class Person {
    private final SimpleStringProperty firstName;
    private final SimpleStringProperty lastName;
    private Person(String fName, String lName) {
    this.firstName = new SimpleStringProperty(fName);
    this.lastName = new SimpleStringProperty(lName);
    public String getFirstName() {
    return firstName.get();
    public void setFirstName(String fName) {
    firstName.set(fName);
    public String getLastName() {
    return lastName.get();
    public void setLastName(String fName) {
    lastName.set(fName);
         private TableView<Person> table = new TableView<Person>();
         private final ObservableList<Person> data =
         FXCollections.observableArrayList(
         new Person("JACK", "BROWN"),
         new Person("JOHN", "VIANNEYS"),
         new Person("MICHAEL", "NELSON"),
         new Person("WILLIAM", " CAREY")
         public TableClass(Stage owner, boolean modality, String title) {
              super();
              initOwner(owner);
              Modality m = modality ? Modality.APPLICATION_MODAL : Modality.NONE;
              initModality(m);
              setOpacity(1);
              setTitle(title);
              StackPane root = new StackPane();
              Scene scene = new Scene(root, 750, 750);
              setScene(scene);
              GridPane gridpane = new GridPane();
              gridpane.setPadding(new Insets(5));
              gridpane.setHgap(5);
              gridpane.setVgap(5);
              TableColumn firstNameCol = new TableColumn("First Name");
         firstNameCol.setMinWidth(100);
         firstNameCol.setCellValueFactory(
         new PropertyValueFactory<Person,String>("firstName")
         TableColumn lastNameCol = new TableColumn("Last Name");
         lastNameCol.setMinWidth(200);
         lastNameCol.setCellValueFactory(
         new PropertyValueFactory<Person,String>("lastName")
         table.setItems(data);
         table.getColumns().addAll(firstNameCol, lastNameCol);
         table.setOnMouseClicked(new EventHandler<MouseEvent>() {
                   public void handle(MouseEvent me) {
                        if (me.getClickCount() >= 2) {
                   String srr = table.getItems().get(table.getSelectionModel().getSelectedIndex()).getLastName();
                   value = srr;
                   dialog.hide();
         gridpane.add(table, 1, 5,1,20 );
              root.getChildren().add(gridpane);
         public static String showDialog(Stage stg, Boolean a , String title){
              dialog = new TableClass( stg,a, title);
              dialog.show();
              return value;
    }

Maybe you are looking for