cancel
Showing results for 
Search instead for 
Did you mean: 

Web dynpro and JavaBean

Former Member
0 Kudos

Hello friends,

I have a requirement i.e. I am having a RFC which returns address details....now I need to store this address details in some MAP or arrylist, so that end user either can update or change the address...

I would like to know, is there any way to have setter and getter functionality or can I create an address object in wd environment or so ?

Regards,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

First you create a attribute of type Arraylist .By using Properties tab select javanative type and set that attribute type to ArrayList.

In the Properties tab set the Calculated property to true.

then it generates getters and setters.

In getter method of that attribute use following code.

For example if you want to store AirlineId you do the following coding.

valueatr-->ArrayList

public java.util.ArrayList getFlight_DataValueatr(IPrivateFirstCompView.IFlight_DataElement element) {

Object airid=(Object)element.getAirlineid();

ArrayList airlineid=(ArrayList)airid;

return airlineid;

}

here Airlineid returns String,thatswhy i concatenated into Object and then to Arralist.

If you want to avoid any type compatibility errors create the attribute in Corresponding node of particular attribute that you want to use.(here AirlineId)

so if you want to access AirlineId call this getter method,and do whatever functionality you want.

Regards

sowmya.