Add ImageLink in htmlb Tableview Cell

Hi experts,
I had image in Tableview Column.
I gave data like this,
String image=request.getWebResourcePath() + "/images/shape.gif";
dataVec.addElement(image);
In Jsp,
tableView.setColumnType(TableColumnType.IMAGE, 4);
when click the image it should open my component (irj/servlet/prt/portal/prtroot/com.company.xyz.abc).
how can i data for TableColumnType.IMAGELINK.
please help me regards this.
Regards,
Chinnadurai R

Hi padmaja,
I am unable to solve the issue.
my bean class,
public DefaultTableViewModel getModel()
          Vector data = createData();
          Vector colName = new Vector();
          try {        colName.addElement("ID");
               colName.addElement("Status");
               colName.addElement("Name");
               colName.addElement("Edit Survey");
               colName.addElement("Launch Survey");               
               colName.addElement("Delete Survey");
          catch (SQLException e) {
               Loc.infoT("SQLException:::"+ e.toString());
          model = new DefaultTableViewModel(data, colName);
public Vector createData() {
          try {
               Vector retVector = new Vector();
               Vector dataVec;
               while (result.next())
                    dataVec = new Vector();
                    dataVec.addElement(result.getString(1));
                    dataVec.addElement(result.getString(2));
                    dataVec.addElement(result.getString(3));
                    dataVec.addElement(image);
                    dataVec.addElement(image);
                    dataVec.addElement(image);
                    retVector.addElement(dataVec);
// i am getting data from (SQL server) result is resultset
// String image = request.getWebResourcePath() + "/images/button.gif";
               return retVector;
          } catch (Exception e) {
     return null;
In JSP,
tableView.setColumnType(TableColumnType.IMAGE, 4);
I am getting image in fourth column.. while click that it should open my component (shall we use imagelink)..
then one more doubt, in the third column i am getting names as text, if i give
tableView.setColumnType(TableColumnType.LINK, 3); it is not showing the text as link.
Regards,
Chinnadurai R

Similar Messages

  • REG: How to add elements onto htmlb table cell.. URGENT PLZ HELP

    Hi all,
    I have created a htmlb table. And the jsp code is as follows
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.linde.myaccounts.util.TableBean" />
    <hbj:content id="myContext">
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
       <hbj:tableView id="myTableView1"
                          model="myBean.model"
                          design="ALTERNATING"
                          headerVisible="false"
                          footerVisible="false"
                          fillUpEmptyRows="true"
                          visibleFirstRow="1"
                          visibleRowCount="5"
    </hbj:form>
      </hbj:page>
    </hbj:content>
                          width="500 px" >
    </hbj:tableView>
    I have used a table bean by which I am getting the column header names. I have 5 columns, I have to add input field in the first column, checkbox in the second column, leave the third column blank, checkbox in the fourth column and again a input field in the fifth column. I am not understanding on how to add this elements onto the table. Will I add it from the JSP using <hbj:tableViewColumns> tag or I have add them in the bean or in the dynpage. Kindly someone give me the code for this...
    This is very urgent..Kindly help...
    Thanks in advance,
    Priyanka

    Hi,
    Have you tried looking at the examples that come with the PDK for all of the HTMLB elements?  From memory, there should be a small table example or 2 that have different types of columns shown similar to what you want - they have the full source code with them for you to look at.
    If you are working in a portal, go to the Java Developer tab and I "think" there should be a tab linking to HTMLB documentation and examples - sorry I can't be more specific but I don't have access to a portal at the moment so am trying to remember.
    Gareth.

  • HTMLB TableView Iterator & Edit columns, cells

    Hi friends,
    I am getting errors when , I tried to edit the columns, & Cells of  HTMLB TableView by using Iterator.Actually, I got the whole edit buttons and when I edit the values of particular column & cell fileds, it is not saving the values, instead it is giving same old values. The code I used is as follows.
    <u><b>To Edit the  columns,</b></u>
    method
    IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
    FIELD-SYMBOLS: <def> LIKE LINE OF p_column_definitions.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
    <def>-COLUMNNAME = 'STUDENTID'.<def>-EDIT = 'X'.
    endmethod.
    <u><b>To Edit the  cells,</b></u>
    RENDER_CELL_START Method:
    method
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
    CASE p_column_key.
    WHEN 'ICON'.
    WHEN 'STUDENTID'.
           IF p_edit_mode IS NOT INITIAL.
    ENDIF.
    WHEN 'SDATE'.
           IF p_edit_mode IS NOT INITIAL.
    ENDIF.
    ENDCASE.
    endmethod.
    <u><b>To Edit the SDATE cells,</b></u>
    WHEN 'SDATE'.
      IF p_edit_mode IS NOT INITIAL.
    DATA: date TYPE STRING.
    date = m_row_ref->SDATE.
    p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                          id        = p_cell_id
                           value     = date
                           type      = 'DATE'
                             showHelp  = 'TRUE'
                             cellValue = 'TRUE' ).
                               ENDIF.
    Why the either column or cell is not saving the new values, when I edit them? where it went wrong? please mail me in this regard.
    regards
    CSM Reddy

    Hi REDDY CSM 
    To learn coding these Methods.
    You need to learn everything from scratch about MVC.
    To learn functionalities of Methods in Controller and how to use them,its Better,if you start with some tutorial(Little application) on MVC.
    Here is link,Just follow this,You will get some Exposure to these methods.
    http://help.sap.com/saphelp_erp2005/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    Rest keep posting whenever you face and Problem..
    Happy Coding..!!
    Vijay Raheja

  • Date Field in Tableview Cell

    Hi,
    I want to insert a Input field with date picker in the tableview cell. I know I have to use the Renderer class for this. But I need some code samples. Please help me in this regard.
    Regards,
    Purushothaman.

    Hi puroshotam, Saliam
    I m trying htmlb table for the first time. I am not able to add elements onto table cell.. My code is as follows
    dynpage:
    package com.linde.myaccounts.paymyaccountprelogin.dynpage;
    import com.sapportals.htmlb.event.Event;
    import java.io.IOException;
    import javax.naming.Context;
    import com.linde.myaccounts.util.TableBean;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class PayMyAccountPreLoginDynpage extends PageProcessorComponent {
      public DynPage getPage(){
         return new PayMyAccountPreLoginDynpageDynPage();
      public static class PayMyAccountPreLoginDynpageDynPage extends JSPDynPage{
         private TableBean myBean = null;
         public void doInitialization(){
              IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
           IPortalComponentProfile profile = ((IPortalComponentRequest)getRequest()).getComponentContext().getProfile();
           Object o = profile.getValue("myBean");
           if(o==null || !(o instanceof TableBean)){
              myBean = new TableBean();
              myBean.createData();
              profile.putValue("myBean",myBean);
           } else {
               myBean = (TableBean) o;
           // fill your bean with data here...
           IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
           //doJca(request);
         public void doProcessAfterInput() throws PageException {
         public void doProcessBeforeOutput() throws PageException {
           this.setJspName("PayMyAccountPreLoginStep1.jsp");
         public void onInstruction(Event event)
         public void onClearScreen(Event event)
         public void onPayment(Event event)
    jsp
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <%@ page import="com.linde.myaccounts.util.MainCellRenderer"%>
    <jsp:useBean id="myBean" scope="application" class="com.linde.myaccounts.util.TableBean" />
    <hbj:content id="myContext">
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId">
    <hbj:tableView id="myTableView1"
                          model="myBean.model"
                          design="ALTERNATING"
                          headerVisible="false"
                          footerVisible="false"
                          fillUpEmptyRows="true"
                          visibleFirstRow="1"
                          visibleRowCount="5"
                          width="500 px" >
      <%mytableView1.setUserTypeCellRenderer(new MainCellRenderer());%>
    </hbj:tableView>
    </hbj:form>
      </hbj:page>
    </hbj:content>
    tableBean
    Created on Nov 21, 2007
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.linde.myaccounts.util;
    @author zm46187
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    import java.io.Serializable;
    import java.util.Vector;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.htmlb.table.TableViewModel;
    public class TableBean implements Serializable {
         public DefaultTableViewModel model;
         public TableBean(){
         model = new DefaultTableViewModel();
         public TableViewModel getModel() {
              return this.model;
         public void setModel(DefaultTableViewModel model) {
              this.model = model;
         public void createData() {
              //this is your column names
              Vector column = new Vector();
       column.addElement("invoice number:");
       column.addElement("show balance");
      column.addElement("balance");
      column.addElement("pay balance:");
      column.addElement("other amount");
              //all this logic is for the data part.
              Vector rVector = new Vector();
              try {
                   for(int i=0;i<3;i++) {
                        Vector data = new Vector();
                        data.addElement("invoice number:"+ i);
                        data.addElement("show balance" + i);
                        data.addElement("balance" + i);
                        data.addElement("pay balance:" + i);
                        data.addElement("other amount" + i);
                        rVector.addElement(data);
              } catch (Exception e) {
                   e.printStackTrace();
              //this is where you create the model
              this.setModel(new DefaultTableViewModel(column));
    //          this.setModel(new DefaultTableViewModel(rVector, column));
    MainCellRenderer ( I have created a new class in my package and imported in the jsp)
    Created on Nov 23, 2007
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.linde.myaccounts.util;
    @author zm46187
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    import com.sapportals.htmlb.Link;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.table.ICellRenderer;
    import com.sapportals.htmlb.table.TableView;
    public class MainCellRenderer implements ICellRenderer {
    The class, which renders the user type. In the bean we declared column 1 and 3 as type USER
    For the 2 columns we define a cell renderer. In column 1 we set a drop down listbox
    and in the column 3 we set an input field with the field type DATE and showHelp="TRUE"
    This will bring up a help button at the end of the input field. When the user clicks the
    button the date navigator comes on and the date can be selected from the calender.
    See the HTMLB Reference for details on inputField.
    public void renderCell(int row, int column, TableView tableView, IPageContext rendererContext) {
    System.out.println("===table VIEW cell renderer called===");
    if (column == 1) {
    Link link = new Link("myLink");
    //link.setOnClick("GetDetails");
    link.addText(tableView.getValueAt(row,column).toString());
    link.render(rendererContext);
    I am getting a error during rendering of jsp component. Is this <%mytableView1.setUserTypeCellRenderer(new MainCellRenderer());%> wrong? Bcoz when I remove this line I am able to see a empty table. Kindly help!! this is very urgent issue..Please help
    Regards,
    Priyanka

  • 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

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    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-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • IC WebClient: Add Dropdown Box to TableView

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

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

  • Tableview Cell - setting the font and background colors

    Hi,
    I am developing a BSP with a Tableview. The user asked me about displaying a row with a diferent color (font or background) when some data changes on this table.
    I am thinking about using a Tableview Iterator to evaluate the content of a cell... but I dont know if I can change the look and feel of the row on where this cell is.
    Has someone dealed with this? Can you tell me how?
    thanks
    Ariel

    Actually this is the whole purpose of the Iterator.
    I would suggest you take a look at the SBSEXT_HTMLB and SBSEXT_TABLE BSP Application as well as the following weblogs.
    /people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators
    /people/sap.user72/blog/2004/09/07/bsp-howto-exploring-bsp-development-and-the-miniwas-620
    /people/sap.user72/blog/2004/08/27/bsp-howto-tableview-iterator--column-header-graphics
    /people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
    In those examples you'll see how easy it is to alter the content of the current cell or a cell with a specific value and output anything from graphics to input fields or dropdown boxes or even just change the text, color and styles of the content.

  • Link in a htmlb:tableview

    is it possible to add links to a htmlb:tableview.
    for example, i have a table with 4 columns. i'd like to let the entries in column 1 appear as links with the content of column 4 as the link target. (column 4 should be invisible for the user)

    Hi Daniel,
    You didn't study enough before posting...
    Take a look at:
    1. Documentation on your WebAS (accessible by <i>Tag Browser</i>);
    2. <b>SBSPEXT_TABLE</b> BSP Application on your system;
    3. other posts in this forum.
    Good search.
    Dany

  • JFXtras 2 CalendarTextField with Picker in a TableView Cell

    I would like to use the new jfxtras 2 CalendarTextField in a tableview cell, so each cell in a column has its own date picker popup.
    Could someone provide sample code on how to do this.

    Hi Gregory,
    try it with the following:
    CREATE OBJECT lcl_bee_table.
    lcl_bee_table->add( lcl_link ).
    lcl_bee_table->add_html( html = `<br>` ).
    lcl_bee_table->add( lcl_bsp_element ).
    p_replacement_bee = lcl_bee_table.
    instead of the 'concatenate' line
    Regards,
    Rainer

  • HTMLB TableView in customer CI/CD layout

    Hello,
    i want to create a BSP with htmlb tableview, so
    i can simply use the given features (sorting, filter, ...) but the customer want to adapt hic CI/CD Colours Blue and Orange to the hole application.
    Is there a chance to use a own stylesheet instead of design2002 or design2003 or is it prossible to create a own design.
    I`ve searched this topic in forum, and gets only answers that mixing design and css is not good, and there is a way with EP6 - but we have no portal.
    Thanks for any help.
    Regards
    Marcus

    Hi Ulli and Marcus,
    I'm currently designing my own style (not in Portal, I'm using 6.20), and yes, it might not be straightforward customizing the design.
    But I started with following approach:
    After implementing the basic layout of my page (like header pictures and so on) I added the functional parts (htmlb elements, ...) and tried to change them one by one ... that's how I did it:
    - add a htmlb element to the layout
    - access the page via browser to get the generated html code
    - in this code just look for all the classes used for your htmlb elements
    - edit the .css file that gets included in the html header accordingly
    Important Points you have to be aware of:
    *) There might be styles used for your elements which are not shown in every html code (because element might be displayed differently from page to page). You can either call every possible page combination in order to get all the used classed (not recommended, you could still miss something), or have a closer look at the class names - the classes that belong to a certain element are named in a way you can tell which class belongs where.
    (like "urBdyStd" for the body-tag, "urbtn*" for buttons, ...)
    From the postfix after the element name part you can guess the detailed function of the class - with a little patience and looking at many different classes used in the html code you can figure out what to change for your style.
    *) Be careful which .css-file gets included when looking at the html code. There are css files for different browsers and versions, so if you want to make your application look the same way on all supported browsers (which you probably want), then don't forget to edit these files as well.
    *) Changing a css file and testing the results on the WAS is very complicated, so I recommend you create sample html files (which contain one htmlb element each for example), edit the css file and also test it locally, so you don't get caugt in importing a new file version just for changing that one nasty little style attribute that is wrong
    Ok, after writing all of this, I can see that it really is a bit of work ... but seeing how your application gets your personal touch is worth it (at least for me) ... and you don't have to change all of the styles, I found that some of the standard styles fit into my design quite good, so I didn't change them. (I copied the chrome design to start from)
    Cheers,
    Max
    P.S.: Would such a topic be worth a weblog?

  • HTMLB TableView Tab Stops

    We have some HTMLB TableViews in our JSPDynPage developed portal application.  After we upgraded to NetWeaver 7.0(2004S) the table views now require the users to tab across each cell within the tableview.  The accessibility flag is turned off within the users profiles so that is not what is causing it.  Is there a way to disable this functionality.  I would hope so otherwise I would have to say that SAP did a bit of a dis-service to some of it's customers.
    Thanks.
    Curtis

    Hi Curtis,
    We are also facing the same problem. Customer is complaining for this. Could you please tell us what needs to be done to go to the next editable cell.
    Thanks in Advance....
    Satya

  • HTMLB custom cell renderer error

    Greetings-
    I have created an I-View based on the JSP dyn page that uses the HTMLB tableView.  One of the columns calls a cell renderer class.
    This I-View works perfectly on my "local" portal, which is the eval version of EP6 SP4.  However, when I upload the par file into our dev portal (EP6 SP2) and try to run I get an error.  The gist of the error log goes as follows:
    Caused by: java.lang.NoSuchMethodError
    at [domain].essmain.ESSMainCellRenderer.renderCell
    (ESSMainCellRenderer.java:40)....
    Does anyone have any guesses as to what the problem could be?
    Thanks in advance.

    I think the issue has been solved.  I was calling a string function from within my Cell Renderer class.  For some reason our portal does not automatically import string functions.  When I added an import java.lang.String statement, it functioned properly.

  • Regarding HTMLB TableView Celclick

    Hi All,
    I have an HTMLB tebleview where the first column is a LINK .
    When i click this cell (link) , i have following values n the method DO_HANDLE_EVENT of my class :
    htmlb_event->name = 'tableView'.
    table_event->event_type = 'cellClick'.
    I need to capture the DATA of the ROW for which the CELL was clicked in an internal table .
    The HTMLB TableView in the looks like:
    <htmlb:tableView id              = "list"
                           emptyTableText  = "<%= otr(BBP_SUS_UI/LIST_ORDER_NO_ENTRIES_FOUND) %>"
                           selectionMode   = "MULTISELECT"
                           sort            = "SERVER"
                           onHeaderClick   = "onmyHeaderClick"
                           onNavigate      = "onMyNavigate"
                           onRowSelection  = "onMyRowSelection"
                           visibleRowCount = "<%= lepp %>"
                           visibleFirstRow = "<%= iv_list_nav_index %>"
                           width           = "100%"
                           table           = "//model/order_list"
                           headerVisible   = "<%= IV_HEADER_VISIBLE %>"
                           headerText      = "<%= status %>"
                           iterator        = "<%= io_iterator %>" />
    Thanks,
    Anubhav.

    Hi Anu,
    actually you haven't tried my code. You've changed it.
    You have moved the double-quote (") signs to different places and added an asterix (*).
    In ABAP a asterix (*) in the first character of a line comments out the entire line. A double-quote (") sign comments out the remainder of the line it appears in.
    The comments I placed in the code where to show you the names of the attributes that hold the values you are looking for.
    So in other words the attribute
    tableview_event->selectedrowindex
    contains the index of the selected row. You can then use this attribute in further ABAP statements.
    You say that
    the issue is retriving the value of ROW_INDEX
    - well you do not need to retrieve it. It is already in the attribute tableview_event->selectedrowindex.
    I also suggest you use the debugger to look at the other attributes that are visible in this object.
    Cheers
    Graham Robbo

  • HTMLB TableView - several levels of columnnames

    Hi
    Is there anyway I can get the htmlb tableView tag to not show the columnNames?
    What I really want to do is to hade two levels of columnnames. That is I want one level to span over two sublevels of columnnames. Like this:
    |Subscription|Paid
    A | B| C | D
    Where A and B are sublevels of Subscription and C and D are sublevels of Paid.
    If I can get the tableView tag to not generate the columnnames and just generate the data rows I can code the columnnames manually. Or is there a way to just generate the datarows?

    Ah, I got it.
    It's not important to activate the wrapping of the CELL, but the wrapping of the textView!
          lr_text->id            = p_cell_id.
          lr_text->text          = get_text( <fs_row>-.. ).
          lr_text->wrapping      = 'TRUE'.

Maybe you are looking for