FragmentTypes

Simply put, the Fragment is just the EditForm part of the derived BusinessObject.

Here it is sufficient to define the controls appearing on the EditForm only to the auxiliary fields of the derived BusinessObject. A Fragment XML file is needed even if there is no auxiliary field of the derived BusinessObject. In this case the XML contains only the minimally needed settings.

/Fragment

Root element.

/Fragment/Caption

The caption of the object. Currently it doesn`t appear on the surface.

/Fragment/DataDefinition

The DataDefinition of the object. it's needed for the filters.

/Fragment/BusinessObject

The BusinessObject of the object, that we need to specify in the following way: <BusinessObject>{MainBO}.{SubBO}</BusinessObject>, where the {MainBO}' is the basic business object, while the {SubBO}' is the current object, for example BusinessObjectEvent.Step1.

If no additional data is needed, thus we don't ask for extra data on the form, the parameterization of the Fragment XML file needs to be done the following way:

<?xml version="1.0" encoding="iso-8859-2"?>

<Fragment xmlns="http://effector.hu/schema/ns/editform">
    <Caption />
    <DataDefinition>DDEventEdit</DataDefinition>
    <BusinessObject>BusinessObjectEvent.Step1</BusinessObject>
</Fragment>

If there is extra information that we would like to display/manipulate (using new input fields) then we can add ControlGroups in the Fragment file the same way as in the EditForm file.

If we would like to overwrite the ControlGroup in the EditForm file, within the Fragment file, then we have to set the same value in the name attribute in a ControlGroup as the one set for the EditForm.

Defining the selectable Fragments

In the FragmentList directory, the system looks for an XML for the parent BusinessObject that describes the possible sub types. If we would like to define the Fragments for one of the business objects, and select them from a drop down list upon clicking a button, then we have to create a FragmentList{BusinessObject}.xml file in the FragmentList directory where we have to write the name of the corresponding basic business object in the place of the {BusinessObject}, for example FragmentListProject.xml. The system will look for this when for example we parameterize a transaction selection button on the screen.

The structure of such a file is the following:

/FragmentList

Root element.

/FragmentList/ParentBusinessObject

The base business object that belongs to the given business object subtypes, that is supplemented.

/FragmentList/SourceType

The source of the list elements, it can have two different values:

  • Database: the list elements` key/value pairs are returned by the stored procedure.
  • XML: The list elements are stored in the XML file

/FragmentList/Source

The source of the business object list needs to be defined here. Within this, we have to set either the SQL command, or the list of the selectable elements depending on the value of the SourceType node.

/FragmentList/Source/Database

If the value of the SourcetType node is Database, this collection node needs to be set.

/FragmentList/Source/Database/SelectionString

The SQL command that returns the list of the business objects.

Attribute:

  • type: The type of the SQL command: StoredProcedure, Select; optional, default value Select

In case of SQL type listing the name of the stored procedure, that the system runs and gets the key/value pairs of list elements as a result. The stored procedure receives the following parameters: (these don`t need to be given explicitly, the system automatically adds the parameter list):

  • @mmName: Name of the current work method
  • @screenName: name of the current screen
  • @componentName: name of the current component
  • @buttonName: name of the current button
  • @userID: ID of the logged in user
  • @parentBoName: name of the basic buisness object

These can all be used in the stored procedure.

/FragmentList/Source/Database/ObjectTypeColumn

The column containing the type of the business object in the query.

/FragmentList/Source/Database/CaptionColumn

The caption of the object type in the query, this appears in the object creating drop down list.

/FragmentList/Source/Fragments

If the XML value is set in the SourceType node, this collection node needs to be set. The list of the business objects.

/FragmentList/Source/Fragments/Fragment

The description of an object type.

/FragmentList/Source/Fragments/Fragment/ObjectType

The caption of the object type, this appears in the object creating drop down list.

Example 1:

<FragmentList xmlns="http://effector.hu/schema/ns/fragmentlist">
    <SourceType>Database</SourceType>
        <Source>
            <Database>
                <SelectionString type="StoredProcedure">osp_getProjectTypes</SelectionString>
            </Database>
        </Source>
</FragmentList>

Example 2:

<FragmentList xmlns="http://effector.hu/schema/ns/FragmentList">
    <ParentBusinessObject></ParentBusinessObject>
    <SourceType>XML</SourceType>
    <Source>
        <Fragments>
            <Fragment order="10">
                <ObjectType>Email</ObjectType>
                <Caption>Mail</Caption>
            </Fragment>
            <Fragment order="20">
                <ObjectType>Meeting</ObjectType>
                <Caption>Meeting</Caption>
            </Fragment>
        </Fragments>
    </Source>
</FragmentList>

  • Last update: 19 weeks 3 days ago
  • Effector