Developing with SAP NetWeaver Developer Studio | AWT First Steps | Structure of the MDK Examples | AWT Persistence Example
This example uses the configuration API to get information about the MI client. This information is displayed with navigation buttons. We recommend to import the example into your SAP NetWeaver Developer Studio / Eclipse workbench. To download the example program, click here.
Result of the example:
The example uses following packages:
import com.sap.ip.me.api.conf.Configuration;
import com.sap.ip.me.api.user.User;
import com.sap.ip.me.api.user.UserManager;
import com.sap.ip.me.api.runtime.awt.AwtApplication;
import com.sap.ip.me.api.services.Log;
The following classes use the MI API:
Java |
Description |
SystemInfo.java | Implementation of the AwtApplication class. |
Constants.java | Interface defining all text strings used in SystemInfo.java. |
BasicDataHandler | Generates the data to be displayed. |
CenterPage | Implementation of the center page the displays the tabular data. |
NoDetailList | Implementation of the table that is displayed in the center page. |
The classes that create the user interface and handle the events can be seen
on your SAP NetWeaver Developer Studio / Eclipse workbench. If you did not import
the example so far download
the example and import it into
your workbench. Please refer to the document Structure
of the MDK Examples for more details about the com.sap.ip.me.mdk.api.awt.gui.*
package.
The class configExampleAWT implements AwtApplication and Constants. Constants is an interface in which we define all relevant variables for the application including the name of the MI application.
The class SystemInfo extends AbstractMEHttpServlet which extends javax.servlet.http.HttpServlet itself. The method doHandleEvent does:
The class BasicDataHandler uses the configuration and user API to fill a vector with data. It also includes methods to access this vector. You can get all available entries in the vector or parts of it, specified by the beginning index and the number of entries needed.