If you are in a WebApp method or another LJO you can make a call to an LJO method in one of two ways.
You can use WebAppAccess callMethod(..)
method just as you would for a WebApp method, except that in the method name, you must specify the name of the linked Java object builder call in your model. Here is an example calling a method named doWork on an LJO that takes a webAppAccess and a string argument.
In this example the actual signature of doWork is as follows:
public void doWork(WebAppAccess webAppAccess, String name);
Calling it through the callMethod(..)
automatically passes the WebAppAccess as the first argument.
You can also get an instance of the LJO and make the call directly like so:
SampleLJO myLJO = (SampleLJO)webAppAccess.getVariables().getObject("MyLJO");
Because you made the call directly you must pass in the WebAppAccess reference.
If the LJO has been specified to be used as the base class of the generated method class then you may call the method directly without using the linked Java object builder name as the prefix (without "MyLJO.").
Parent topic: Method and LJO method calls: wpf7