Develop > Presentation layer > Management Center framework > Customize the Management Center user interface > Create a new tool for the Management Center > Define OpenLaszlo classes instantiated in a tool definition class


Define child objects for a primary object

You can use child object definitions when have multiple property values or translatable data. For example, attributes are declared as child objects under Products. Child objects can have their own child objects. For example, attributes have translatable data and need their own language-sensitive child objects.


Before you begin

Before defining a child object for a primary object:

  1. Review the Management Center modeling guidelines.

  2. Create the Management Center services required to support the child object, such as create, update, or delete services.

  3. Work with these services to develop client libraries, new commands, and business logic.

  4. Create new Management Center objects.

  5. Review the wcfChildObjectDefinition class for more information about child object definitions.

  6. Define a wcfGetChildrenService class under the parent wcfPrimaryObjectDefinition class that returns instances of the new child object.


Procedure

  1. Select a unique object type, such as CatalogEntryDefiningAttribute.

  2. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  3. Expand LOBTools > WebContent > WEB-INF > src > lzx > your_company_name > Management_Center_component > objectDefinitions, where Management_Center_component is the name of the new custom tool.

  4. Open the library file that contains the primary object definition. For example, ProductPrimaryObjectDefinition.lzx.

    1. Add the wcfChildObjectDefinition instance under the primary object definition. For example:

      <class name="extMyPrimaryObjectDefinition" 
      
          ... 
      
         
      <!-- Child Object Definitions --> 
         
      <wcfChildObjectDefinition 
              objectType="MyChildObject" 
              displayName="${myResources.myChildObject_DisplayName.string}" 
              idProperty="myIdProperty"> 
      
              ... 
      
         
      </wcfChildObjectDefinition> 
      
          ... 
      
      </class> 
      

    2. Specify the create, update, or delete services for the child object.

    3. Declare the property definitions for this child object.

    4. Declare the child objects for this child object.

    5. Declare the reference objects for this child object.


What to do next

After you complete the work:

  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the WCDE_INSTALL\workspace\LOBTools\WebContent directory. This is the default environment setting.

  2. Test the work by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.

  3. Deploy your files to the production environment.


+

Search Tips   |   Advanced Search