IC WebClient: Add Dropdown Box to TableView

Has anyone successfully added a dropdown box inside of a CRM IC WebClient table that uses a context node?  If so, I would appreciate some advice!  I have read Brian's blog about table view iterators, but as usual the application in CRM is slightly different. 
I'm working with a custom column in the result list (Customers context) on the BuPaSelectCustomer view.  I want my custom column to be editable via a dropdown box.  Here's what I've done:
1) Created a custom class that implements the IF_HTMLB_TABLEVIEW_ITERATOR interface
2) Created an attribute of the Customers context class called ITERATOR that is typed as the new class in #1
3) Added the iterator attribute to the crmic:tableView
element in the page which points to the attribute defined in #2: iterator = "<%= customers->iterator %>"
4) Set edit = "TRUE" attribute in the crmic:tableViewColumn element for my new column named 'ZZSLSTATUS'
5) In the controller class SET_MODELS method:
* Create iterator for table
  IF NOT iterator IS BOUND.
    CREATE OBJECT iterator TYPE ZCL_CRM_SELCUST_TV_ITERATOR
      EXPORTING
        ir_context_node = typed_context->customers.
  ENDIF.
The constructor looks like this:
method CONSTRUCTOR .
  gr_context_node = ir_context_node.
endmethod.
6) GET_COLUMN_DEFINITIONS looks like this:
  data: wrapper type ref to cl_bsp_wd_collection_wrapper.
  gv_current_line = 0.
  gv_tableview_id = p_tableview_id.
* get the wrapper of the context node
  wrapper = gr_context_node->get_collection_wrapper( ).
* fill the local iterator
  gr_iterator = wrapper->get_iterator( ).
7) RENDER_ROW_START looks like this:
* Position on correct index
  gr_iterator->get_by_index( iv_index = p_row_index ).
8) RENDER_CELL_START looks like this:
DATA: LT_RECSTAT      TYPE TABLE OF IHTTPNVP,
      LS_RECSTAT      TYPE IHTTPNVP,
      LR_COL_DROPDOWN TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
FIELD-SYMBOLS: <TABLE> TYPE  TIHTTPNVP.
* Simple 1 record table for now
  LS_RECSTAT-NAME  = '1'.
  LS_RECSTAT-VALUE = 'Not Called'.
  APPEND LS_RECSTAT TO LT_RECSTAT.
  CASE P_COLUMN_KEY.
    WHEN 'ZZSLSTATUS'.
      IF NOT P_EDIT_MODE IS INITIAL.
*       Create replacement bee to show a dropdown listbox in the
*       table cell
        CREATE OBJECT LR_COL_DROPDOWN.
        LR_COL_DROPDOWN->ID                = P_CELL_ID.
        LR_COL_DROPDOWN->NAMEOFKEYCOLUMN   = 'NAME'.
        LR_COL_DROPDOWN->NAMEOFVALUECOLUMN = 'VALUE'.
        TRY.
            CREATE DATA LR_COL_DROPDOWN->TABLE TYPE TIHTTPNVP.
          CATCH CX_SY_CREATE_DATA_ERROR.
            RETURN.
        ENDTRY.
        ASSIGN LR_COL_DROPDOWN->TABLE->* TO <TABLE>.
        IF SY-SUBRC = 0.
          <TABLE> = LT_RECSTAT.
        ENDIF.
        LR_COL_DROPDOWN->SELECTION = GR_CONTEXT_NODE->GET_ZZSLSTATUS(
                                            ATTRIBUTE_PATH = ''
                                            ITERATOR = GR_ITERATOR ).
        P_REPLACEMENT_BEE = LR_COL_DROPDOWN.
      ENDIF.
  ENDCASE.
Nothing happens to the cells in my column (they still appear as uneditable with their initial values) and my breakpoints aren't hit in the custom iterator class methods when the table is rendered.  Any ideas? 
Thanks,
Brad

Brad or anyone who could help:
I found this article very useful and tried to follow the samples. I am not very experienced in BSP and I only need to add a column to BuPaSelectCPforCustomer IC webclient tableview.
Step 1 - done.
step 2 - I am not sure I did it right. I created a custom class ZCL_CRM_IC_BUPASELCP_CN02 for CONTACTRELATION and added an attribute ITERATOR to the class.
step 3 I add this to crmic:tableView
   iterator = "<%= CONTACTRELATION->iterator %>"
   but I go compile errors like "Field iterator is unknown".
