cancel
Showing results for 
Search instead for 
Did you mean: 

Creating tables in JspDynpage in HTMLB

pravesh_verma
Advisor
Advisor
0 Kudos
235

Hi all,

I am having few problems while working with HTMLB.

1) First of all help me finding the location where I can get some of the examples in PDK about tableview. I found many people posting that look for the examples in PDK for HTMLB JSPDynPage. I tried to find it but didn't get it. Please tell me that.

2)I am trying to make tables through JspDynpage. I visited few of the post answered earlier regarding the same. But could not achieve the results. I tried the follwing link but got some errors.

Please tell me the way to make the tables with help of model.

Regards

Pravesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Pravesh,

As for your first question, have you installed PDK on your EP server. If yes, Then you will get a role called Java Development. Assign this role to your user and login. Under this role you will find Examples. Try there. You should get an example for Tables.

Ranjith

pravesh_verma
Advisor
Advisor
0 Kudos

Hi,

Thanks Rajeev and Ranjith for your response but I have already tried this example. I know that I have to create a model but when I create the

Portal Application Object ->JspDynpage->Generate Bean Statement,

I get three things with me:

1) JSP page.

2) Bean class(in src.api)

3) Java Class(in src.core)

I think I am going right till now. Now please refer the link I have send. I added all the three things accordingly. Even then its giving an error.

So please suggest me the way to get the things right

And Ranjith I have PDK installed on my EP server But under the section of Java Development there is no link as examples, anyhow there is link called OBN Examples but i dont think that you are talking abt that.

Please let me know am I on the right track.

Regards

Pravesh

pravesh_verma
Advisor
Advisor
0 Kudos

Hi all,

Still I am looking for the answers of my question. Can anybody help me finding it.

Thanks and Regards

Pravesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Pravesh

this is a sample code of what u want

private DefaultTableViewModel createNewTable

(DefaultTableViewModel model) {

Vector data = createData();

Vector colName = new Vector();

/* Define column names */

colName.addElement("1stColumn");

colName.addElement("2ndColumn");

colName.addElement("3rdColumn");

model = new DefaultTableViewModel(data, colName);

return model;

}

private Vector createData() {

Vector dataVec = new Vector();

Vector retVector = new Vector();

/* 1st entry */

dataVec.addElement("Row 1, Column 1");

dataVec.addElement("Row 1, Column 2");

dataVec.addElement("Row 1, Column 3");

retVector.addElement(dataVec);

/* 2nd entry */

dataVec = new Vector();

dataVec.addElement("Row 2, Column 1");

dataVec.addElement("Row 2, Column 2");

dataVec.addElement("Row 2, Column 3");

retVector.addElement(dataVec);

/* more entries */

.

.

return retVector;

}

Regards

Rajeev.

pravesh_verma
Advisor
Advisor
0 Kudos

Hi rajeev,

I have already gone through the link you have posted. But could not understand that how will I create a model class for the table view. Can you help me doing that.

And I am also looking for the answer of my first question..

Regards

Pravesh

Former Member
0 Kudos

Hi Pravesh,

Try the following link:

http://help.sap.com/saphelp_nw04/helpdata/en/26/f79241e9129f09e10000000a155106/content.htm

This describes in detail about creating a model and using it.

Ranjith

Former Member
0 Kudos

Hi Pravesh

try out this link

http://help.sap.com/saphelp_nw04/helpdata/en/fd/01f34026d70b06e10000000a155106/frameset.htm

in that go to visible controls-> table view model

Regards

Rajeev.