cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated attribute setter & getter methods

Former Member
0 Kudos

Hi,

i want more information on Calculated Attribute setter method & Calculated Attribute getter method.

i have a value attribute, to which properties of CalculatedAttributeGetter & CalculatedAttributeSetter values are given with the method names.

Is it like whenever we try to set a value for that attribute the setter is called and getter is called whever tries to get value.?

Please give more info on this.

Attribute: Emp

Setter: setEmp

getter: getEmp

Thanks

Hussain

Accepted Solutions (0)

Answers (2)

Answers (2)

SB9
Active Participant
0 Kudos

Hi Maha,

yes, you are right. Setter will be called when a value is assigned to the calculated context variable by the webdynpro. you can use it to modify the value before display.

Thanks,

S-B

Former Member
0 Kudos

Hi,

Thanks for your inputs.

Former Member
0 Kudos

A simple example might be:

Let's say you have a table that is mapped to a particular context node. You can create a context element named "RowCount" that is calculated. In the getter method you would put code that returns the size of your node list. Then you would map the visible row count of the table to that context element. This way the table is always as long as your node list.

I do this a lot and place the table inside a scroll container so users don't have to deal with the ugly pagination (and it's resulting server round trips) in NW2004s 7.0.

former_member201361
Active Contributor
0 Kudos

hi,

hope this link will help you.

If we create a value attribute then there will be a property called "calculated",set that property as true then we get two methods called "getter" and "setter".This is to be used for setting some values to our variables and getting that.In java .

( used for Encapsulation purpose.)

[http://help.sap.com/saphelp_nw70/helpdata/en/7f/a0384162316532e10000000a1550b0/frameset.htm]