Step 4 - skip
Step 5 - I assume the controller class is the top controller which in my case is ZL_CRM_IC_BUPASELECTCPFOR_IMPL->SET_MODELS. I added this code:
     IF NOT iterator IS BOUND.
     ENDIF.
I got the same compile errors like "Field iterator is unknown".
I think I missed something somewhere. I would really appreciate it if you could shed more light on this.
Thank you so much.

Similar Messages

  • How Can i add Dropdown Box to Gui Button İn Alv_Fieldcatolog ?

    Can you share example ?
    Thanks & Regards

    Hi...I think there is something called factory method in which we don't use container.
    ALV report Object Oriented way without containers?
    I hope you are referring to the same..

  • ADD ITEMS TO DROPDOWN BOX FROM A TEXT FIELD(USER ENTERS THE ITEM) AND BOUND VALUE ALSO

    I WANT TO ADD ITEMS  THE DROPDOWN BOX FROM THE TEXT FIELD(ITEM NAME) WHERE USER ENTER'S THE ITEM DESCRIPTION
    AND BOUND VALUE ALSO SHOULD BE ADDED TO THE SAME ITEM.
    SAME WAY REMOVE ITEMS FROM DROPDOWN BOX
    PLEASE GIVE SAMPLE FORM OR JAVASCRIPT FOR THE ABOVE SCENARIO.....
    INDEED HELPFUL FOR MY PROJECT PLEASE SEND ATTACHED PDF FORM

    Hi Praveen,
    Your form is not shared so I have not been able to access it.  But I have updated mine.  There are now two approaches, one that follows on from the above method and updates each drop down list in each row.  The second updates a separate dataset that the drop down list is bound to.  This second approach requires the remerge() method which can cause problems if your code has updates some form properties like a borders color as these will be reset, but the code is simplier and you will only have one list to maintain.  The add button click code is;
    var particulars = xfa.datasets.resolveNode("particulars");
    if (particulars === null)
        particulars = xfa.datasets.createNode("dataGroup","particulars");
        xfa.datasets.nodes.append(particulars);    
    var particular = xfa.datasets.createNode("dataValue","particular");
    particular.value = ItemName.rawValue;
    var boundValue = xfa.datasets.createNode("dataValue","id");
    boundValue.value = BoundValue.rawValue;
    particular.nodes.append(boundValue);
    boundValue.contains = "metaData";
    // find sorted position to insert
    for (var i = 0; i < particulars.nodes.length; i++)
        p = particulars.nodes.item(i);
        if (p.value > particular.value)
          particulars.nodes.insert(particular, p);       
                 break;
    // add to end if greater than all existing items
    if (particular.parent === null)
        particulars.nodes.append(particular);
    // clear source fields
    ItemName.rawValue = null;
    BoundValue.rawValue = null;
    // remerge form data to pick up new item
    xfa.form.remerge();
    And the binding looks like;
    I have updated my sample to include both methods, https://workspaces.acrobat.com/?d=OwysfJa-Q3HhPtFlgRb62g
    Regards
    Bruce

  • How to add a dropdown box in an ALV  toolbar??

    hi,
       i have a requirement where i need to add a dropdown box in my ALV Toolbar. To be precise next to the export button in my ALV.
    Plz help me on this, thanks.

    Hi Frank,
    I am providing the some peice of code which will be helpful to you.
    Adding the DropDown list to the ALV toolbar:
    lr_functions ?= wd_this->r_table.
    lr_function = lr_functions->create_function( 'MYDROPDOWNBYINDEX' ).
    create object lr_dropdown_by_idx
    exporting
    texts_elementname = 'DROPDOWNBYINDEX.VALUE'.
    lr_dropdown_by_idx->set_label_text( 'MYDROPDOWNBYINDEX' ).
    lr_function->set_editor( lr_dropdown_by_idx ).
    Providing the values to that DropDown:
    Here in my example DROPDOWNBYINDEX.VALUE is the context attrubute. And i write the Supply function for that node as follows:
    data:
    lt_dropdownbyindex type if_componentcontroller=>elements_dropdownbyindex,
    ls_dropdownbyindex type if_componentcontroller=>element_dropdownbyindex.
    ls_dropdownbyindex-value = 'Nothing'. "#EC NOTEXT
    append ls_dropdownbyindex to lt_dropdownbyindex.
    ls_dropdownbyindex-value = 'ActionDropdownByIndex'. "#EC NOTEXT
    append ls_dropdownbyindex to lt_dropdownbyindex.
    node->bind_table( lt_dropdownbyindex ).
    For reference you can refer the WD component SALV_WD_TEST_TABLE_TOOLBR which holds the same code
    Hope this will help you. Reward points if it helps.
    Cheers,
    Darshna.

  • Graphical errors. The Address dropdown box is blacked out, and goes normal when highlighted, tabs are blacked out, buttons are half missing etc etc. This ONLY happens in firefox, reinstalled and turn all add-ons off and it persists.

    Graphical errors. The Address dropdown box is blacked out, and goes normal when highlighted, tabs are blacked out, buttons are half missing etc etc. This ONLY happens in firefox, reinstalled and turn all add-ons off and it persists.

    '''''thedanbot''''':
    I am not sure that your image matches '''''Apoth's''''' description as I interpret it.
    Have you tried Firefox Safe Mode to see if an Add-on is causing your problem?
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]

  • How to add checkbox in dropdown box

    hi to all
      please help me urgent
      can we add check box in to the drop down box in screen painter..?
    if yes then please tell me in detail.
    thank you...

    Hi,
    In drop down ( combo box) u can select only one item at a time. so why do u need check box ?

  • How to set initial value for a dropdown box?

    Hi,
    Within Netweaver 2004S (BI 7.0) we use integrated planning. In one of our applications we want to use a dropdown box (created with the WAD) to make a selection possible for a characteristic.
    We set up a pre-query to fill the dropdown box (via data binding CHARACTERISTIC_SELECTION) with the proper values. This works fine.
    We pass on the choosen entry (via command SET_VARIABLES_STATE) to a second variable that is used in another query. This command is triggered after the user makes a selection in the dropdown box. Also this works fine. After selection of one entry, the output of the second query is limited.
    We have the following problem: the first time a blank selection entry is added to the dropdownbox and that no values are passed on to the second query. Because it seems that the user first must choose an entry.
    What we would like to do is that one of the found values of the pre-query is automatically selected in the dropdown box and passed on to the second variable (to limit the second query).
    I give you an example:
    The first query delivers value A, B, and C for the characteristic of the dropdown box.
    The first time the dropdown box showns an empty entry, and three additional entries A, B and C. The second query shows all results, because the second variable doesn't receive any value via the command SET_VARIABLES_STATE. The command is not yet triggered.
    When you select A, B or C, the command is triggered and the second query shows only results for the choosen entry (this is correct). Now the empty entry has disappeared from the dropdown box. Only the entries A, B and C are left.
    Is it possible to set up the dropdown box on such a way (or add some script coding around it) that in the initial show for the dropdown box one of the entries is choosen automatically, so that the empty line is not part of the value set of the dropdown box and that the command connected to the dropdown box (in our case the SET_VARIABLES_STATE) is carried out automatically?
    Please, who can help us with this?
    Kind regards and thanks in advance,
    Marcel.

    Hi,
    In BW 3.5,say you want to set default for calmonth.
    In order to avoid the “ALL” option from appearing in the dropdown box,
    filter infobject 0CALMONTH for DP1 by any valid value.
    In the object Data_provider include the lines in Bold:
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_DATA_PROVIDER"/>
    <param name="NAME" value="DP1"/>
    <param name="QUERY" value="WORKSHOP_CALMONTH_DROPDOWN"/>
    <param name="INFOCUBE" value="0D_SD_C03"/>
    <<b>param name="FILTER_IOBJNM" value="0CALMONTH"/>
    <param name="FILTER_VALUE" value="200401"/></b>
    DATA_PROVIDER: DP1
    </object>
    Hope this helps.
    Anu.

  • Dropdown boxes do not work on Firefox 5.0.

    When using the address bar or any dropdown box on Firefox, the drop down menu flashes but will not stay open so that I can use it. I do not have this issue in IE. I have started Firefox in Safe Mode and the dropdown boxes still did not work.
    I can't even use the dropdown box on this form.

    Try the Firefox SafeMode. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    # You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    # Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Creating calculation based on result of dropdown box

    Hi there. I am hoping someone will be kind enough to help me with some Javascript as it seems I am too blonde and middle aged to figure it out by myself.
    I have a dropdown box 'Member'. The value for Yes is 0. The value for No is 10.
    Then I have three check boxes. 'Day1' value is 35. 'Day2' value is 25. 'Dinner' value is 65.
    If Yes is selected, I want the sum of the check boxes if they are checked. (eg, total if all checked = 125)
    If No is selected, I want the value of each check box increased by 10. (eg, total if all checked = 155)
    I am using Acrobat X.
    Thanks in advance.

    Because of the fact that you want to add a constant to a number of values if a given condition is meet then you will need to use a custom calculation script.
    // get the value of the fields
    var cMember = Number(this.getField("Member").value);
    var nDay1 = this.getField("Day1").value;
    var nDay2 = this.getField("Day2").value;
    var nDinner = this.getField("Dinner").value;
    // define a varaiable for the sum
    var sum = 0;
    // day 1 plus adjustement
    if (nDay1 != "Off") sum += Number(nDay1) + cMember;
    // day 2 plus adjustement
    if ( Day2 != "Off") sum += Number(nDay2) + cMember;
    // dinner plus adjustement
    if (nDinner != "Off") sum += Number(nDinner) + cMember;
    event.value = sum;
    Excel is only easy if you accept Microsoft's view of calculations.

  • How to insert new values in dropdown box through coding

    hi,
      I want to insert new values in dropdown box in a table.
    Please provide me the corresponding coding.i already did this code but result is empty dropdown.I mapped the context properly..
    int sklength=wdContext.nodeSkills().size();
          for(int i=0;i<sklength;i++)
        String getsub=wdContext.currentSkillsElement().getSubject();
        if(getsub.equals("50000138"))
             //IPrivateDetails1.INewskillElement el=wdContext.createNewskillElement();
             List lis=new ArrayList();
             //lis.add("Abap");
             //lis.add("Workflow");
             IPrivateDetails1.INewskillElement el=wdContext.createNewskillElement();
             el.setTskill("abap");
             lis.add(el);
              el.setTskill("workflow");
              lis.add(el);
              wdContext.nodeNewskill().bind(lis);
              //wdContext.nodeMonthsOfYear().bind(MonthsOfYear);
              wdContext.nodeNewskill().setLeadSelection(1);
        else
              wdContext.currentNewskillElement().setTskill("C++");
    waiting for a positive reply......
    with regards,
    S.Kiruthika

    kiruthika,
    Too many logical errors to explian.
    Should be:
    IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
    IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
    int sklength = nSkills.size();
    boolean cppAdded = false;
    for(int i=0;i<sklength;i++)
      String getsub=nSkills.getSkillsElementAt(i).getSubject();
      if(getsub.equals("50000138"))
        List lis=new ArrayList();
        IPrivateDetails1.INewskillElement el1 = nNewSkill.createNewskillElement();
        el1.setTskill("abap");
        lis.add(el1);
        IPrivateDetails1.INewskillElement el2 = nNewSkill.createNewskillElement();
        el2.setTskill("workflow");
        lis.add(el2);
        nNewSkill.bind(lis);
        nNewSkill.setLeadSelection(1);
      else if (!cppAdded)
        cppAdded = true;
        IPrivateDetails1.INewskillElement elCpp = nNewSkill.currentNewskillElement();   
        if (null ==  elCpp) {
          elCpp = nNewSkill.createNewskillElement();
          nNewskill.addElement(elCpp);
          nNewskill.setLeadSelection( nNewskill.size() - 1);
        elCpp.setTskill("C++");
    VS

  • Add combo box into table pagination

    I want to add combo box into JavaFX table with pagination. Something like that:
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Pagination;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class MainApp extends Application
       final ObservableList<Person> data = FXCollections.observableArrayList(
       new Person("1", "Joe", "Pesci"),
       new Person("2", "Audrey", "Hepburn"),
       new Person("3", "Gregory", "Peck")
       private Pagination pagination;
       public static void main(String[] args) throws Exception
      launch(args);
       public int itemsPerPage()
       return 1;
       public int rowsPerPage()
       return 5;
       public VBox createPage(int pageIndex)
       int lastIndex = 0;
       int displace = data.size() % rowsPerPage();
       if (displace > 0)
      lastIndex = data.size() / rowsPerPage();
       else
      lastIndex = data.size() / rowsPerPage() - 1;
       VBox box = new VBox(5);
       int page = pageIndex * itemsPerPage();
       for (int i = page; i < page + itemsPerPage(); i++)
       TableView<Person> table = new TableView<>();
       TableColumn numCol = new TableColumn("ID");
      numCol.setCellValueFactory(
       new PropertyValueFactory<Person, String>("num"));
      numCol.setMinWidth(20);
       TableColumn firstNameCol = new TableColumn("First Name");
      firstNameCol.setCellValueFactory(
       new PropertyValueFactory<Person, String>("firstName"));
      firstNameCol.setMinWidth(160);
       TableColumn lastNameCol = new TableColumn("Last Name");
      lastNameCol.setCellValueFactory(
       new PropertyValueFactory<Person, String>("lastName"));
      lastNameCol.setMinWidth(160);
      table.getColumns().addAll(numCol, firstNameCol, lastNameCol);
       if (lastIndex == pageIndex)
      table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + displace)));
       else
      table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + rowsPerPage())));
      box.getChildren().add(table);
       return box;
       @Override
       public void start(final Stage stage) throws Exception
      pagination = new Pagination((data.size() / rowsPerPage() + 1), 0);
       // pagination = new Pagination(20 , 0);
       //pagination.setStyle("-fx-border-color:red;");
      pagination.setPageFactory(new Callback<Integer, Node>()
       @Override
       public Node call(Integer pageIndex)
       if (pageIndex > data.size() / rowsPerPage() + 1)
       return null;
       else
       return createPage(pageIndex);
       public static class Person
       private final SimpleStringProperty num;
       private final SimpleStringProperty firstName;
       private final SimpleStringProperty lastName;
       private Person(String id, String fName, String lName)
       this.firstName = new SimpleStringProperty(fName);
       this.lastName = new SimpleStringProperty(lName);
       this.num = new SimpleStringProperty(id);
       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);
       public String getNum()
       return num.get();
       public void setNum(String id)
      num.set(id);
    I suppose that this can be done with StackPane but I need some other more universal way to do this because I want to expand the table size. I need to place there the combo box always in a fix position.
    Ref http://stackoverflow.com/questions/21147261/add-combo-box-into-table-pagination

    Hi. You can do it using an AnchorPane:
    AnchorPane.setBottomAnchor(comboBox, 40.0);
    AnchorPane.setLeftAnchor(comboBox, 12.0);
    The complete  example :
    import java.util.List;
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ListChangeListener;
    import javafx.collections.ListChangeListener.Change;
    import javafx.collections.ObservableList;
    import javafx.scene.Scene;
    import javafx.scene.control.Pagination;
    import javafx.scene.Node;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class TablePager extends Application {
        final ObservableList<Person> data = FXCollections.observableArrayList(
                new Person("1", "Joe", "Pesci"),
                new Person("2", "Audrey", "Hepburn"),
                new Person("3", "Gregory", "Peck"),
                new Person("4", "Cary", "Grant"),
                new Person("5", "De", "Niro"),
                new Person("6", "Katharine", "Hepburn"),
                new Person("7", "Jack", "Nicholson"),
                new Person("8", "Morgan", "Freeman"),
                new Person("9", "Elizabeth", "Taylor"),
                new Person("10", "Marcello", "Mastroianni"),
                new Person("11", "Innokenty", "Smoktunovsky"),
                new Person("12", "Sophia", "Loren"),
                new Person("13", "Alexander", "Kalyagin"),
                new Person("14", "Peter", "OToole"),
                new Person("15", "Gene", "Wilder"),
                new Person("16", "Evgeny", "Evstegneev"),
                new Person("17", "Michael", "Caine"),
                new Person("18", "Jean-Paul", "Belmondo"),
                new Person("19", " Julia", "Roberts"),
                new Person("20", "James", "Stewart"),
                new Person("21", "Sandra", "Bullock"),
                new Person("22", "Paul", "Newman"),
                new Person("23", "Oleg", "Tabakov"),
                new Person("24", "Mary", "Steenburgen"),
                new Person("25", "Jackie", "Chan"),
                new Person("26", "Rodney", "Dangerfield"),
                new Person("27", "Betty", "White"),
                new Person("28", "Eddie", "Murphy"),
                new Person("29", "Amitabh", "Bachchan"),
                new Person("30", "Nicole", "Kidman"),
                new Person("31", "Adriano", "Celentano"),
                new Person("32", "Rhonda", " Fleming's"),
                new Person("32", "Humphrey", "Bogart"));
        private Pagination pagination;
        public static void main(String[] args) throws Exception {
            launch(args);
        public int itemsPerPage() {
            return 1;
        public int rowsPerPage() {
            return 5;
        public VBox createPage(int pageIndex) {
            int lastIndex = 0;
            int displace = data.size() % rowsPerPage();
            if (displace > 0) {
                lastIndex = data.size() / rowsPerPage();
            } else {
                lastIndex = data.size() / rowsPerPage() - 1;
            VBox box = new VBox();
            int page = pageIndex * itemsPerPage();
            for (int i = page; i < page + itemsPerPage(); i++) {
                TableView<Person> table = new TableView<Person>();
                TableColumn numCol = new TableColumn("ID");
                numCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("num"));
                numCol.setMinWidth(20);
                TableColumn firstNameCol = new TableColumn("First Name");
                firstNameCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("firstName"));
                firstNameCol.setMinWidth(160);
                TableColumn lastNameCol = new TableColumn("Last Name");
                lastNameCol.setCellValueFactory(
                        new PropertyValueFactory<Person, String>("lastName"));
                lastNameCol.setMinWidth(160);
                table.getColumns().addAll(numCol, firstNameCol, lastNameCol);
                if (lastIndex == pageIndex) {
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + displace)));
                } else {
                    table.setItems(FXCollections.observableArrayList(data.subList(pageIndex * rowsPerPage(), pageIndex * rowsPerPage() + rowsPerPage())));
                box.getChildren().addAll(table);
            return box;
        @Override
        public void start(final Stage stage) throws Exception {
            ObservableList<String> options =
                    FXCollections.observableArrayList(
                    "Opt1",
                    "Opt2",
                    "Opt3");
            final ComboBox comboBox = new ComboBox(options);
            pagination = new Pagination((data.size() / rowsPerPage() + 1), 0);
            //   pagination = new Pagination(20 , 0);
            pagination.setStyle("-fx-border-color:red;");
            pagination.setPageFactory(new Callback<Integer, Node>() {
                @Override
                public Node call(Integer pageIndex) {
                    if (pageIndex > data.size() / rowsPerPage() + 1) {
                        return null;
                    } else {
                        return createPage(pageIndex);
            AnchorPane anchor = new AnchorPane();
            AnchorPane.setTopAnchor(pagination, 10.0);
            AnchorPane.setRightAnchor(pagination, 10.0);
            AnchorPane.setBottomAnchor(pagination, 10.0);
            AnchorPane.setLeftAnchor(pagination, 10.0);
            Scene scene = new Scene(anchor, 400, 250);
            AnchorPane.setBottomAnchor(comboBox, 40.0);
            AnchorPane.setLeftAnchor(comboBox, 12.0);
            anchor.getChildren().addAll(pagination, comboBox);
            stage.setScene(scene);
            stage.setTitle("Table pager");
            stage.show();
        public static class Person {
            private final SimpleStringProperty num;
            private final SimpleStringProperty firstName;
            private final SimpleStringProperty lastName;
            private Person(String id, String fName, String lName) {
                this.firstName = new SimpleStringProperty(fName);
                this.lastName = new SimpleStringProperty(lName);
                this.num = new SimpleStringProperty(id);
            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);
            public String getNum() {
                return num.get();
            public void setNum(String id) {
                num.set(id);

  • Dropdown box with query *and* static values?

    Hi guys,
    If I had a dropdown box with a LOV being generated from a query,
    Select distinct PERSON from USER_TABLE
    Bill
    Fred
    Steve
    Is it possibe to somehow add static values so that they sit permanently on top of what ever values are produced by the query?
    Null
    Not Null
    Bill
    Fred
    Steve
    Thanks,
    Neil.

    select 'Null' d, 'Null' r from dual
    union all
    select 'Not Null' d, 'Not Null' r from dual
    union all
    select distinct person d, person r from user_table
    ...like that?
    Scott

  • Dropdown box / database

    Hi,
    I have a drop down list which returns the variable into my
    sql statement to filter the records ie SELECT * FROM db WHERE
    dbcolumn= dropdown box result. All works fine except now I want to
    add an 'ALL' option into the dropdown box, but how do I fit this
    into my sql since no result I assign to the 'ALL' value in the drop
    down box will = or even be 'LIKE' the inidividual column values in
    my database. I was hoping there would be an 'OR' function in SQL so
    I could use WHERE dbcolumn = var1 OR dbcolumn = var2 . . . any
    ideas please? Thanks

    greentra wrote:
    > I was hoping there would be an 'OR' function in SQL so I
    could
    > use WHERE dbcolumn = var1 OR dbcolumn = var2
    There is. That's exactly it.
    The alternative is to set the value of ALL to "%". That's the
    SQL
    wildcard character that will match anything.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Dropdown box of Lead application

    Hi Guys,
    How can I change the dropdown default in the show dropdown box of Lead application from "My Favorites" to "My Leads". Also, if I want to add an extra listing in this dropdown box how do I achieve it.
    Thanks in advance,
    Bobby

    Hi Bobby,
    You can change the setting per user in "settings" in the search area. You can select the entry which should be shown in. This setting is forper user. If you want to make global change. There some thing called copy global query in crmc_blueprint_c. you should use that.
    To create another entry in Show dropdown. Save a query using save button in the search area.&GET dropdown gets its values from the fieldgroup(FG) assigned to the search area. There is rule to display fieds in the get dropdown. It takes all fields in the FG which are visible in the LIST. FIRST field in the FG will be shown as default in the GET DDLB.
    For example look at the CRMM_ACCOUNT shows Account ID as default. Because field PARTNER1 is first field the FG ACC_SEARCH_LOG_11 which is inlcude in the FG ACC_SEARCH_04. Move the SORT1 field to position 1 in FG ACC_SEARCH_LOG_11. Now "Sort term 1" will be defaulted in the GET DDLB
    Hope this will solve the problem
    Ravi

  • Dropdown box

    hi frnd's.
    whether we can add a value to a dropdown box at run time.
    I had done by selecting from a dropdownbox with available datas.

    Hi Suganya,
    This topic has already been discussed in the forum.
    Anyway, the solution is like this.
    In selection screens , the  code is as follows:
    REPORT  ZSHAIL_DROP_NEW                         .
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'PS_PARM'.
    VALUE-KEY = '1'.
    VALUE-TEXT = 'LINE 1'.
    APPEND VALUE TO LIST. VALUE-KEY = '2'.
    VALUE-TEXT = 'LINE 2'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    START-OF-SELECTION.
    WRITE: / 'PARAMETER:', PS_PARM.
    In this example two values will be entered in to the listbox at runtime.
    Hope ur query is answered.
    Regards,
    Sylendra.

Maybe you are looking for

  • Oracle download for Oracle 8.1.7 enterprise edition

    Hi, From where can i download Oracle 8.1.7 for win2k. Need it ASAP. Please reply.

  • Photoshop to InDesign issues

    I'm working on a magazine cover in InDesign, 8.5x11 with .25 bleeds, so the full document size is 9x11.5. I have a photo that is 1599x1066 resolution. When I have it in photoshop, I have no issues with resolution, pixels, etc. However when I try to b

  • Digital AV Adapter and iPod Touch

    I bought an Apple Digital AV Adapter, and I've been a big disappointment. I connected my iPod Touch 4G with an HDMI cable and my Sony Led TV and ... only see videos from iTunes and my photos and home movies, why not games and other applications? Is i

  • Can I run a 4-arch binary as 32bits on a 64bit Mac?

    I created a 4-arch executable (ppc/intel & 32/64bits). On a 64bit Mac it runs as a 64bit program. On a 32bit Mac it runs as 32bits. I would like to force it to run as 32bits on a 64bit Mac, without stripping out the 64bit architectures. (some seldom-

  • IMac G5 doesn' doi RSS/Atom

    I have used Safari for RSS since it started supporting it. I decided to check out some of the dedicated apps. I have found that my iMac G5 will not connect to any subscriptions using any of the programs. I have used NetNewsWireLite, Shrook, Owl and a