Custom Configuration Section Help

  • Thread starter Thread starter Yan Yi Huang
  • Start date Start date
Y

Yan Yi Huang

Hi everyone,

I have created a custom configuration section which contains an optional
configuration element. When I retrieve the custom configuration section, I
also get an instance of the nested configuration element even when I don't
have it inside the custom configuration section. Need help figuring out how
to have null value for the optional configuration element when it is not in
the configuration section.

I have no problem retrieving the section:

<customConfig>
<customElement value="blah"/> <!-- optional and can be missing
sometimes -->
</customConfig>

Would like to have null when I call customerConfig.customElement with the
following config:

<customConfig>
</customConfig>

Currently, calling customerConfig.customElement returns an instance of
customElement with the attribute value="".

Any help will be appreciated.

Yan Yi
 
Back
Top