cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent!!!!To pass an array from one view to another view

Former Member
0 Kudos

hi

i want to pass an array of attributes from one view to another view how can i do that...is it possible ...?

it is urgently needed pls help me,,,,

Will give points to helpful answers

Warm regards

Shanto Aloor

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

1)if u wnat to pass 4 values like val1,val2,val3 and val4

2)create context variables in the component controller like cvar1,cvar2,cvar3 and cvar4

3)Then map these variables to the target view.(By using the data modler.

Thanks

Hazrath

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

To pass objects from one view to another view is simplest way is set the objects into session(HTTPSession) and retrieve it from another view. Steps are given below.....................

Step 01: Add J2EE.jar file into classpathe of your webdynpro application as add external jar.

Step 02: Create session(HTTTPSession) object.

Step 03: Store objects into session as setAttribute.

Step 04: Retrieve objects from session from another view.

Regards...

Santanu

Former Member
0 Kudos

Hi Shanto,

Which version of NetWeaver r u using? If u r using 04s/7.0.x , u can use a collection for that. Create an context attribute of type ArrayList(or any other collection) & using context mapping, u can pass the values.

regards

Sumit

Edited by: Sumit Malhotra on Mar 25, 2008 11:30 AM

Former Member
0 Kudos

hai sumitha,

Can you provide the coding to store the values in arraylist.

Thanks n Regards

Sharanya.R

Former Member
0 Kudos

I cant see the point on using webdynpro if you dont take advantage of attribute mapping.

And for the array-list issue, use Array.asList(Object[]), reverse would be List.toArray().

Regards

Julio Herrera

Former Member
0 Kudos

hai shanto,

Even iam having the same requirement.Once you find the solution plz share it with coding.

Thanks n Regards

Sharanya.R

Former Member
0 Kudos

Thats what contexts mapping/bindings are for. Just create an attribute in controller context, of that array type, and map it to both of those views.

When you change the value on one of these contexts, it will change on the others too, mapped attributes share values because they share the same instance.

Regards

Julio Herrera

Former Member
0 Kudos

Hi,

What kind of array?

Instead use the attribute inside a node and map it to both the views using controller.

Now you have array of values in both the views.

thanks & regards,

Manoj