Show TOC

Defining the Model Classes as PublicLocate this document in the navigation structure

Context

You can use the models defined in the storage development component in the servapp development component. To do this, you must define the imported model classes as public.

Recommendation

We recommend that you create separate development components for models and the application logic.

Procedure


  1. Click the model that you imported ( ServiceModels ) with the secondary mouse button and choose Add to Public Part .

    The Add Entities to Public Part window appears.

  2. Choose New.

  3. In the Name field, enter Modelspublic

    The Purpose field must be of the Compilation type.

    However, the Purpose field can have any of the following three values:

    • Compilation - Choose this option whenever the objects from the public part of the DC being used are also required for compiling in the DC. Using the Component Build function, the DC bundles together these objects in a separate JAR archive.

    • Assembly - Choose this option if you want to bundle the objects from the public part in the DC being used to a larger DC. This is possible together with the DCs used, and then the DC is deployed - but not in a separate archive.

      The public part in this case is not required for compiling the DC used.

    • Infrastructure - This option is not of relevance for Web Dynpro DCs. It is only important for plug-in developments.

  4. Choose Finish.

  5. Select Modelspublic , and choose Next.

  6. Choose Finish.

  7. Choose Start of the navigation path Window Next navigation step Open Perspective  Next navigation step  Other... End of the navigation path

  8. Select Development Infrastructure and choose OK.

  9. From Component Browser, expand Start of the navigation path local development  Next navigation step MyComponents  End of the navigation path and select s ervapp.

  10. In ComponentProperties, select the Dependencies tab.

  11. In Required DCs, choose Add.

    The Adding Dependencies wizard starts.

  12. Expand Start of the navigation path Local Development Next navigation step MyComponents  End of the navigation path and choose storage.

  13. Choose Next.

  14. In the Required New DCs, select Modelspublic, and choose Finish.

  15. Choose Start of the navigation path Window Next navigation step Open Perspective  Next navigation step  Other... End of the navigation path

  16. Select Applications for Laptops and choose OK.