TableView Question

I have a form with few fields and a table view.  I want like an inline editing function, where the user would enter the fields, and click on a button.  These data should be added to the tableview on the top, clear the fields for additional data entry.  I created the application, and When I run the application, only the last entry shows up in the tableview.   This is a BSP with simple page logic (NO MVC).  The internal table is flagged auto in the page attribute.  When I look at the internal table in onInputProcessing, I dont see any data from the internal table.
Any thoughts?
Albert

Hi ,
I hope the internal tables values are getting refreshed after server event . This is common in a stateless application.
For this you should ensure that your data entry to the internal table should be in a general area where it can be populated on any server events.
For adding entries , place a button and in that particular event and add this code
"APPEND INITIAL LINE TO THE TABLE"
After adding the values , modify the internal table with the values.
Regards,
Meikandan.

Similar Messages

  • Newbie Tableview question

    I'm taking a crack at my first app.
    I have 5 items (cells) in a table.  I need the first 3 items to point to three seperate plists.  The fourth would go to a tabbar view and the last to a regular view.   I need help getting the rootcontroller to point to these different plists.  This rootcontroller tableview will look different then the plist tableviews (if that makes any sense).
    This is the format
    Item 1 -> plistA
    Item 2 -> plistB
    Item 3 -> plist C
    Item 4 -> tabbar view
    Item 5 -> viewcontroller
    Can someone provide some sample code.  You can't "dumb" this down enough for me as I'm brand new at this and need all the help I can get.
    Thanks in advance.

    Cocoa makes heavy use of the "delegate" pattern. Any time you see something like this where the first parameter is a tableView or similar, you are dealing with a delegate pattern. You can see all of the possible delegate methods if you look at the definition of the table view protocols. When you connect your controller to the table view object as a data source or delegate, these methods will get called.
    While you are in the delegate method, "self" is the controller itself. You usually can't do fancy things with the delgate method parameters because they are always passed as core Cocoa classes instead of your derived classes. You can cast them, but it is poor practice. It is better to have your own appropriately typed instance variable and make method calls on that.
    To properly call another delgate method, you would do something like this:
    CGFloat height = [self tableView: tableView heightForHeaderInSection: section];

  • Tableview question in BSP programming

    Hi All,
    I am new to the HTMLB programming.
    I am trying to use a Tableview in a BSP page.
    This table contains multiple-page data.
    When I navigate to a certain page in this view(for example page 3)and select a row, it triggers an event and branches to another view, which is fine.
    However when I navigate back to this tableview, the tableview does not keep the selected page and row, it always goes to the first page and shows the first row.
    How can I keep the selected page and row in the tableview?
    Any attribute in the tableview I need to set up in order to do this?
    Thanks a lot,
    Bin

    supply the tableview attributes 'SelectedRowKey' or 'SelectedRowIndex' with a class attribute where you collect all selection.
    Cheers.
    Marc

  • HTMLB Tableview: questions..;

    Hello,
    Simply I output my table as follows :
    <htmlb:form>
      <htmlb:tableView id              = "tv1"
                       visibleRowCount = "10"
                       selectionMode   = "lineEdit"
                       table           = "<%=mytable%>"
                       iterator        = "<%=iterator%>" />
    </htmlb:form>
    (NOTE: where iterator is type IF_HTMLB_TABLEVIEW_ITERATOR)
    Ok, its nice, but I need to customize things a bit.  I have 5 fields... and I want 4 uneditable, and the 5th able to be updated and modified back into the SAP table.
    How can I do this?
    Thanks,
    Timothy

    Hello,
    I have read many times the iterator weblogs, especially 830.  I understand most but still have trouble.  Allow me to show you what I have, and please tell me what is wrong.
    My BSP, index.htm:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="EPCOT" >
        <%
      SELECT * FROM ZEPCT002 INTO TABLE epcots
               WHERE ZANNE = anne
               AND   ZPAYS = pays.
        %>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "12"
                           selectionMode   = "lineEdit"
                           table           = "<%= epcots %>"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    For my iterator, I have made the 5th field an input field (CL_HTMLB_INPUTFIELD).  And the 6th field an ICON:
    image2->onclick = 'OnSaveClick'.
            image2->src = cl_bsp_mimes=>sap_icon( `ICON_SYSTEM_SAVE` ).
    I want, when user selects a line, enters text in this 5th field, and then clicks the icon... an event to write/modify directly this change into my table (SAP table I created).  So, for index.htm, in OnInputProcessing, I have:
    DATA: event TYPE REF TO CL_HTMLB_EVENT,
          id type string,
          row type string,
          col type string,
          other type string.
    CLASS cl_htmlb_manager DEFINITION LOAD.
    clear: event, id, row, col, other.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    id = event->id.
    split id at '_' into other row col.
    case col.
    WHEN '6'.
    <b>?????</b>
    endcase.
    My <b>?????</b> is where I have tried many things and just dont get it.  In weblog 830, I see what he is doing, but some things he does don't work for me, like:
    id = htmlb_event->id.
        case htmlb_event->server_event.
          when 'OnUpdateUserClick'.
            data: event1 type ref to cl_htmlb_event_selection.
            event1 ?= htmlb_event.
            read table model->ug_users index i_row assigning <irow>.
    this <b>htmlb_event->id</b>, <b>htmlb_event</b>, and <b>model->ug_users</b>... for these I get syntax errors.
    So, could you tell me what I need to do here?
    Any guidance would be greatly appreciated,
    Thanks,
    Tim

  • Getting filtered values from TableView

    Hi,
      We have a TableView whose columns can be sorted. Iwant to select a few rows and make the selected rows editable in another page.
      If it is a unsorted/unfiltered TableView, am able to do it as the ABAP Internal Table and the TableView are the same in terms of record index positions. But am facing problem after i sort/filter the TableView because now the index of the TableView are different from the index of the ABAP Internal Table present in server.
      Anybody who has dealt with this problem earlier and can guide us.
    Thanks,
    Chathia.

    Welcome to SDN.
    Search the forum before you post a question, generally in mose cases you would find a answer, if not you can post a new thread.
    here is a list of threads where your question was discussed. (as others mentioned its about using keyColumn attribute of htmlb:tableview)
    check out these threads, its got code samples as well.
    Re: HTMLB Tableview: questions..;
    Re: pic actual data from a table view
    Re: Error when using Filter and Sort together on a tableview
    Re: Change rendering of the title column...
    Have a great time in SDN.
    Regards
    Raja

  • Scrollview with Tableview, Tableviewcell touch feedback question

    I am trying to make a scrollview with some tableview in it so that I can slide new tableview with drag&slide. Does anyone know if this is all possible? I tried to implement this but scrollview blocks all the event and doesn't let the table view to scroll up&down.
    My second questions is if it is possible to highlight the some portion of tableviewcell when touched? The whole cell is highlighted to blue but I would like only some part of the cell to be highlighted to blue. Would it be possible?
    Thanks.

    Never assume they will fix it immediately. You have no way of being certain that they will even be able to fix it at all without sending it off to a service centre.
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • TableView OnClientRowSelection Question

    Hi All,
    I implemented OnClientRowSelection for my tableview, however, the problem I have now is that after the javascript executes, the actual row selection does not take place.
    So, when I click on the row selection rectangle, my javascript works well, but then the processing stops and the row remains visually unselected.
    Do you know if there is a way to get around that?
    Thanks!
    Roman D.

    Hi,
    No need to use Client Row selection/triggering a JS in your case. You have an attribute: <b>p_edit_mode</b> which will be initial if that row is not initial. Using that you can display/hide the drop down list box. Try this code:
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
         WHEN 'MATNR'.
          IF p_edit_mode IS NOT INITIAL.
            DATA: mat_help_row type IHTTPNVP.
            mat_help_row-NAME = '1316'     .
            mat_help_row-VALUE = '1316-LEOCITRAZINE-WM'.
            append mat_help_row to mat_help.
            mat_help_row-NAME = '1276'     .
            mat_help_row-VALUE = '1276-VALDECOXIB'.
            append mat_help_row to mat_help.
            get reference of mat_help into M_MAT_REF.
            p_replacement_bee = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
                                  id                =  p_cell_id
                                  selection         = m_row_ref->MATNR
                                  table             = me->m_mat_ref
                                  nameOfKeyColumn   = 'NAME'
                                  nameOfValueColumn = 'VALUE'  ).
      ENDIF.
    ENDCASE.
    endmethod.
    Hope this helps,
    Regards,
    Ravikiran.

  • Javafx 2.1: TableView CSS Removal Question

    Hi all i was hoping someone would be able to advise me on a query as regards TableView CSS.
    I have a tableView, inside of which i have a CellFactory to render my data. Inside of which i have the following condition check. That when found true i want to highlight the full row of the table.
    if (checkData(FullData, TableItem)) {
    this.getTableRow().getStyleClass().add("triggerHighLight");
    } else {
    this.getTableRow().getStyleClass().remove("triggerHighLight");
    CSS Entry
    #myTable .triggerHighLight{
    -fx-background-color: #ebc500;
    #myTable .triggerHighLight .table-cell {
    -fx-text-fill: black;
    This works fine.
    However, if i want to highlight the row and also change the color of the text, i need to add .table-cell in order to change the text color. But when i go to remove the style. The change of text color remains. Would anyone be able to advise how i can remove the fx-text-fill also? I have tried the below but this dosnt appear to work.
    this.getTableRow().getStyleClass().remove("triggerHighLight .table-cell");

    Have you tried 2.2?
    Add a style that reverts the color back to the caspian default:
    #myTable .table-cell {
        -fx-text-fill: -fx-text-inner-color;
    }By the way, this.getTableRow().getStyleClass().remove("triggerHighLight .table-cell") will not work because the styleClass property is a List<String> (technically and ObservableList<String>) so you need to remove each styleClass individually.
        this.getTableRow().getStyleClass().remove("triggerHighLight");
        this.getTableRow().getStyleClass().remove("table-cell");
        But then, you really don't want to remove the table-cell styleClass.

  • Question abt using 2 tableview

    Hi, I 'm a iphone programming newbie. I m trying to implement an app with multi-level tableviews.
    The idea is if someone selects something on the first screen say then a new view opens(tableview)
    Quote:
    car make> list of models
    Honda > Acura, S2000,accord ...
    My challenge is to show the list of models in a new tableview & secondly change the size of hte list depending on the car selected.
    I have programmed so that when i select 'Honda' a new tableview opens. How do i populate data for the second table??
    Any suggestions on how to proceed?

    Hi JB -
    jBourne08 wrote:
    I have programmed so that when i select 'Honda' a new tableview opens. How do i populate data for the second table??
    If you're comfortable with core data, that would probably offer the most general solution. But if not, I think plists will work just fine for what you described. If you're new to Cocoa, the plist solution is much easier to understand and maintain, so that's the approach I'll go over here.
    I'll assume you know what a property list is, but if you don't, instructive references are plentiful (see [Quick Start for Property Lists|https://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual /PropertyLists/QuickStartPlist/QuickStartPlist.html#//apple_ref/doc/uid/10000048 i-CH4-SW5] or [iPhone tutorial: Storing and retrieving information using plists|http://humblecoder.blogspot.com/2009/05/iphone-tutorial-storing-and-retr ieving.html]). For what you've described thus far, we just need to store arrays of dictionaries. The top level file will look something like this:
    /* cars.plist */
    Root (array)
    Item 1 (dictionary)
    Make (string) Honda
    Image (string) Honda.png
    etc.
    Item 2 (dictionary)
    Make (string) Ford
    Image (string) Ford.png
    etc.
    etc.
    Of course if you don't need anything in the dictionaries except for the Make, the above can be reduced to an array of strings instead of an array of dictionaries. But an array of dictionaries is a good choice if you think you might want something besides just the one string (e.g. a logo).
    Once you know how to make the first plist, the second level plists will be easy, e.g.:
    /* honda.plist */
    Root (array)
    Item 1 (dictionary)
    Model (string) Accord
    Mileage (number) 31
    Price (number) 21055
    Image (string) Accord.png
    etc.
    Item 2 (dictionary)
    Model (string) Civic
    Mileage (number) 34
    Price (number) 15455
    Image (string) Civic.png
    etc.
    etc.
    Now we just pass the name of the selected Make to the second-level controller, which (luckily!) has an instance variable for this very purpose. e.g.:
    // RootViewController.m (first table view delegate)
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // create the second level view controller
    SecondViewController *secondViewController = [[SecondViewController alloc]
    initWithNibName:@"SecondViewController" bundle:nil];
    // get the name of the selected Make
    NSDictionary *dict = [self.dataArray objectAtIndex:indexPath.row];
    NSString *selectedMake = [dict objectForKey:@"Make"];
    // pass the selected Make to the new view controller
    secondViewController.selectedMake = selectedMake;
    // push the second view controller onto the navigation stack
    [self.navigationController pushViewController:secondViewController animated:YES];
    // reduce the second view controller's retain count to 1
    [secondViewController release];
    When the secondViewController is pushed onto the stack it's view will load, and the controller will read the data it needs:
    // SecondViewController.m
    - (void)viewDidLoad {
    // obtain the correct data file pathname from the selectedMake
    NSString *pathName = [[NSBundle mainBundle]
    pathForResource:self.selectedMake ofType:@"plist"];
    // read the data file into the data source array
    self.dataArray = [NSArray arrayWithContentsOfFile:pathName];
    // display the data in the tableView
    [tableView reloadData];
    Note viewDidLoad in the root controller will look just like the above except the plist file name will be hardcoded (@"cars").
    Disclaimer: These example methods aren't tested and may have syntax errors or throw runtime exceptions. They're only intended to illustrate the basic idea. If you want to use this solution, but can't make the examples work, I'll be happy to clean them up for you.
    Hope that helps!
    - Ray

  • Question about HTMLB:tableView with nested tag

    Dear experts.
    1. I have one question that can I code like below.
    2. And what is the mean of "$something$". when I run the page I met the error $TVCID$ is no more supported from design2003.
    <htmlb:tableViewColumn  columnName    = "myicon"
                            type          = "user"
                            title         = "Image"
                            horizontalAlignment="center" >
         <htmlb:link         id            = "$TVCID$"
                             onClick       = "$CARRNAME$"
                             tooltip       = "$CARRNAME$">
          <htmlb:image        src           = "$TVCVALUE$"
                              alt           = "$TVCVALUE$"
                              tooltip       = "$CARRNAME$" />
         </htmlb:link>
    </htmlb:tableViewColumn>

    Hi.
    You have more options to solve the problem.
    First you can set your design to 2002.
    <htmlb:content design = "DESIGN2002" >
    or
    you can use an iterator
    or
    you can use the following code
    <htmlb:tableViewColumn columnName = "TVCVALUE"
                           type       = "LINK"
                           linkClickTarget = "ONCLICK" (<- InputProcessing)
                           title      = "Image"
                           horizontalAlignment = "center"
                           tooltip    = "CARRNAME" >
    </htmlb:tableViewColumn>
    Hope this helps
    Greetings
    Claudia

  • 2 questions about  TableView

    1-With table.getSelectionModel().selectedItemProperty() returns the actual selected item.
    Well, I want to get the last selected item too, a method like lastSelectedItemProperty() ?
    2-Is there a way to create a calculate column, that is not a property of the actual bean class passed to this TableView in an ObservableList ? I mean a property of another bean or a value that is calculated by a bind with the properties of the actual bean and others.

    Q1
    liveTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<LiveTableItem >()
         @Override
         public void changed(ObservableValue<? extends LiveTableItem> observable, LiveTableItem oldValue, LiveTableItem newValue)
              //you get current and previous selected object. either of them could also be null so check for that.
         });

  • 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

  • TableView - How to update a running balance column after any other column in the view is re-sorted

    To keep this simple and to illustrate a problem that I am trying to solve let's say we have
    a domain class that contains an income per day.
    This class has two persistent properties - populated from a database table - date and income.
    And there is one transient property - running balance - that shows the accumulated income
    starting from the first record. This property is not persisted and it is used only to show
    the running/accumulated income in a table view.
    This domain object is shown in a table view with three columns:
         - date
         - income
         - running balance
    The first two columns - date and income - are sortable. When the user clicks on the column
    heading these can will be sorted in ascending or descending order. The running balance
    column needs to reflect this change and be correctly updated.
    So the question is : how would you implement the running balance update after the data in
    the table has been updated by the user?
    Take 1)
    =============
    The obvious approach is to use "setOnSort" method to consume the SortEvent event and re-sort the
    data but the sort-event does not contain any useful information that would tell from which column
    the sort event originated.
    Take 2)
    =============
    Found a possible solution:
         - TableView.getSortOrder() returns a list that defines the order in which TableColumn instances are sorted after the user clicked one or more column headings.
         - TableColumn.getSortType() returns the sort type - ascending/descending.
         - This info can be used in the TableView.setOnSort() event handler to re-sort the data and update the balance at the same time.
    Take 3)
    =============
    When the TableView.setOnSort() event handler is called the data is already sorted therefore the only thing that needs to be done is to update the running balance.

    I  think I understand what you're trying to do. If I've missed it, apologies, but I think this will provide you with something you can work from anyway.
    I would listen to the data instead of watching specifically for sorting. This will be much more robust if you add new functionality later (such as adding and removing rows, editing the data that's there, etc).
    Specifically, for the runningBalance column, create a cellValueFactory that provides a DoubleBinding; this binding should listen for changes to the data and compute the value by running through the table's items up to the point of the item for which it's displaying the value. (Hope you can untangle that sentence.)
    Example. The important part is the cellValueFactory for the cumulativeAmountCol. I guess I should mention that you shouldn't try this exact approach with very large tables as the performance might be pretty bad (computations of the order of n x m on changing data, where n is the number of rows in the table and m is the number of visible rows in the table).
    import java.text.DateFormat;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Random;
    import javafx.application.Application;
    import javafx.beans.Observable;
    import javafx.beans.binding.DoubleBinding;
    import javafx.beans.property.DoubleProperty;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.scene.Scene;
    import javafx.scene.control.TableCell;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableColumn.CellDataFeatures;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class CumulativeTableColumnExample extends Application {
      private final static int NUM_ITEMS = 20 ;
    @Override
      public void start(Stage primaryStage) {
      final TableView<LineItem> table = new TableView<>();
      // using the extractor here makes sure the table item list fires a list changed event if any amounts change
      // this enables the cumulative amount column to keep up to date when the amount in a different row changes.
      table.setItems(FXCollections.observableList(createRandomData(), new Callback<LineItem, Observable[]>() {
          @Override
          public Observable[] call(LineItem item) {
            return new Observable[] {item.amountProperty()};
      final TableColumn<LineItem, Date> dateCol = new TableColumn<>("Date");
      final TableColumn<LineItem, Number> amountCol = new TableColumn<>("Amount");
      final TableColumn<LineItem, Number> cumulativeAmountCol = new TableColumn<>("Cumulative Amount");
      table.getColumns().addAll(Arrays.asList(dateCol, amountCol, cumulativeAmountCol));
      dateCol.setCellValueFactory(new PropertyValueFactory<LineItem, Date>("date"));
        amountCol.setCellValueFactory(new PropertyValueFactory<LineItem, Number>("amount"));
        cumulativeAmountCol.setCellValueFactory(new PropertyValueFactory<LineItem, Number>("amount"));
        cumulativeAmountCol.setSortable(false); // otherwise bad things might happen
      final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
      dateCol.setCellFactory(new Callback<TableColumn<LineItem, Date>, TableCell<LineItem, Date>>() {
          @Override
          public TableCell<LineItem, Date> call(TableColumn<LineItem, Date> col) {
            return new TableCell<LineItem, Date>() {
              @Override
              public void updateItem(Date date, boolean empty) {
                super.updateItem(date, empty);
                if (empty) {
                  setText(null);
                } else {
                  setText(dateFormat.format(date));
      cumulativeAmountCol.setCellValueFactory(new Callback<CellDataFeatures<LineItem, Number>, ObservableValue<Number>> () {
          @Override
          public ObservableValue<Number> call(CellDataFeatures<LineItem, Number> cellData) {
            final LineItem currentItem = cellData.getValue() ;
            DoubleBinding value = new DoubleBinding() {
                super.bind(table.getItems());
              @Override
              protected double computeValue() {
                double total = 0 ;
                LineItem item = null ;
                for (Iterator<LineItem> iterator = table.getItems().iterator(); iterator.hasNext() && item != currentItem; ) {
                  item = iterator.next() ;
                  total = total + item.getAmount() ;
                return total ;
            return value;
        final NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();
      // generics hell.. can't wait for lambdas...
      final Callback<TableColumn<LineItem, Number>, TableCell<LineItem, Number>> currencyCellFactory = new Callback<TableColumn<LineItem, Number>, TableCell<LineItem, Number>>() {
          @Override
          public TableCell<LineItem, Number> call(TableColumn<LineItem, Number> column) {
            return new TableCell<LineItem, Number>() {
              @Override
              public void updateItem(Number amount, boolean empty) {
                if (empty) {
                  setText(null) ;
                } else {
                  setText(currencyFormat.format(amount));
        amountCol.setCellFactory(currencyCellFactory);
        cumulativeAmountCol.setCellFactory(currencyCellFactory);
        BorderPane root = new BorderPane();
      root.setCenter(table);
      primaryStage.setScene(new Scene(root, 600, 400));
      primaryStage.show();
      public List<LineItem> createRandomData() {
        Random rng = new Random();
        List<LineItem> items = new ArrayList<>();
        for (int i=0; i<NUM_ITEMS; i++) {
          Calendar cal = Calendar.getInstance();
          cal.add(Calendar.DAY_OF_YEAR, rng.nextInt(365)-365);
          double amount = (rng.nextInt(90000)+10000)/100.0 ;
          items.add(new LineItem(cal.getTime(), amount));
        return items ;
      public static void main(String[] args) {
      launch(args);
    public static class LineItem {
        private final ObjectProperty<Date> date ;
        private final DoubleProperty amount ;
        public LineItem(Date date, double amount) {
          this.date = new SimpleObjectProperty<>(this, "date", date);
          this.amount = new SimpleDoubleProperty(this, "amount", amount);
        public final ObjectProperty<Date> dateProperty() {
          return date;
        public final Date getDate() {
          return date.get();
        public final void setDate(Date date) {
          this.date.set(date);
        public final DoubleProperty amountProperty() {
          return amount ;
        public final double getAmount() {
          return amount.get();
        public final void setAmount(double amount) {
          this.amount.set(amount);

  • Need the answers for following questions?

    can anybody  say the answers  for following questions?
    Data Dictionary :
    1) Diff between Append Structure and Include Structure ?
    2) What is Table Type ?
    3) How the table entries are going to store, Is it Case sensitive, or in Capital Letter or in Small letter or as we give ?
    4) How many indexes we can give for a table ?
    Reports :
    1) How can we enable the verticle scroll in a table control that comes in 2 nd screen of ME 21 T.code ?
    2) What is BSEG table  ?
    3) How can you create Table Control ?
    4) Diff between At Selection Screen on Field & At selection Screen Output ?
    5) What are things we need to take care before using the Read Statement ?Example of Read Statement with Index ?
    6) How many ways are there to select a Particular Data from the table ?
    7) I want fetch the 10 th row and 5 th column from the list, How will you do it ?
    BDC :
      1) If we write Transaction Statement 2 times for a application What happens ?
      2) If for Example , I had to upload 10 items for one header. The 5 items are uploaded, but the Sixth record is not uploaded ? How can you upload that data from 6 th Record ?
    3) Tell me the Detail Steps in uploading the Data from Application Server ?
    4) One Scenario, i am having 10 records in a file & when i am uploading the data everytime the 1st record is overlapping with already existing data, How you are going to handle this  ?
    5) What is meant by MASK in Upload function ?
    6) what are the parameters you will pass withine BDC_INSERT ?
    SAP- Script :
    1) I want to display quantity & Price based on Particular Language and Country in SAP Script , How we can do that ? One particular statement is there for that, What is that ?
    2) The Logo Upaloaded got Inverted , then How you are going to handle this situation ?
    3) The logo uploaded using RSTXLDMC programe, Where it is going to store ?
    4) can we see Tiff files in SE 78 T.code ? What are the file extension of Logo we can upload to SAP
    5) How to check the changes made in the standard layout set , other than using Utilities--- -> Print preveiw ?
    User Exit :
    1) Suppose i have used a fuction Module Exit, But is in Inactive status , What is The error it is going to give during runtime ?
    2) Suppose i want to delete the Function Module exit from one project and i want to use it for another project ? what are steps you follow to delete it  ?
    BADI
    1) Is that all the Predefined BADI's present  in SAP are reusable ?

    Data Dictionary :
    1) Diff between Append Structure and Include Structure ?
    Append Structure - This structure can be used only one time to append. Append structures are useful for standard tables.
    Include Structure - This structure can be used in multiple tables. Include structures are useful for our own custom tables.
    2) What is Table Type ?
    A table type is a type that describes the structure and functions of an internal table in the ABAP program. In simple words table table will act as an internal table without header line.
    3) How the table entries are going to store, Is it Case sensitive, or in Capital Letter or in Small letter or as we give ?
    Yes it is case sensitive.
    Use translate statement to convert Upper case or Lower case.
    4) How many indexes we can give for a table ?
    1 primary index automatically created and we can create up to 15 secondary indexes.
    Reports :
    1) How can we enable the verticle scroll in a table control that comes in 2 nd screen of ME 21 T.code ?
    set <tablecontrol>-lines = 0.this code you have to put in one suitable userexit.then it applies to standard tcode ME21N.
    2) What is BSEG table ?
    BSEG table is a FI table for Accounting Document details.
    3) How can you create Table Control ?
    controls : tabcont type tableview using screen '3000'.
    PROCESS AFTER INPUT
    MODULE mod AT EXIT-COMMAND.
    LOOP AT itab_table or LOOP "depending on whether we are using AT int_table
    MODULE modify_int_table.
    ENDLOOP.
    MODULE user_command.
    4) Diff between At Selection Screen on Field & At selection Screen Output ?
    AT-SELECTION SCREEN ON FIELD
    is to validate a particular selection screen field.
    if any error comes it will open only this field and other fields will be disabled.
    AT-SELECTION SCREEN OUTPUT
    is used to do dynamic screen modifications on the screen.
    5) What are things we need to take care before using the Read Statement ?Example of Read Statement with Index ?
    do sort before read data from table.
    6) How many ways are there to select a Particular Data from the table ?
    using views or directly u can select data.
    7) I want fetch the 10 th row and 5 th column from the list, How will you do it ?
    sorry...
    BDC :
    1) If we write Transaction Statement 2 times for a application What happens ?
    i think u got message like already that transaction was called like this..
    2) If for Example , I had to upload 10 items for one header. The 5 items are uploaded, but the Sixth record is not uploaded ? How can you upload that data from 6 th Record ?
    within the loop u have to write the code for the 6th record and then process again.
    3) Tell me the Detail Steps in uploading the Data from Application Server ?
    use DATASETS for uploading data from application server.
    4) One Scenario, i am having 10 records in a file & when i am uploading the data everytime the 1st record is overlapping with already existing data, How you are going to handle this ?
    write CLEAR statement before endloop.
    5) What is meant by MASK in Upload function ?
    sorry...
    6) what are the parameters you will pass withine BDC_INSERT ?
    TCODE-import parameter
    DYNPROTAB-tables parameter
    SAP- Script :
    1) I want to display quantity & Price based on Particular Language and Country in SAP Script , How we can do that ?
    One particular statement is there for that, What is that ?
    Actually u will get quantity and price based on language using SE63 transaction.it is used for language conversion.
    2) The Logo Upaloaded got Inverted , then How you are going to handle this situation ?
    just check the printer settings again.
    3) The logo uploaded using RSTXLDMC programe, Where it is going to store ?
    STXBITMAPS is the table which stores all the logos.
    4) can we see Tiff files in SE 78 T.code ? What are the file extension of Logo we can upload to SAP
    No we cannot upload .tiff files using SE78 ..here u can upload only bmp and jpg logos...if u want to upload .tiff files go to standard program RSTXLDMC..by using this you can do.
    5) How to check the changes made in the standard layout set , other than using Utilities--- -> Print preveiw ?
    by executing the formprogram.
    User Exit :
    1) Suppose i have used a fuction Module Exit, But is in Inactive status , What is The error it is going to give during runtime ?
    u didn't get any error message but that functionality cannot applied to it..thats it.
    2) Suppose i want to delete the Function Module exit from one project and i want to use it for another project ? what are steps you follow to delete it ?
    first go to that perticular project..within this u have one enhancement..just click on that one...and go to that function module which u are assigned..remove the code and activate..delete enhancement and activate that project..now u can use that enhancement in other projects.
    BADI
    1) Is that all the Predefined BADI's present in SAP are reusable ?
    here reusable means u can do multiple implementations for all BADI's.
    Rewards if it helpful.
    Dara.

  • Tableview onClientRowSelection - Extremely Urgent

    Could somebody please help me on this one?
    I have a tablevire with onRowSelection generating server event.
    I want to add onClientRowSelection = <func> to the tableview, where <func> will be a javascript function asking a pop-up question "Yes/No" - selecting Yes would continue and generate the server event; No will cancel the server event.
    I got the js function in place but somehow cannot call it using onClientRowSelection. Any idea?
    Thanks.
    Partho

    Raja, Thanks for your reply. Please help me with some code as I am really struggling with this one.
    In my controller I have defined the interface
    if_htmlb_tableview_iterator
    Under the method section I have defined render_row_start, render_cell_start and get_column_definition for this interface.
    I've created a variable on the controller c_iterator as TYPE REF TO if_htmlb_tableview_iterator.
    I pass the variable in my DO_REQUEST
      DATA: v_runreview TYPE REF TO if_bsp_page.
      v_runreview = create_view( view_name = 'zrun2.htm').
      CREATE OBJECT c_iterator TYPE zcl_run_review. "Name of controller class
      v_runreview->set_attribute( name = 'v_tviterator'         value = c_iterator ).
    v_tviterator is defined as an attribute on the view as
    v_tviterator TYPE REF TO if_htmlb_tableview_iterator
    and used in the tableview
           <htmlb:tableView id                    = "MyTV1"
                            keyColumn             = "REVIEWNUMBER"
                            headerText            = "<%= v_pagetitle %>"
                            headerVisible         = "FALSE"
                            design                = "ALTERNATING"
                            visibleRowCount       = "3"
                            onRowSelection        = "MyEventRowSelection"
                            selectionMode         = "<%= v_selectionmode %>"
                            selectedRowIndex      = "<%= v_rowselection %>"
                            visibleFirstRow       = "<%= v_firstvisiblerow %>"
                            emptyTableText        = "No data found"
                            footerVisible         = "TRUE"
                            keepSelectedRow       = "TRUE"
                            sort                  = "SERVER"
                            filter                = "SERVER"
                            width                 = "100%"
                            table                 = "//vmodelsetup/m_reviewhead"
                            iterator              = "<%= v_tviterator %>" />
    =======================
    Now, with all the code in place, can you explain me where and how to implement this new class CL_HTMLB_CLIENT_ITERATOR so that we could use the page_context attribute and use the js function. If I simply try and replace the attributes's TYPE REF TO definition to this class then it doesn't work.
    Your feedback will be appreciated.
    Partho

Maybe you are looking for