TableView NPE

Hi,
FYI, and NPE in a table:
java.lang.NullPointerException
     at javafx.scene.control.TableView$TableViewArrayListSelectionModel.isSelected(TableView.java:2095)
     at javafx.scene.control.TableView$TableViewArrayListSelectionModel.isSelected(TableView.java:2080)
     at javafx.scene.control.TableRow.updateSelection(TableRow.java:237)
     at javafx.scene.control.TableRow.access$100(TableRow.java:37)
     at javafx.scene.control.TableRow$1.invalidated(TableRow.java:65)
     at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:140)
     at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
     at javafx.beans.property.ReadOnlyIntegerWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:154)
     at javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(ReadOnlyIntegerWrapper.java:120)
     at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:89)
     at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:122)
     at javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:91)
     at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1366)
     at com.sun.javafx.scene.control.skin.VirtualFlow.addLeadingCells(VirtualFlow.java:875)
     at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:831)
     at com.sun.javafx.scene.control.skin.VirtualFlow.setCellCount(VirtualFlow.java:174)
     at com.sun.javafx.scene.control.skin.TableViewSkin.updateRowCount(TableViewSkin.java:604)
     at com.sun.javafx.scene.control.skin.TableViewSkin.layoutChildren(TableViewSkin.java:397)
     at javafx.scene.Parent.layout(Parent.java:900)
     at javafx.scene.Parent.layout(Parent.java:910)
     at javafx.scene.Parent.layout(Parent.java:910)
     at javafx.scene.Scene.layoutDirtyRoots(Scene.java:451)
     at javafx.scene.Scene.doLayoutPass(Scene.java:424)
     at javafx.scene.Scene.access$2800(Scene.java:132)
     at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:1750)
     at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:292)
     at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:398)
     at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:330)
     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
     at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
     at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
     at java.lang.Thread.run(Thread.java:722)

Hi,
Yes, apologies. There is nothing fancy about what I do, a simple table with data added to it.
It only happens when I click (select) a row, on the next update, this npe happens. I think it is outside my code.
A small snippet would be fairly hard to implement.....

