Cell Binding/Table View Iterator

Hi Friends,
I am getting error while editing the particular cell of column table view. when I enter the changes, they are not updating in the cell.I used the following code.
method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
<def>-COLUMNNAME = 'RELDATE'. <def>-EDIT = 'X'.
method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START .
m_row_ref ?= p_row_data_ref.
endmethod.
method
IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START .
CASE p_column_key.
WHEN 'RELDATE'.
IF p_edit_mode IS NOT INITIAL.
  DATA: Rdate TYPE STRING.
  Rdate = m_row_ref->RELDATE.
  p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                          id        = p_cell_id
                          value     = Rdate
                           type      = 'DATE'
                           VALUE = PCELL_BINDING
                            showHelp  = 'TRUE'
                            encode = 'TRUE').
I am bit confused abt MVC.Please mail me the exact code changes to be done in MVC-Class controller.
Regards
CSM Reddy

Pls check the code, & mail me back in case of any errors.
method DO_HANDLE_EVENT .
DATA: itabtype  type standard table of stdview1.
DATA: tv TYPE REF TO cl_htmlb_tableview.
  tv ?= cl_htmlb_manager=>get_data(
                          request      = runtime->server->request
                          name         = 'tableView'
                          id         = 'stdview1' ).
  IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
    tv_data = tv->data.
    IF tv_data->prevselectedrowindex IS NOT INITIAL.
      FIELD-SYMBOLS: <row> like LINE OF ITABTYPE .
     READ TABLE ITABTYPE INDEX tv_data->prevselectedrowindex
     ASSIGNING <row>.
      DATA value TYPE string.
      value = tv_data->get_cell_id( row_index    =
                   tv_data->prevselectedrowindex
                                     column_index = '6' ).
      DATA: inputfield TYPE REF TO cl_htmlb_inputfield.
      inputfield ?= cl_htmlb_manager=>get_data(
                          request      = request
                          name         = 'DESCRIPTION'
                          id           = value ).
<row>-DESCRIPTION = inputfield->value.
ENDIF.
ENDIF.
Regards
CSM Reddy

