Skip to Content
author's profile photo Former Member
Former Member

Table View data

Hi,

colName = [ Column1, Column2, Column3, Source BNS, Destination BNS, Source OPEN, Destination OPEN, BNS, OPEN]

rowdata = [[Depot Issue Delivery, US1H, WEST, 8, , 6, , 8, 6]]

TableViewModel = new DefaultTableViewModel( rowdata, colName);

When I try to display the above in a TableView on a JSP Page. The first 3 columns always show Depot Issue Delivery.

The tableview should show Depot Issue Delivery, US1H, WEST, in the first Row under Column1, Column2, Column3 respectively.

I have printed both the colum and row vector and checked whether it has the right data and the data is right, but the display is different.

Any thoughts on this.

NAC

P.S. The data is being pulled out of a BW system, and the first 3 columns, have blank column names. Since the 3 column names are blank I am substituting them as Column1, Column2 and Column3.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2005 at 10:37 PM

    Hi,

    What ever values you pass in rowdata, you see the relevant data in the tableview. You need to pass the values of column1 data, column2 data, column3 data under these respective columns.

    column1|column2|column3|Source BNS|Destination BNS|Source Open|Destination OPEN|BNS|OPEN
    
    Data1|Data2|Data3|Depot Issue Delivery|US1H|WEST|8|6|8
    
    

    As well when there is no data,you can pass the enpty string into the table view cells.

    ""|""|""|Depot Issue Delivery|US1H|WEST|8|6|8

    You can also hide the table columns if do not wish to show them but u still can access data in those columns.

    Hope this helps. If u need anything let me know.

    Thanks,

    Praveen

    PS. Dont forget to allot points if useful/solved

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2005 at 10:57 PM

    Hi,

    You mentioned you can have data in a column but hide the COLUMN, and still acess data within that column. Is there an example that you could refer me to, or shed some light on the same.

    NAC

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Here is the simple example. You can hide the column using "idTableView.setColumnInvisible("column1") "

      <%@ page import="com.sapportals.htmlb.table.*, 
      com.sapportals.htmlb.enum.*" %>
      
      <hbj:tableView
                 id="idTableView"
                 model="myBeanName.beanModel"
                 design="ALTERNATING"
                 headerVisible="true"
                 selectionMode="SINGLESELECT"
                 visibleFirstRow="1"
                 visibleRowCount="100"
                 width = "800"
                 footerVisible="false"
      		>
      <%
       idTableView.setColumnInvisible("column1"); 
       idTableView.setColumnInvisible("column2"); 
       idTableView.setColumnInvisible("column3"); 
       idTableView.setColumnType(TableColumnType.USER ,1);
       idTableView.setOnCellClick(1,"onMyOnCellClick");
      %>	
      

      Hope this helps.

      Regards,

      Praveen

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.