March 7, 2021
Hot Topics:

Creating an Application Development Framework Using Enterprise Templates - Part 3

  • By Thiru Thangarathinam
  • Send Email »
  • More Articles »

Customizing the Development Environment

In this section, we will see how to customize the development environment so that the developers don't have to spend trying to determine which options to use.

Setting default constraint for toolbox items

In this section, we will see how to set default property value for the EventLog component. You might recall that in our application we always log exceptions or informational messages using a specific event source. This is very handy because we can use the event source to uniquely identify all the exceptions that are logged from our application. We can enforce this in our application by creating a PropertyConstraint that pre-sets the event source property value of the EventLog component (that is available under the Toolbox->Components tab) to ExceptionManagerPublishedException. Once this is done, any time a developer tries to add the EventLog component to the application, the event source property will be automatically set to ExceptionManagerPublishedException and it will be read-only. We can accomplish this by adding the following entries to the CustomDistributedAppTemplate.tdl file.


As you can see from the above, we set the value of the READONLY element to 1 to prevent the event source property value from being modified. To verify this, if you drag and drop a EventLog component from the toolbox to the project, you will see that the event source property is set to ExceptionManagerPublishedException and it is read-only.

Page 2 of 4

This article was originally published on June 26, 2003

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date