cancel
Showing results for 
Search instead for 
Did you mean: 

onLoad method in MeasurementList

Former Member
0 Kudos

Hi all,

This is regarding the onLoad method in MeasurementList.

My requirement is to add the equipment and functional location details to the Measuringpoint List. So i'm trying to incorporate the objects of both the measuring point and the equipment into one.

A new view controller is created for this purpose. It is suggested to extend the MeasurementList class and overwrite the onLoad method in it.But, can anyone explain what is really done with the onLoad method here?

/**

  • Event handler called when loading the measurement point list page.

  • @param forwards Forwards representing the list of all forward pages for this event

  • @return Forward the forward page selected

*/

public Forward onLoad(Forwards forwards) {

custom = getMeasureCustomController();

Context context = getContext();

/* clear every child since we are the parent */

custom.resetCustomMethods();

// Set the attributes that the list will use

if (context.getValue("resetNav") != null && context.getValue("resetNav").equals("true")) {

com.sap.mbs.tools.list.PageBuilder.resetAllNavigations();

}

return super.onLoad(forwards);

}

Regards,

Hamsa Priya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

Nothing in fact:) Just resetting the various custom controllers and navigation.

In MAM 3.0 laptop solution, which I guess you are looking at by the look of the onload, the actual list loading code is in the onMeasurmentPointListLoad (or something similar) method which is called when the frame is processed.

To add fields to the list, you have to first enhance the BO locally so that you return the fields you need from technical object associated to the point. Then you have to enhance the listdef.xml file to add those field to the UI. Normally, if you have done everything correctly, you don't have to play with the view controller. This is all explained in the provided enhancement guide.

Thank you!

Julien.

Former Member
0 Kudos

Hi Julien,

My requirement is like this:

Adding Fields from one(MeasurepointEquipList) to another(Measuringpoint List).

<b>To add fields to the list, you have to first enhance the BO locally so that you return the fields you need from technical object associated to the point.</b>

Can you pls tell me how this should be done? Have you done smething similar to this? Any sample coding which could help my requirement, bcoz i'm totally new to this concept..

Also send me some documents which could explain the architecture of MAM better, in simple words..i.e the link and flow between the java,jsp, .view and xml files..

Thank You.

Regards,

Hamsa Priya

Former Member
0 Kudos

Hello,

This is all explained in the enhancement guide that is bundled with MAM. When you download MAM from Service Market Place, you will get all those document with it. Please have a look.

Thank you,

Julien.

Former Member
0 Kudos

Hi Priya,

Check this out if it is useful.

https://forums.sdn.sap.com/click.jspa?searchID=2479386&messageID=3130948

Cheers,

Karthick