Similar Messages

  • Set back ground color to a particular cell in table view

    hi,
        iam working on a jspDynpage and have a htmlb table view for which i need a way to set back ground color to a particular cell in table view, the color has to be set based on a value..is there a way to do it without using an iterator...well iam using a  cellRenderer for the table but cant find a way to set the colors...if anyone does have a way please do reply...regards

    You can mention the color in <b>textview</b> as well as <b>Label as follows:</b>
          <htmlb:textView     text          = "<span style='background-color: #00FF00'>My Textview</span>"
                              design        = "EMPHASIZED" />
          <htmlb:label for =  "MyLabel"
                       text = "<span style='background-color: #00FF00'>Label </span>"
                       encode = "false"/>
    Reward each helpful answer
    Raja T
    Message was edited by:
            Raja Thangamani

  • Urgent!!!How to add a Dropdown in a Table View Iterator CLass?

    Hi All,
    I want to add a Drop Down List in the Table View Iterator Class. I am not able to do that.
    If any of you have done please reply, as it is very urgent.
    Please give the code extract possible (with data defination too)
    Regards,
    Dhaval
    Points will be given
    Mark this as Urgent

    Hi
    You need to modify RENDER_CELL_START method of your iterator class and you use the p_replacement_bee attribute to output the drop down
    The example below outputs the units of measure for a material
    data:
            col_dropdown   TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX,
            col_listitem   TYPE REF TO CL_HTMLB_LISTBOXITEM,
            table_bee      TYPE REF TO cl_bsp_bee_table,
    CASE p_column_key.
        WHEN 'Column Name'.
    needs to change.  way too slow to select each time.
            prod_id = <current_line>-matnr.
            CALL FUNCTION 'Z_GET_UOM'
              EXPORTING
                PRODUCT_ID = prod_id
              IMPORTING
                UOMLIST    = uom_list.
            clear uom_line.   append uom_line to uom_list.
            CREATE OBJECT table_bee.
            CREATE OBJECT col_dropdown.
            rowidx = p_row_index.
            shift rowidx left deleting leading space.
            concatenate p_column_key rowidx into  col_dropdown->id.
            col_dropdown->width     = '100%'.
            col_dropdown->selection = <current_line>-zieme.
            table_bee->add( level = 1 element = col_dropdown    ).
            loop at uom_list into uom_line.
              CREATE OBJECT col_listitem.
              col_listitem->key    = uom_line-name.
              col_listitem->value  = uom_line-value.
              table_bee->add( level = 2 element = col_listitem    ).
            endloop.
            p_replacement_bee     = table_bee.

  • BSP COMPILER & Table view  ITERATOR

    Hi Gurus,
       Can any  body give the follwing details
    1.What is BSP Compiler?
    2.What is Table view iterator?
    Thanks in Advance,
    Regards,
    Ravi.

    Hi,
    1.the compiler builds the internal code you put in your pages.
    practical reference:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11099890-0201-0010-d695-ac642d35c708">pdf by Karl Kessler</a>
    2.a bsp table view iterator can be checked here:
    <a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator">Weblog by Brian McKellar</a>
    <a href="/people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators by Thomas Jung</a>
    basically it's used for customizing diplay of tables
    grtz
    Koen
    Message was edited by: Koen Labie

  • Changing the background color of the row of the selected cell in table view

    How can I change the background color of the table row when user clicks on table cell in table view?
    Edited by: a_brar on May 5, 2012 11:12 PM

    You could apply the following css style (by defining a custom stylsheet with the following lines and loading it into your app).
    The last color sets the background color of the selected row while the table-view has focus (in this case to orange).
    .table-view:focused .table-row-cell:filled:focused:selected {
        -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, orange;
    }There are quite a lot of subtleties in the css styling for the tableview (e.g. different colors for the selected row when the control has focus vs when it doesn't or when the user hovers over a selected row in an unfocussed tableview), which you may want to cater for when chaning the background color of the selected row in a table view. There is also alternate styling for when the tableview is in row selection vs cell selection mode. So you may want to look at customizing further based on the css styles in caspian.css in sdk/rt/lib/jfxrt.jar if you can understand the complex css there.

  • Changeable image using table view iterator

    Hello Forum -
    I have a tableview iterator working using cl_htmlb_image class. The icon shows up perfectly based on the column value (X=green; space=red). I would now like to click on the icon (just like clicking on checkbox) and turn the color from red->green or green->red which should of course change the value of the column as well.
    Here is my code, please help me:
    ======================================================
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
    ======================================================
    DATA: img       TYPE REF TO cl_htmlb_image.
    DATA: beetable  TYPE REF TO cl_bsp_bee_table.
    CREATE OBJECT img.
    CREATE OBJECT beetable.
    CASE p_column_key.
      WHEN 'ACTVFLAG'.
        img->id   = p_cell_id.
        IF c_row_ref->actvflag = 'N' OR
           c_row_ref->actvflag IS INITIAL.
           img->src = 'ICON_LED_RED'.
           img->alt = 'Inactive'.
        ELSE.
           img->src = 'ICON_LED_GREEN'.
           img->alt = 'Active'.
        ENDIF.
        beetable->add( element = img level = 1 ).
        p_replacement_bee = beetable.
    Thanks,
    Partho

    in the iterator (render cell start) when rendering the image add the onclick property to image.
    p_replacement_bee = cl_htmlb_image=>factory( id = p_cell_id src = icon_plane onclick = 'image_click' )
    now when the user click on the image oninputprocessing will be triggered and check whether its is image click, if yes set a variable to some value to indicate that the image is clicked (and also to identify what image is clicked)
    option1: store these info as a serverside cookie and read it in your IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START method to change the image
    or
    option2: pass these values to iterator class attribute and read it in your IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START method to change the image.
    Regards
    Raja

  • Table View Iterator

    Hi SDN Firends,
    Is it possible to use two iterator in the same class?If so how?
    Using MVC ,I'm having a requirement of displaying two tables in the same page.
    I dont want to display it by calling from others pages.
    With Regards,
    SHARMILA BRINDHA.M

    Of course you can. Simply give them two different names.
    data: iterator1 type ref to zcl_my_iterator1.
    data: iterator2 type ref to zcl_my_iterator2.
    create object iterator1.
    create object iterator2.
    <htmlb:tableView id="tv1" iterator="<%= iterator1> ...
    <htmlb:tableView id="tv2" iterator="<%= iterator2> ...
    Cheers
    Graham Robbo

  • Regarding Visual Composer table view

    Hi experts,
    1. Can i change the size of the table cells (in table view)  in visual composer?
    regards
    divya

    Hi Divya
    It is not possible to change the size of an individual table cell directly in visual composer. But, you can change the size of an entire column in a table, though!Maybe, if what I've heard is true, it is possible for to change it in the GML files. If someone can confirm this and give some help on how to modfy the GML, it'll be great.
    Thanks
    Manoj

  • Unable to read edited cell values from table view 'LineEDIT' mode

    Hello Gurus,
    Need urgent help on Cell binding - Here's what I have:
    I have a bsp with one tableview for users to update shelf quantity.
    Selection mode is <b>Lineedit</b>. I used this only bcos in this I need not select a row to update it - let me know if this is wrong.
    Our users do not like to click on the row to select and edit it! I am not getting the edited values from the tableview.
    Although I am using a contoller and view, it's not really an MVC. Can someone please guide me on this?
    <b>
    code in IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS
    append initial line to p_column_definitions assigning <def>.
    <def>-columnname = 'SHLQTY'.
    <def>-title = 'Shelf Qty'.
    <def>-EDIT = 'X'.
    Code in IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
    p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                                id        = p_cell_id
    *                            type      = 'DATE'
    *                            showhelp  = 'TRUE'
    *                            type       = 'QUAN'
                                VALUE      = val
                                cellvalue = 'TRUE'
                                _VALUE = P_CELL_BINDING )
    </b>
    I do not see anything coming in <b>P_CELL_BINDING</b> .
    Tableview in layout
    <b>
    <htmlb:tableView id                    = "result"
                           design                = "STANDARD"
                           headerText            = "Header Text"
                           filter                = "SERVER"
                           onNavigate            = "onMyNavigate"
                           selectionMode         = "lineedit"
                           emptyTableText        = "No records found!"
                           onRowSelection        = "onMyRowSelection"
                           allRowsEditable       = "TRUE"
                           selectedRowKeyTable   = "<%= rkTab %>"
                           table                 = "<%= datatab %>"
                           selectedRowIndexTable = "<%= sRTable %>"
                           iterator              = "<%= iterator %>"
                           visibleRowCount       = "10" >
          </htmlb:tableView>
    </b>
    I update an internal table Datatab with all the values I require.
    Any idea why the cell binding id not working?
    Many thanks in advance.
    Mike

    Hi Mike,
    databinding is not possible with application classes. There are just a nice way to handle "session variables". You can use them with MVC as well.
    Before MVC there was flow logic. Single formfield-values are receved e.g. when declared as page parameters. Values from tableViews are received e.g. in OnInputProcessing" by fetching the TV-Object from HTMLB_MANAGER and then calling methods like "GET_CELL_VALUE".
    DATA: tv          type ref to CL_HTMLB_TABLEVIEW,
          table_event type ref to CL_HTMLB_EVENT_TABLEVIEW.
    tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request
                                      name    = 'tableView'
                                      id      = 'mytv1' ).
    table_event = tv->data.
    myValue = table_event->get_cell_value( row_index  = 1 column_index = 1 ).
    good luck,
    stefan.

  • Table view column cell Focusing while editing.

    I have a table view with single column. I have defined custom cell factory for this column. When the table renders, a text value is shown for each cell in that column. When the user start editing the cells , then the contents of the cell changes and it shows 2 buttons, few check boxes and few radio buttons. Once the user selects his choice and clicks on a button inside the cell, the cell's editing is completed and cell's content is replaced with a plain text field.
    Now while editing if the user clicks on any other cell, the current editing cell's cancel method is called and text field is show. However, if the user clicks mouse outside the table, the cell is still in editing state.
    1) how to call the cancel editing method automatically here.
    2) Also, if we try to associate with focus property, how to do it. i.e. on which component should I associate focused property since the cell now is replaced with a bunch of components.
    3) If the user tries to use up or down arrow, then how to stop or start editing on the next cells.
    Thanks.

    Have you assigned an action to the CheckBox.onSelect event? If not, there is no server roundtrip triggered and the visibility is not updated.
    I would create two context attributes "ColumnsVisible" (boolean) and calculated attribute "ColumnsVisibility" (Visibility), assign an empty action to the CheckBox.onSelect event, bind CheckBox.checked to "ColumnsVisible", TableColumn.visible to "ColumnsVisibility" and implement the calc. attribute getter as
    WDVisibility getColumnsVisibility(...)
      return element.getVisible() ? WDVisibility.VISIBLE : WDVisibility.NONE;
    Armin

  • Can you select the row in a table view without highlighting the cell?

    I have an an app with a table view which is presented modally. Cell selections in this table are saved in the parent controller so that they can be reselected if the table is reloaded after being dismissed.
    When the cell is first highlighted, I want to momentarily highlight the cell and have it fade out, which I do by unselecting the cell from the modal view controller's didSelectRowAtIndexPath by calling setSelected:animated on the table view cell.
    However, when I present the table view controller modally again and want to display the previously selected cell as selected, I don't want the cell background to be highlighted, and I'm having trouble doing this.
    In order to make sure the table view knows the cell is selected, I am calling selectRowAtIndexPath. I need to make sure the cell is selected so that I can set/unset the cell's accessoryType. However, this has the sideeffect of highlighting the cell too, which looks weird and confusing to the user.
    I've tried things like temporarily setting the cell's selection style to none, but while that stops the cell background from highlighting? I've tried setting the selectionStyle to UITableViewSelectionStyleNone, but while this prevents the cell background from highlighting, the cell text still changes to white, so it the text is invisible against the white background.
    Is there a easy way of setting a cell to selected in the table view without also changing the highlight and text colour of the actual cell? Immediately setting the cell to be unselected still makes the highlight visible for a split second.

    I tried that, but setting the highlighted property doesn't seem to affect it.
    I figured out how what I was doing wrong though. I was setting selection style UITableViewSelectionStyleNone, selecting the cell, then setting the selection style back to whatever it had previously been. This causes the background not to draw highlighted, but the text and accessory type to still draw highlighted.
    In order to fix this, I moved the code to set the cell selection style to whatever it had previously been to the didDeselectRowAtIndexPath method.

  • Using interface builder to create a table view and add a cell

    So I am using interface builder to make a table view. Should be easy. I drag a table view controller to my view, then it seems I should be able to drag a table view cell to the table view but it won't let me drop it down. If I do it in the documents window it just replaces the table view with a cell. Seems like this shouldn't be hard, but it's one of those things that should take 2 seconds but I have been messing with it for hours. It seems like most of the examples I have looked at in the same code don't use iB so I haven't found a good reference. If somebody can point me in the write direction let me know.

    I struggled a bit too. Here's what I did on my recently completed app. I used IB to create the basic view and add the table. That's it. Then ensure your UIViewController based class implements the UITableViewDelegate and UITableViewDataSource protocols. Your cells will come from those methods, not anything you do in IB.
    If you're creating a set of screens that just have tables that allow you to navigate up and down through the data then IB isn't worth using at all.
    Just have your views extends UITableViewController and follow some of the supplied table based example apps.
    I rewrote my first app 3 times as I slowly figured all of this out.
    Hope that helps.

  • Check box in tabel view?when to use itereator and when to use table view

    hi,
    I want to have a check box along with the other 7fields  in the table view.
    when the checkbox is checked and the merge complete push button is clicked, the respective code for merge is to be executed.
    how can I do this?
    could anyone tell me hw to get a check boz in table view
    when to use a  iterator in BSP, how table view n iterator in comparision ae used or function/work.
    Regards,
    Pavan P.

    Hi Pavan,
    Table View is an BSP element used to display mass data in a layout similar to a table (table view).
    <b>Iterator</b>is an attribute to modify rendering row-by-row, and make it dependent on the clicked row. In this way, you define an action from a particular line. This action is defined in columnDefinitions or overWriteDefinitions.
    <htmlb:tableView id = "tvX"
                     headerText          = "Department List"
                     design              = "standard"
                     headerVisible       = "true"
                     width               = "30%"
         selectedRowKeyTable = "<%= selectedrowindextable %>"
         onRowSelection      = "MyEventRowSelection"
         sort                = "server"
         keepSelectedRow     = "TRUE"
         selectionMode       = "MULTISELECT"
         table               = "<%= i_dept %>" >
    </htmlb:tableview>
    In your <b> OnInputProcessing </b>, Use this Iterator table to get the data of selected records.
    IF selectedrowindextable[] IS NOT INITIAL.
    DESCRIBE TABLE selectedrowindextable LINES no .
    Rgds,
    Jothi.
    Pls do close the thread if ur problem is solved.

  • Permanently set Repeat cell values on table view obiee11g

    Hi,
    By default Analysis presentation Column comes with "Column Value Suppression" but we need to switch "Column Value Suppression" to "Repeat cell values" from source xml reference file
    Note:don't want to do it via analysis table/column properties(its manual work) ..just looking to change permanently by changing xml
    Thanks
    Deva

    Hi,
    What is that datatypeformats.xml ? couldn't find out. once again will explain my requirement
    Creating new analysis(Table/Pivot table view) and applying format as Repeat Cell by changing Table/Pivot Properties to set Enable alternating row "green bar" styling Repeat cell values on table/pivot view (instead of doing manual way)
    Refer the below image --> i just want to avoid manual enabling below Repeat cell option for entire table/pivot view option
    http://i.imgur.com/122wp.jpg?1
    Thanks
    Deva
    Edited by: Devarasu on Nov 26, 2012 5:06 PM

  • Table View : display:none leaves a empty cell

    Hi Experts,
    There is a requirement to display a report in a normal table view but print the other view ( sectioned table view).
    I have created two views in teh same request and in teh second view i have used the display:none css code in the Data section , Folder Heading and Column Heading of evey column being used in this report.
    But i see some grey empty cells and since its a sectioned table view these empty cells are increasing.
    Can you please help me on how to hide this empty cells from getting displayed in the Dashboard
    Regards
    Veena A

    Hi,
    Refer
    OBIEE Changing unchangeable cells
    http://obiee101.blogspot.in/2010/02/obiee-changing-unchangeable-cells.html
    Award points if this helped to help others with similar issues.
    Regards
    MuRam

