Constructing the OASkillView Part


OASkillView composition illustration

  1. Create a visual part as follows:

    The part opens in the Composition Editor.

  2. For this part, the client area requires 5 rows and 5 columns. Make the following expandable:

    Set row 1 to a height of 20.

  3. Add an IStaticText* part to cell (2,2). Change its label to Requested Skill.

  4. Add an IEntryField* part to cell (2,4). Name it SkillNameEF. Set its tabStop style property on.

  5. Add an IVBContainerControl* part to cell (4,2). Span it to cell (4,4). Set it as follows:

  6. Add two IContainerColumn* parts to SkillCnr. Set ContainerColumn1 as follows:

  7. Set ContainerColumn2 as follows:

  8. In the ButtonBar part, add and edit the buttons so that they appear in the following order. To even out button size, set the packType property of ButtonBar to expanded. If necessary, use the parts list to reorder the buttons.

    Table 22. Button Parts for OASkillView
    Name it... Change label to read...
    RefreshPB Refresh
    ClearPB Clear
    CancelPB Cancel

    Set RefreshPB as the default button.

  9. To manage data in the IEntryField* parts, add a Variable part. Name it Skill and give it a type of OASkill*. Promote the this attribute of the Skill variable.

  10. Add another Variable part. Name it SkillBase and give it a type of OASkillBase*. Promote the this attribute of the SkillBase variable.

  11. Add another Variable part. Name it SkillList and give it a type of IVSequence<OASkill*> *. Promote the this attribute of the SkillList variable.

  12. To handle data access exceptions, add an IMessageBox* part. Name it NotFound.

  13. Connect parts as follows. The connection from CancelPB to the IFrameWindow* part was drawn when you created the part. For simplicity's sake, this table assumes that it is the first connection (conn0).

    Table 23. Connections for OASkillView
    Connection number From Part, feature... To Part, feature...
    1 Skill, skillName SkillEF, text
    2 SkillList, this SkillCnr, items
    3 SkillEF, textLength RefreshPB, enabled
    4 RefreshPB, buttonClickEvent SkillBase, getSkill
    5 conn4, aSkillName Skill, skillName
    6 conn4, aList SkillList, this
    7 conn4, exceptionOccurred NotFound, showException
    8 ClearPB, buttonClickEvent SkillEF, removeAll
    9 ClearPB, buttonClickEvent SkillList, removeAll


Related procedures
Constructing the OAContractView Part
Constructing the OAContractorView Part
Working with Parts in the Composition Editor
Editing Part Properties
Dropping Parts in the Composition Editor
Setting Template Arguments
About Promoting Part Features
Making Connections in the Composition Editor

Related references
IVBContainerControl
IContainerColumn
IVSequence