Skip to Content
author's profile photo
Former Member

Problem with TableView

I have a Problem with the tableview model in SAP EP 5 SP5.

When accessing the model i got the following error :

Cannot access bean property tableBean.model in page context at pagelet._sapportalsjsp_view.doContent(

Here is the code of the bean:

package Bean;


import java.sql.*;

import java.util.Vector;

import com.sapportals.htmlb.table.DefaultTableViewModel;

import com.sapportals.htmlb.table.TableViewModel;

public class tablebean implements Serializable {

public Connection conn_bean;

public String Query_bean;

public ResultSet rst_bean;

public Statement stm_bean;

public class db_connect {

  public ResultSet connect() {

   Query_bean = "SELECT * FROM .Software";

   try {


   } catch (ClassNotFoundException e) {



   try {

    conn_bean =



   } catch (SQLException e1) {



   try {

    stm_bean = conn_bean.createStatement();

   } catch (SQLException e2) {



   try {

    rst_bean = stm_bean.executeQuery(Query_bean);

   } catch (SQLException e3) {



   return rst_bean;



public DefaultTableViewModel model;

public DefaultTableViewModel createNewTable(DefaultTableViewModel model) {

  Vector data = createData();

  Vector colName = new Vector();

  /* Define column names */

  colName.addElement("Software ID");

  colName.addElement("Software Typ");

  model = new DefaultTableViewModel(data, colName);

  return model;


public TableViewModel getModel(



  return model;


public Vector createData() {

  db_connect connect = new db_connect();


  Vector dataVec = new Vector();

  Vector retVector = new Vector();

  try {

   while ( {




  } catch (SQLException e) {




  return retVector;



Here is the code for setting the bean in the application context:

public TableView table;

public tablebean myBean = new tablebean();

IPortalComponentRequest request =

    (IPortalComponentRequest) this.getRequest();

   IPortalComponentContext myContext = request.getComponentContext();

   IPortalComponentProfile myProfile = myContext.getProfile();

myProfile.putValue("tableBean", myBean);

Here is the code of the jsp:

<jsp:useBean id="tableBean" scope="application" class="Bean.tablebean" />










           headerText="TableView example 1"





           width="500 px"


I hope someone can help me...

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Dec 16, 2003 at 10:16 AM

    Hi, problem is, that the bean is not found by the JSP - in this case the JSP creates an empty bean and you would end up with this error. Check if you bean is set up, model is set up and that the filled bean is set by myProfile.putValue.

    Bye Sigi

    Add comment
    10|10000 characters needed characters exceeded