Discussion:
Properties for static custom adapter
(too old to reply)
Waqar Sadiq
2008-01-28 16:17:01 UTC
Permalink
IN developing a custom adapter, I need to add soem configuration properties
specific to my application. Following the patter described in the sample
file adapter, I added the following code segment to the TransmitLocation.xml.

<xs:element default="FrameworkConfig.xml" name="configFile" type="xs:string">
<xs:annotation>
<xs:appinfo>
<baf:designer xmlns:baf="BiztalkAdapterFramework.xsd">
<baf:displayname _locID="configFileName">Configuration
File</baf:displayname>
<baf:description _locID="configFileDesc">Full path to Janus configuration
file</baf:description>
<baf:category _locID="janusConfigurationCategory">Janus
Configuration</baf:category>
<baf:browsable show="true" />
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>

When I configure this adapter in a send adapter, the category apperas to be
"Misc" instead of "Janus Configuration". Furthermore, the name of the
property is blank instead of "Configuration File" and also no description
appeara when that line is selected. However, whatever value is entered, I am
able to retrieve that value at runtime in my adapter code. Can somebody
point out to me what I am doign wrong?

Also is it possible to somehow add a browse file dialog box so that the user
can browse to the file instead of having to type it in?

Thanks for the help.

Waqar Sadiq
Tomas Restrepo [MVP]
2008-01-29 11:27:15 UTC
Permalink
Waqar,
Post by Waqar Sadiq
IN developing a custom adapter, I need to add soem configuration properties
specific to my application. Following the patter described in the sample
file adapter, I added the following code segment to the
TransmitLocation.xml.
<xs:element default="FrameworkConfig.xml" name="configFile"
type="xs:string">
<xs:annotation>
<xs:appinfo>
<baf:designer xmlns:baf="BiztalkAdapterFramework.xsd">
<baf:displayname _locID="configFileName">Configuration
File</baf:displayname>
<baf:description _locID="configFileDesc">Full path to Janus configuration
file</baf:description>
<baf:category _locID="janusConfigurationCategory">Janus
Configuration</baf:category>
<baf:browsable show="true" />
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
When I configure this adapter in a send adapter, the category apperas to be
"Misc" instead of "Janus Configuration". Furthermore, the name of the
property is blank instead of "Configuration File" and also no description
appeara when that line is selected. However, whatever value is entered, I am
able to retrieve that value at runtime in my adapter code. Can somebody
point out to me what I am doign wrong?
I'm betting the problem is the _locID attributes in the configuration
schema. The _locID attribute is used to enable localization, so when biztalk
finds that attribute, it won't use the actual text in the configuration
schema, but instead will try looking for a resource string in your adapter
with the name specified by _locID. If you don't need localization, then the
easiest fix is to simply delete the attribute.
Post by Waqar Sadiq
Also is it possible to somehow add a browse file dialog box so that the user
can browse to the file instead of having to type it in?
Yes, that's possible as well. You need to build a custom UITypeEditor that
displays your custom dialog, and then associate it with the property in the
configuration schema by using the custom <baf:editor> elemement (inside
<baf:designer>). This element should have the compelete type name (assembly
qualified) of your custom type editor.
--
Tomas Restrepo
http://www.devdeo.com/
http://www.winterdom.com/weblog/
Waqar Sadiq
2008-01-29 13:29:02 UTC
Permalink
Tomas,

You were right on. I added _locId's in my resource file and everythign was
fine. I will try the UITypeEditor also. Are there any samples to be found?

thanks.

Waqar
Post by Waqar Sadiq
IN developing a custom adapter, I need to add soem configuration properties
specific to my application. Following the patter described in the sample
file adapter, I added the following code segment to the TransmitLocation.xml.
<xs:element default="FrameworkConfig.xml" name="configFile" type="xs:string">
<xs:annotation>
<xs:appinfo>
<baf:designer xmlns:baf="BiztalkAdapterFramework.xsd">
<baf:displayname _locID="configFileName">Configuration
File</baf:displayname>
<baf:description _locID="configFileDesc">Full path to Janus configuration
file</baf:description>
<baf:category _locID="janusConfigurationCategory">Janus
Configuration</baf:category>
<baf:browsable show="true" />
</baf:designer>
</xs:appinfo>
</xs:annotation>
</xs:element>
When I configure this adapter in a send adapter, the category apperas to be
"Misc" instead of "Janus Configuration". Furthermore, the name of the
property is blank instead of "Configuration File" and also no description
appeara when that line is selected. However, whatever value is entered, I am
able to retrieve that value at runtime in my adapter code. Can somebody
point out to me what I am doign wrong?
Also is it possible to somehow add a browse file dialog box so that the user
can browse to the file instead of having to type it in?
Thanks for the help.
Waqar Sadiq
Tomas Restrepo [MVP]
2008-01-29 17:33:13 UTC
Permalink
Waqar,
Post by Waqar Sadiq
Tomas,
You were right on. I added _locId's in my resource file and everythign was
fine. I will try the UITypeEditor also. Are there any samples to be found?
There are a couple of samples in the biztalk documentation. If I remember
this stuff right, however, 99% of it is just like building a regular
UITypeEditor for windows forms controls (the other 1% is adding the tag to
the XSD). :)
--
Tomas Restrepo
http://www.devdeo.com/
http://www.winterdom.com/weblog/
Loading...