Maybe you are looking for

  • IPod cannot be updated because the file cannot be found

    Just purchased a new 5th gen. 30gb iPod, and when plugged into my laptop & iTunes, I get the error message that "so and so's iPod cannot be updated - the file cannot be found." Then the iPod drops out of itunes, but stays in My Computer. Any way to f

  • How do I run Windows software on my MacBook Pro with OS X Mavericks

    How do I run Windows software on my MacBook Pro with OS X Mavericks? I want to run a TurboTax program to amend an old tax return. Program is not available for OSX.

  • BAPI or FM for Customer Edit XD02

    Hi gurus, Does anyone know if there is a BAPI or FM for updating customer master data (XD02) without resorting to BDC/LSMW processing ?.  I have tried BAPI_CUSTOMER_CHANGEFROMDATA1 but it seems nobody knows which are the mandatory fields. I have read

  • Workspace Installed but Blank

    Help!!!! I recently installed Hyperion version 11.1.2.1 and configured my products. My Shared Services is up and running, and so is my Essbase. But my Workspace is blank. When i go to the url, all i see is a blank blue screen with the file,menu,tools

  • ISP's Pulling one over on us ?

    OK I have now moved from SKY Fibre (Up to 35mb) to BT Infinity 2 (Up to 75mb). At night I get 40ms and nearly 60mb DL 15mb UL.  Rest of the day it fluctuates 40-70ms and 10-25mb DL 10-15mb UL Firstly I think this is pretty poor: 1 - It should be with