Similar Messages

  • How to display an alert message on click of link in tableview

    Hi,
    Following is the code for a tableview in layout section of a BSP( i have specified only one tableview column here). The requirement is to display an alert message on click of link in the first column that is "evbeg". Can anyone please help me how to achieve this? Appreciate quick response on this.
    CREATE OBJECT lr_dateiterator TYPE cl_lso_bsp_it_trdates
                EXPORTING im_application = application
                im_tform = trainingform.
            <htmlb:tableView id            = "dates"
                                 table         = "<%= dates %>"
                                 iterator      = "<%= lr_dateiterator %>"
                                 width         = "100%"
                                 rowCount      = "<%= lp_len %>"
                                 footerVisible = "FALSE"
                                 sort          = "SERVER" >
                  <htmlb:tableViewColumn columnName    = "evbeg"
                                         type          = "user"
                                         title         = "<%= otr(LSO_FRONTEND/schedule) %>"
                                         tooltipHeader = "<%= otr(LSO_FRONTEND/schedule) %>"
                                         sort          = "TRUE" >
                  </htmlb:tableViewColum>
    Thanks and Regards,
    Archana.

    you have to code in the iterator for this.
    in the render_cellstart method of the iterator you need to code.
    this is for a column.
    when 'MATNR'.
    data: text type string.
    text = 'disp_alert()'.   "this java script i placed in the page
    data: lo_link type ref to cl_htmlb_link.
      create object lo_link.
         lo_link->id = p_cell_id.
         lo_link->onclientclick = text.
         lo_link->text = <fs>-matnr.
         p_replacement_bee = lo_link.
    below is the java script i added in my page..
    <  sc ri   pt type="text/javasc ript"   >
    f u n  ction disp_alert()
    a  l e  rt("helloworld");
    < /s  c ript >

  • SIGABRT error when choosing a row of a tableview

    Hello, I am creating an iPhone app and I keep getting a "SIGABRT" error. I have a tableview where I want a separate webpage pushed for each rows.
    Currently, what happens is that the table displays; however, when I pick a row it gives me a SIGABRT error. Please help.
    Here is my first view (table view) .h file:
    #import <UIKit/UIKit.h>
    @interface videoTableViewController : UITableViewController
        NSArray *videos;
    @property (strong, nonatomic) NSArray *videos;
    @end
    Here is my first view (table view) .m file:
    #import "videoTableViewController.h"
    #import "videoURLController.h"
    @interface videoTableViewController ()
    @end
    @implementation videoTableViewController
    @synthesize videos;
    - (id)initWithStyle:(UITableViewStyle)style
        self = [super initWithStyle:style];
        if (self) {
            // Custom initialization
        return self;
    - (void)viewDidLoad
        [super viewDidLoad];
        videos = [NSArray arrayWithObjects:@"Welcome", @"Hello", @"Goodbye", nil];
        // Uncomment the following line to preserve selection between presentations.
        // self.clearsSelectionOnViewWillAppear = NO;
        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem;
    - (void)viewDidUnload
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    #pragma mark - Table view data source
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
        // Return the number of sections.
        return 1;
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
        // Return the number of rows in the section.
        return [self.videos count];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        static NSString *CellIdentifier = @"videoCell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        // Configure the cell...
        NSUInteger row = [indexPath row];
        cell.textLabel.text = [videos objectAtIndex:row];
        if (row == 0)
            cell.detailTextLabel.text = @"Welcome";
        if (row == 1)
            cell.detailTextLabel.text = @"What we value";
        if (row == 2)
            cell.detailTextLabel.text = @"What does Honor mean?";
        return cell;
    // Override to support conditional editing of the table view.
    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
        // Return NO if you do not want the specified item to be editable.
        return YES;
    // Override to support editing the table view.
    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
        if (editingStyle == UITableViewCellEditingStyleDelete) {
            // Delete the row from the data source
            [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
        else if (editingStyle == UITableViewCellEditingStyleInsert) {
            // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    // Override to support rearranging the table view.
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
    // Override to support conditional rearranging of the table view.
    - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
        // Return NO if you do not want the item to be re-orderable.
        return YES;
    #pragma mark - Table view delegate
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
         videoURLController *detailViewController = [[videoURLController alloc] initWithNibName:@"videoTableViewController" bundle:nil];
        UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
        if (indexPath.row == 0){
            [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
         // Pass the selected object to the new view controller.
         [self.navigationController pushViewController:detailViewController animated:YES];
    @end
    Here is my videoURLController (second view/web view) .h file?
    #import <UIKit/UIKit.h>
    @interface videoURLController : UIViewController
    @property (strong, nonatomic) IBOutlet UIWebView *webView;
    @end
    Here is my videoURLController (second view/web view) .m file?
    #import "videoURLController.h"
    @interface videoURLController ()
    @end
    @implementation videoURLController
    @synthesize webView;
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
        self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
        if (self) {
            // Custom initialization
        return self;
    - (void)viewDidLoad
        [super viewDidLoad];
      // Do any additional setup after loading the view.
    - (void)viewDidUnload
        [super viewDidUnload];
        // Release any retained subviews of the main view.
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    @end

    Hello, I am creating an iPhone app and I keep getting a "SIGABRT" error. I have a tableview where I want a separate webpage pushed for each rows.
    Currently, what happens is that the table displays; however, when I pick a row it gives me a SIGABRT error. Please help.
    Here is my first view (table view) .h file:
    #import <UIKit/UIKit.h>
    @interface videoTableViewController : UITableViewController
        NSArray *videos;
    @property (strong, nonatomic) NSArray *videos;
    @end
    Here is my first view (table view) .m file:
    #import "videoTableViewController.h"
    #import "videoURLController.h"
    @interface videoTableViewController ()
    @end
    @implementation videoTableViewController
    @synthesize videos;
    - (id)initWithStyle:(UITableViewStyle)style
        self = [super initWithStyle:style];
        if (self) {
            // Custom initialization
        return self;
    - (void)viewDidLoad
        [super viewDidLoad];
        videos = [NSArray arrayWithObjects:@"Welcome", @"Hello", @"Goodbye", nil];
        // Uncomment the following line to preserve selection between presentations.
        // self.clearsSelectionOnViewWillAppear = NO;
        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem;
    - (void)viewDidUnload
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    #pragma mark - Table view data source
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
        // Return the number of sections.
        return 1;
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
        // Return the number of rows in the section.
        return [self.videos count];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        static NSString *CellIdentifier = @"videoCell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        // Configure the cell...
        NSUInteger row = [indexPath row];
        cell.textLabel.text = [videos objectAtIndex:row];
        if (row == 0)
            cell.detailTextLabel.text = @"Welcome";
        if (row == 1)
            cell.detailTextLabel.text = @"What we value";
        if (row == 2)
            cell.detailTextLabel.text = @"What does Honor mean?";
        return cell;
    // Override to support conditional editing of the table view.
    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
        // Return NO if you do not want the specified item to be editable.
        return YES;
    // Override to support editing the table view.
    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
        if (editingStyle == UITableViewCellEditingStyleDelete) {
            // Delete the row from the data source
            [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
        else if (editingStyle == UITableViewCellEditingStyleInsert) {
            // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    // Override to support rearranging the table view.
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
    // Override to support conditional rearranging of the table view.
    - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
        // Return NO if you do not want the item to be re-orderable.
        return YES;
    #pragma mark - Table view delegate
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
         videoURLController *detailViewController = [[videoURLController alloc] initWithNibName:@"videoTableViewController" bundle:nil];
        UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
        if (indexPath.row == 0){
            [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
         // Pass the selected object to the new view controller.
         [self.navigationController pushViewController:detailViewController animated:YES];
    @end
    Here is my videoURLController (second view/web view) .h file?
    #import <UIKit/UIKit.h>
    @interface videoURLController : UIViewController
    @property (strong, nonatomic) IBOutlet UIWebView *webView;
    @end
    Here is my videoURLController (second view/web view) .m file?
    #import "videoURLController.h"
    @interface videoURLController ()
    @end
    @implementation videoURLController
    @synthesize webView;
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
        self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
        if (self) {
            // Custom initialization
        return self;
    - (void)viewDidLoad
        [super viewDidLoad];
      // Do any additional setup after loading the view.
    - (void)viewDidUnload
        [super viewDidUnload];
        // Release any retained subviews of the main view.
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    @end

  • Tableview getting refreshed when changing data in the rows

    Hi Gurus,
    Iu2019m doing a BSP with MVC. The requirement is as below.
    In the main page there is a button u2018Create Orderu2019, to create a sales order, once I click this button, another screen (pop up) comes up and within that I have a Tableview display with the below fields with the data of 20 records.
    Material no
    Quantity
    Delivery Date
    Here user is allowed to choose the quantity and delivery date by selecting each row.(with MULTISELECT option in BSP)
    The issue is after I select first row and change the quantity and date, and if I click on second row, the Tableview gets refreshed to enable the second row to be editable and the changes what I did on the first row are also refreshed.
    So i want the Tableview not to be refreshed when selecting the multiple rows. So that I can keep the changes I make to the quantity and date fields Can you please suggest any method.
    Cheers,
    Srini.

    Hi Srinivas,
    You need to capture the value entered by user in Quantity and date field and update the internal table with these values for the current selected row.
    For ex.
    The tableView code is like:
                          <htmlb:tableView id                  = "material"
                                     headerText          = "<%= otr(Z_SUS/HEADER_TEXT_MATERIALS) %>"
                                     headerVisible       = "true"
                                     design              = "alternating"
                                     onRowSelection      = "MyEventRowSelection"
                                     selectionMode       = "MULTILINEEDIT"
                                     width               = "880"
                                     filter              = "SERVER"
                                     emptyTableText      = "<%= otr(Z_SUS/EMPTYTABLE_MATERIALS) %>"
                                     iterator            = "<%= iterator %>"
                                     table               = "<%= gt_materials %>" />
    In eventhandler OnInputProcessing :
    DATA: lt_fields type tihttpnvp ,
               ls_fields like line of lt_fields.
    call method request->get_form_fields
                changing
                  fields = lt_fields
    Now the internal table lt_fields contains all the editable cell values , just update the internal table of your tableview with these values.
    You can try these threads
    [Thread-I.|Re: Retrieve changes made in tableView]
    [Thread-II|https://forums.sdn.sap.com/click.jspa?searchID=24460585&messageID=5516977]
    Search the forum for more information on this.
    Regards,
    Anubhav

  • Issue with tableview data storing

    Hi,
    We are using MVC model, it has view-model-main controller and sub controller. I am displaying
    4 columns on the tableview where 2 columns are editable. when i click update button on the screen
    i have called do_handle_event method on sub controller, when i debug the code i am getting
    table as initial always. I am not sure what am i missing here..can any one help me ?
    Here is code
    method DO_HANDLE_EVENT
    data: o_event    type ref to cl_htmlb_event,
          visible_row type int4,
          visible_last_row type int4,
          visrow_count type int4 value 10,
          it_osha like line of it_mfgprf_osha,
          wa_osha type zpp1_mfgprf_osha,
          o_app  type ref to zcl_mfg_perf.
    o_event = cl_htmlb_manager=>get_event( request ).
        if o_event is not initial.
            if o_event->id = 'osha_update'.
                  data: tv type ref to cl_htmlb_tableview.
                  tv ?= cl_htmlb_manager=>get_data(
                              request      = runtime->server->request
                              name         = 'tableView'
                              id           = 'it_osha_history' ).
                    if tv is not initial.
                    data: tv_data type ref to cl_htmlb_event_tableview.
                    tv_data = tv->data.
                if it_mfgprf_osha is not initial.
                    visible_row = tv_data->visiblefirstrowindex.
                    visible_last_row = visrow_count + visible_row - 1.
                    loop at it_mfgprf_osha into it_osha
                          from visible_row to visible_last_row.
                    it_osha-zosha_ytd = tv_data->get_cell_value(
                                row_index    = sy-tabix column_index = 3 ).
                     endloop.
               endif.
                   endif.
                 endif.
         endif.
    view
                  <htmlb:tableView id              = "it_osha_history"
                                   table           = "<%=o_app->it_mfgprf_osha%>"
                                   iterator        = "<%=o_cont->osha_iterator%>"
                                   headerText      = "OSHA History"
                                   headerVisible   = "True"
                                   sort            = "SERVER"
                                   onHeaderClick   = "sort"
                                   visibleRowCount = "10"
                                   width           = "100%"
                                   design          = "ALTERNATING"
                                   allRowsEditable = "<%=o_app->ALLOW_RECORD_EDIT%>" />
    Thanks!
    Lakshmikandh

    Hi Guys,
    Thanks for valuable suggestion. Let me give you over view of application. We have sub-controller
    for all views, one controller and one model for those sub controllers and views.
    Hi Sebastian,
    Are you suggesting to use new model for all table view iterator ?
    If i use iterator on that one model i can't use
    that for other table view iterator..right ?
    Hi raju,
    If i get all the values on 'do_handle_data' method in the controller class, can i use that
    for other table view iterator if i create a new table view iterator?  can i have some
    outline(example coding) of passing those values to sub controller ?
    Thanks in advance.
    Lakshmikandh

  • Updation of internal table from tableview

    Hi,
    I am using a tableview in which coloumn-3(last_days) is editable.After editing it when user pressess on the button SAVE I should capture the changes and update it in database.
    But here I am facing a problem.Always the field last_days is being filled with '000' irrespective of the value entered.
    The below is the piece of code which I had written:
    DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,
    wa like line of  R_GT_VIEW.
    tv ?= CL_HTMLB_MANAGER=>GET_DATA(
    request = runtime->server->request
    name = 'tableView'
    id = 'tvx' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
    tv_data = tv->data.
    loop at R_GT_VIEW into wa .
    wa-last_days =  tv_data->get_cell_value( row_index = sy-tabix
                                       column_index = '3' ).
    modify R_GT_VIEW from wa index sy-tabix.
    endloop.
    ENDIF.
    Helpful answers will be rewarded.
    Thanks

    Hi,
    Sorry....coz I replied in a haste...
    Just to let you know....The method get_cell_value will not work if you are rendering a column as InputField.
    Use the below mentioned code and this it should work....
    DATA: tv TYPE REF TO cl_htmlb_tableview.
              wa like line of R_GT_VIEW.
    tv ?= cl_htmlb_manager=>get_data(
                        request = runtime->server->request
                        name = 'tableView'
                        id = 'tvx' ).
    IF tv IS NOT INITIAL.
      DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
      tv_data = tv->data.
      LOOP AT itab INTO wa .
        data : if_value type ref to cl_htmlb_inputfield.
        data : p_cell_id type string,       
               row_ix type string.
        clear p_cell_id.
        clear row_ix.
        row_ix = sy-tabix.
        condense row_ix.
        concatenate p_cell_id 'TV_' row_ix '_3' into p_cell_id.    "generating cell ID...Make Sure to use ur TableView Id instead of TV
        if_value ?= cl_htmlb_manager=>get_data( request = request
                                                name    = 'inputField'
                                                id      = p_cell_id
           if if_value->value is not initial.
             wa-last_days  = if_value->value.
           endif.
        MODIFY itab FROM wa INDEX sy-tabix.
      ENDLOOP.
    <i>Do reward each useful answer..!</i>
    Thanks,
    Tatvagna.

  • How to read vales from dropdownlistbox placed in tableView Cells

    Hi,
      Thanks for reply.. I got problem of reading values from Dropdownlist box placed in tableView Cells. Please correct me or give some sample to read vales from dropdownlistbox placed in tableView Cells.
    TableView column defined as
            <htmlb:tableViewColumn columnName = "OT_REASON_CODE"
                                   title      = "OT Reason"
                                   type       = "User"
                                   width = "6"
                                   edit       = "true" >
              <htmlb:dropdownListBox id                = "rcode"
                                     table             = "<%= I_YH008 %>"
                                     nameOfKeyColumn   = "OT_REASON_CODE"
                                     nameOfValueColumn = "OT_REASON_DESC" />
            </htmlb:tableViewColumn>
    OnInput processing I am trying to read dorpdown list values selected.
              W_YH022-ENDUZ = TABLE_EVENT->GET_CELL_VALUE(
              ROW_INDEX = SY-TABIX
              COLUMN_INDEX = 3 ).  " Get time
    DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
    DATA: value type string.
         value = TABLE_EVENT->GET_CELL_ID( row_index    = SY-TABIX
                                      column_index = '7').  " get Cell ID
    data ?= CL_HTMLB_MANAGER=>GET_DATA(
                                     request = runtime->server->request
                                     name    = 'dropdownlistbox'
                                     id      = value
    IF data IS NOT INITIAL.
    W_YH022-OT_REASON_CODE = data->selection. " +Cell Values...I am not getting cell values here+
    endif.

    Hi:
    Do like this
    Layout
          <htmlb:dropdownListBox id="mydropdownlist" >
            <htmlb:listBoxItem key   = "bpno"
                               value = "Business Partner Details" />
            <htmlb:listBoxItem key   = "bpaddress"
                               value = "Business Partner Address" />
          </htmlb:dropdownListBox>
    OnInpurProcessing event - >
    DATA: lcl_dropdown TYPE REF TO cl_htmlb_dropdownlistbox.
    data : selection2 type string.
    lcl_dropdown ?= cl_htmlb_manager=>get_data(
        request = runtime->server->request
        name    = 'dropdownListBox'
        id      = 'mydropdownlist' ).   
    IF NOT lcl_dropdown->selection IS INITIAL.
      selection2 = lcl_dropdown->selection.
    ENDIF.
    Regards
    Shshi

  • "Select All" in tableview does not trigger event?

    Hi,
    I have a MULTISELECT table, and whenever I use the "Select all" or "Deselect all" feature, I don't seem to be able to capture the resulting event... Whenever I select one line, there's always a "tableView" event being triggered, allowing me to run the following code to recover the selected entries:
    me->check_groups = table_event->GET_ROWS_SELECTED(
    includeCurrentSelectedRow = 'X' ).
    However, when I select all entries, there's not even an event being generated:
    event = CL_HTMLB_MANAGER=>get_event( request ).
    if event is not initial...
    endif.
    The above code fails; no event seem to be generated!!
    Have I missed out on something; or is this a bug...? I would assume the built-in "select all" would trigger some kind of event... or do we have to check/program this manually?
    Trond

    hi trond,
    what i know is that for catching <b>request</b> u have to use <b>runtime</b> object.
    so u may try this:
    event = CL_HTMLB_MANAGER=>get_event( <b>runtime->server-></b>request ).
    might be possible it will solve your problem.
    Regards,
    kamaljeet

  • How to get editable value from thtmlb:tableView

    Hi,
    I create a tableview using tag thtmlb:tableView and set column editable. Now the value in the tableview can be changed, but I don't know how to get the changed value from tableview. Pls help me.
    thanks in advance!

    Hi,
    You can get the collection of the context node and any line of the table is an entity in the context node.
    If it is not helpfull try to find a table called 'table' or 'tableview', maye it's an attribute in your context node.
    Best regards,
    Caíque Escaler

  • Retrieving table values from tableview multiselect

    Hi everyone,
    I have a BSP with a tableView set on multiselect. When the user clicks on a button I want to rertieve the selected rows in my ABAP code and send them to a function module (in the form of a table). But I haven't been able to find code examples on how to do this, ie how to retrieve the selected rows. Can someone provide me with an example or a link to where I can find one? I can catch the button onClick event, but after that I need to get the rows that were selected by the user.
    Thanks!
    best regards,
    Dionisios

    HI Dionisios,
    In your input processing,
    do something like
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    DATA: event TYPE REF TO CL_HTMLB_EVENT.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if  event->id = 'but1' and event->event_type = 'click'.
      DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW.
      tv ?= CL_HTMLB_MANAGER=>GET_DATA(
                      request      = runtime->server->request
                      name         = 'tableView'
                      id           = 'tab1' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
      tv_data = tv->data.
    refresh itab2.
    refresh itab3.
    <b>call method tv_data->GET_ROWS_SELECTED
          receiving selected_rows = itab2.</b>
    endif.
    data : ind type SELECTEDROW,
           row_s type row.
    if itab2 is not initial.
        data :rw LIKE LINE OF itab.
        loop at itab2 into ind.
          READ TABLE itab INDEX ind-index into
          rw.
           if rw is not initial.
           row_s = rw.
          append row_s to itab3.
          clear row_s.
          endif.
        endloop.
    endif.
    Endif.
    Where
    TYPES
    types : tab type table of <table_name>.
    types : row type <table_name>.
    PAGE ATTRIBUTEs :
    Irow type row
    Itab type tab.
    Itab3 type tab.
    Itab2 type selectedrows.
    Rowselected type string.
    And in layout
    <htmlb:tableView id="tab1"
                      table="<%= itab %>"
    ="true" >
                     visibleRowCount="8"
                      design="ALTERNATING"
                      footerVisible="TRUE"
                     selectionMode="multiSelect"
                     keepSelectedRow
         </htmlb:tableView>
    <htmlb:button  id = "but1"
                   onClick="test"/>
    HOpe this helps,
    Regards,
    Siddhartha

  • 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

  • How to change the default KeyBinding of the TableView ?

    how to change the default key binding of the TableView ?
    When press Enter key on a editable TableView, the default action is to make the selceted cell to a editing state. I want to know if there is any way to make it select the right cell and wouldn't change the editing state of the selected cell when i press Enter key.
    here is something i've done.
          table.setOnKeyPressed(new EventHandler<KeyEvent>() {
                   @Override
                   public void handle(KeyEvent e) {;     
                        table.requestFocus();
                        KeyCode code =e.getCode();
                        if(code == KeyCode.ENTER){
                             try {
                                  new Robot().keyPress(java.awt.event.KeyEvent.VK_RIGHT);//XXX
                             } catch (Exception e1) {
    Thanks,
    ahiwoo
    Edited by: 911579 on 2012-2-1 上午3:15
    Edited by: 911579 on 2012-2-1 上午6:26
    Edited by: 911579 on 2012-2-1 上午6:41

    thanks jsmith. now it works well.
         table.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
                   @Override
                   public void handle(KeyEvent e) {
                        table.requestFocus();
                        KeyCode code =e.getCode();
                        if(code == KeyCode.ENTER){
                             try {
                                  new Robot().keyPress(key);//XXX  javafx  has no robot for key type...
                             } catch (Exception e1) {
                             e.consume();
              });

  • Problem with iterator in tableview

    Hi, Im having a problem with an iterator in a tableview. Sometime ago I use an iterator in a BSP with flow logic, I created the class fill the methods GET_COLUMN_DEFINITIONS and RENDER_CELL_START. And worked fine.
    Now, Im working in another BSP and this time I wanted to use MVC, so I have been reading but cant figure it out what Im missing out.
    In the controller of my page I add the Interface IF_HTMLB_TABLEVIEW_ITERATOR
    I ridefine the methods GET_COLUMN_DEFINITIONS and RENDER_CELL_START (I think that you dont have to redifine GET_COLUMN_DEFINITIONS but did it anyway just in case).
    This is my RENDER_CELL_START
      IF NOT ( p_column_key = 'ICON' ).
        RETURN.
      ENDIF.
      FIELD-SYMBOLS: <row> TYPE ANY, <col> TYPE ANY.
      DATA: ti_results TYPE ZBSPREP_VEND_T,
                 wa_results TYPE ZBSPREP_VEND.
      ASSIGN p_row_data_ref->* TO <row>.
      ASSIGN COMPONENT p_column_key OF STRUCTURE <row> TO <col>.
      wa_results = <col>.
      DATA: html_bee TYPE REF TO CL_BSP_BEE_HTML.
      CREATE OBJECT html_bee.
      LOOP AT it_results INTO wa_results.
        icon = CL_BSP_MIMES=>SAP_ICON( id = 'ICON_GREEN_LIGHT' ).
      ENDLOOP.
      p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( id = p_cell_id src = icon ).
    In my table view the column ICON doesnt show anything and the rare part is if I put breakpoint in the method and execute the page doesnt stop.
    So I dont know if Im missing something.
    My tableview layout is this:
    <htmlb:tableView id             = "Monitor"
                                     selectionMode  = "SINGLESELECT"
                                     onRowSelection = "rowSelection"
                                     table          = "<%= it_results %>"
                                     iterator        = "<%= iterator  %>"
                                     design         = "ALTERNATING"
                                     filter         = "SERVER"
                                     sort           = "SERVER"
                                     headerVisible  = "FALSE"
                                     footerVisible  = "FALSE">
    I declare a attribute iterator TYPE IF_HTMLB_TABLEVIEW_ITERATOR.
    Someone could give a hand ?

    Solved, I forget to set the attribute of the view in the REQUEST Method.
    result_view->set_attribute( name = 'iterator' value = me ).

  • Problems loading text to xib using plist in tableview's selected cell

    I am developing an app that starts with a grouped tableview cell.  Each cell has an image, text, and description from a plist.  When a cell is chosen a xib is loaded by a view controller in the plist.  I want to load into the xib some text, an image, and a sound file that is in the plist (dict for that cell).  This way I don't have to have lots of view controllers and xibs.  I have been able to load the xib using this method but I can't get the images and text to load.  I have been able to do it when I don't have a grouped table view but when I add the grouping in the plist the connection is lost.  below is my code.  Could someone look at it and tell me where I've gone wrong, how to correct it, or another way to do what I want to do?
    I know I am not calling the right array and then dictionary but I don't know how to correct this.  Help please.
    //  RootViewController.h
    //  TableViewPush
    #import <UIKit/UIKit.h>
    @interface RootViewController :  UITableViewController <UITableViewDelegate, UITableViewDataSource>  {
    NSArray *tableDataSm;
    @property (nonatomic, retain) NSArray *tableDataSm;
    @end
    //  RootViewController.m
    //  TableViewPush
    #import "RootViewController.h"
    #import "Location One.h"
    #import "HowToUseViewController.h"
    #import "TableViewPushAppDelegate.h"
    @implementation RootViewController
    @synthesize tableDataSm;
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
        const NSDictionary *const row = [self rowForIndexPath:indexPath];
        NSString *wantedClassName = [row objectForKey:@"controller"];
        UIViewController *const vc = [[NSClassFromString (wantedClassName) alloc] init];
        NSLog(@"controller is -%@-", wantedClassName);
        [self.navigationController pushViewController:vc animated:YES];
        TableViewPushAppDelegate *appDelegate = ( TableViewPushAppDelegate *)[[UIApplication sharedApplication]delegate];
        appDelegate.myImage = [[NSString alloc]initWithFormat:@"%@",[[tableDataSm objectAtIndex:indexPath.row]objectForKey:@"picture"]];
    NSLog(@"%@", appDelegate.myImage);
    appDelegate.textView = [[NSString alloc]initWithFormat:@"%@",[[tableDataSm objectAtIndex:indexPath.row]objectForKey:@"description"]];
        [vc release];
    //  TableViewPushAppDelegate.h
    //  TableViewPush
    #import <UIKit/UIKit.h>
    @class RootViewController, HowToUseViewController;
    @interface TableViewPushAppDelegate : UIViewController <UIApplicationDelegate>  {
        NSString *myImage;
        NSString *textView;
        UIWindow *window;
        UINavigationController *navigationController;
        HowToUseViewController *howToUseViewController;
    @property (nonatomic, retain) IBOutlet UIWindow *window;
    @property (nonatomic, retain) IBOutlet RootViewController *viewController;
    @property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
    @property(retain,nonatomic)NSString *myImage;
    @property(retain,nonatomic)NSString *textView;
    @end
    //  TableViewPushAppDelegate.m
    //  TableViewPush
    #import "TableViewPushAppDelegate.h"
    #import "RootViewController.h"
    @implementation TableViewPushAppDelegate
    @synthesize window;
    @synthesize navigationController;
    @synthesize viewController;
    @synthesize myImage;
    @synthesize textView;
    //  Location One.h
    //  TableViewPush
    #import <UIKit/UIKit.h>
    #import "RootViewController.h"
    @interface   Location_One: UIViewController  {
        IBOutlet UIImageView *imageOne;
    IBOutlet UITextView  *textViewTwo;
    @property (nonatomic, retain) UITextView *textViewTwo;
    @property (nonatomic, retain) UIImageView *imageOne;
    @end
    //  Location One.m
    //  TableViewPush
    #import "Location One.h"
    #import "TableViewPushAppDelegate.h"
    @implementation Location_One
    @synthesize textViewTwo;
    @synthesize imageOne;
    -(id) init{
        if((self = [super initWithNibName:@"Location One" bundle:nil])){
        return self;
    - (void)viewDidLoad {
           NSLog(@"InView did load");
    [super viewDidLoad];
        TableViewPushAppDelegate *appDelegate = (TableViewPushAppDelegate *)[[UIApplication sharedApplication]delegate];
    textViewTwo.text = [[NSString alloc] initWithFormat:@"%@", appDelegate.textView];
    NSString *path = [[NSString alloc]initWithFormat:@"%@",appDelegate.myImage];
    UIImage *img = [UIImage imageNamed:path];
        [imageOne setImage:img];
    plist 
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <array>
         <dict>
              <key>header</key>
              <string>85710</string>
              <key>rows</key>
              <array>
                   <dict>
                        <key>text</key>
                        <string>52 Glass Illusions Studio</string>
                        <key>detailText</key>
                        <string>150 S Camino Seco, #119</string>
                        <key>image</key>
                        <string>VisualFEight.png</string>
                        <key>controller</key>
                        <string>Location_One</string>
                        <key>picture</key>
                        <string>VisualOne.png</string>
                        <key>audio</key>
                        <string>AudioOne.mp3</string>
                        <key>description</key>
                        <string>TextOne</string>
                   </dict>

    I think you problem lies in this part.
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath {
        const NSDictionary *const row = [self rowForIndexPath:indexPath];
        NSString *wantedClassName = [row objectForKey:@"controller"];
        UIViewController *const vc = [[NSClassFromString (wantedClassName) alloc] init];
        NSLog(@"controller is -%@-", wantedClassName);
        [self.navigationController pushViewController:vc animated:YES];
        TableViewPushAppDelegate *appDelegate = ( TableViewPushAppDelegate *)[[UIApplication sharedApplication]delegate];
        appDelegate.myImage = [[NSString alloc]initWithFormat:@"%@",[[tableDataSmobjectAtIndex:indexPath.row]objectForKey:@"picture"]];
    NSLog(@"%@", appDelegate.myImage);
    appDelegate.textView = [[NSString alloc]initWithFormat:@"%@",[[tableDataSm objectAtIndex:indexPath.row]objectForKey:@"description"]];
        [vc release];
    specifically the underlined part.  does this need modifying or completely rewritten.

  • 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.

Maybe you are looking for

  • App error 404 twaio

    I downloaded the app 'twatio' and when I try logging in in shows up 'error 404' •I reinstalled the app and same problem Anyone have any ideas how to fix the problem?

  • Start InfoPackage in dialog mode using BAPI

    Hi all, I need to start an InfoPackage in the dialog mode using ABAP coding report. The InfoPackage has to load data from a csv-file from the Client-Substation, therefore it can be started only in dialog mode (“Start Data Load Immediately” is chosen

  • Paragraph space above panel sticks - unable to set value

    Hi, I'm using ID CS3, editing a 120 page book comprised of three documents. I have not had a problem up to now, but suddenly, I am unable to adjust the panel / field space-above paragraph. I cannot set it manually, nor with the up/down arrow. With th

  • Wi-Fi Protected Settings (please make it go away....)

    Just bought an E1000 (refurbished v2.1). I've had several Linksys products, but this is the first with the ultra-annoying 'Wi-Fi Protected Settings' popup. I bought this router for testing equipment at my job, and I don't want or need the constant ha

  • Lenovo IdeaPad N580 - Windows 7 - Optiarc DVD RW AD-7740H

    I recently formatted my IdeaPad N580 laptop, it came with Windows 8 installed and i downgraded to Windows 7, the Optiarc DVD RW device stopped working, more specifically it "works" but the drivers are messed up (my assumption), it flashes the light,