Custom Configuration Section Help

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top