cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Result Set from Java Bean model to Webdynpro View

Former Member
0 Kudos

Hi All,

I am trying to execute query and fetch the rows from ORACLE.

My code works fine in fetching the data and puttin in ResultSet.

My problem is passing Result Set from Java Bean model to Webdynpro

If the Bean has attributes with the data type String then it is visible while creating model mapping in webdypro where as if I create an attribute with the type ResultSet or Object then it is not visible in model mapping.

Could any one let me know the procedure for passing the ResultSet from JavaBean to webdynpro

Thanks for the help

Regards,

Santhosh

Accepted Solutions (1)

Accepted Solutions (1)

SB9
Active Participant
0 Kudos

Hi,

You can use the Transfer Object design pattern to solve this problem.

1. Create a java class which implements java.io.serializable.

2. Add all the private members which you want to pass.

3. Generate public getter setters for all the private members.

4. Populate this TO from the resultset and pass this TO into webdynpro view. you will be then able to import it and use it in webdynpro.

Thanks,

Soujanya Bhaumik

Former Member
0 Kudos

Hi,

Soujanya and Alka thanks for your inputs.

I managed to pass result set in the following way.

I created an ArrayList instance(al) and added the ResultSet instance to al.

Generated getters and setters for ArrayList.

But the Arraylist instance was not available for mapping.

So I created a property in the properties tab of the model with the data type java.util.ArrayList.

After this the ArrayList instance al is available for mapping

Thanks for the help

Regards,

Santhosh

Answers (1)

Answers (1)

Former Member
0 Kudos

plz go through this

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e9...

xxxxxxxxxxxxxxxxxxxxxx

thank you

regards

Samyuktha

Edited by: Armin Reichert on Apr 26, 2008 6:40 PM

Former Member
0 Kudos

Thank you Samyuktha for the response.

I have seen that doc earlier,it does talk about passing primitive data types but not about passing ResultSet.

I am able to pass if it is primitive data type but not ResultSet

Please let me know if you have any idea about the same

Regards,

Santhosh

Former Member
0 Kudos

Hi Santhosh,

The Interface java.sql.ResultSet is not Serializable. That means, it cannot be returned as other objects. Hence, you are not able to see it in the model of the Java Bean.

Regards,

Alka.