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

Tableview Problem

Hi,

I am working with tableview. I have initialised

Model bean and trying to show the table. When

I run the iView, it throws error. I have confirmed

that data is being fetched from backend(see below which

I am showing for testing purpose). There is no error

when setting the bean vectors.

Here is the Error Message

Portal Runtime Error

An exception occurred while processing a request for :

iView : pcd:portal_content/HRDEV/Roles/HRTESTROLE/MSSPages/HR_Workset/Myassociates/MSSCOMPHIST2

Component Name : MSS_COMPHISTORY.MSSHeaderDynpage

5 >= 5.

Exception id: 01:35_11/08/05_0023

-


Printing retrived values from SAP

B - Business Intelligence|M3

B - Create & Deliver Soln - Plan & Orgnz|M3

B - Create & Deliver Soln - Problm Solvg|M3

B - Customer Orientation|M5

B - Customer Orientation|M3

B - Financial Responsibility|M6

B - Financial Responsibility|M3

B - General Profile|M3

B - Technical Expertis - Apply & Anticip|M3

B - Technical Expertis - Buildng & Maint|M3

Creativity|Yes

-


How ever, when I remove this block from the JSP page,

the error is gone.

<hbj:tableView

id="myTableView1"

model="myBean.model"

design="ALTERNATING"

headerVisible="true"

footerVisible="true"

fillUpEmptyRows="true"

navigationMode="BYLINE"

selectionMode="MULTISELECT"

headerText="TableView example 1"

onNavigate="myOnNavigate"

visibleFirstRow="1"

visibleRowCount="30"

width="500 px"

/>

can anyone tell me what could be the issue

Here is my Bean code

package com.wwy.mss;

import java.io.Serializable;

import java.util.Vector;

import com.sapportals.connector.execution.structures.IRecordSet;

import com.sapportals.htmlb.table.DefaultTableViewModel;

import com.sapportals.htmlb.table.TableViewModel;

public class MSSCompHistoryBean implements Serializable {

public DefaultTableViewModel model;

public TableViewModel getModel() {

return this.model;

}

public void setModel(DefaultTableViewModel model) {

this.model = model;

}

public void createData(IRecordSet table) {

Vector vColHeader = new Vector();

vColHeader.addElement("Competency");

vColHeader.addElement("Required for Current Position?");

vColHeader.addElement("Proficiency");

vColHeader.addElement("Valid From");

vColHeader.addElement("Valid To");

vColHeader.addElement("VENDD");

Vector vTabData = new Vector();

try {

table.beforeFirst();

while (table.next()) {

Vector vRowData = new Vector();

vRowData.addElement(table.getString("QUALIFICATION"));

vRowData.addElement(table.getString("REQUIRED"));

vRowData.addElement(table.getString("PROFICIENCY"));

vRowData.addElement(table.getString("VBEGD"));

vRowData.addElement(table.getString("VENDD"));

vTabData.addElement(vRowData);

}

} catch (Exception e) {

e.printStackTrace();

}

this.setModel(new DefaultTableViewModel(vTabData, vColHeader));

}

}

Here is my XML code

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.ivs.connectorservice"/>

</application-config>

<components>

<component name="MSSHeaderDynpage">

<component-config>

<property name="ClassName" value="com.wwy.mss.MSSCompHistoryDynpage"/>

<property name="SecurityZone" value="com.wwy.mss/low_safety"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

</components>

<services/>

</application>

regards

Sudheer

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2005 at 07:04 PM

    Hi Sudheer,

    In method createData you define 6 columns in the header vector, and put only 5 values in each data row.

    This may be the cause to the problem.

    Hope that helps,

    Yoav.

    Add a comment
    10|10000 characters needed characters exceeded

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.