dominoGuru.com

Your Development & Design Resource

Reserved Custom Control Property Names in IBM XPages

I was just adding to some jumpstart Custom Controls for an HTML5-based XPages project that I'm working on when I ran into something new. Specifically, I was working on the bdi Custom Control (for the <bdi> HTML5 element), and tried to match the name of the HTML5 element attribute (dir) with the Custom Control property counterpart.

Domino Designer Alert for reserved 
Custom Control property names in XPages Domino Designer Alert for reserved Custom Control property names in XPages

So, apparently you can't use any of the following Custom Control property names:

Reserved Property Name
autoRemove
binding
createForm
dir
disableTheme
id
loaded
rendered
rendererType
themeId

Not the end of the world, mind you, as it's a simple enough fix: name the Custom Control property that handled the dir HTML5 element attribute to direction:

<bdi
    id="#{compositeData.elementID}"
    class="#{compositeData.elementClass}"
    dir="#{compositeData.direction}">
    <xp:callback
        facetName="facet_bdi"
        id="callback_bdi">
    </xp:callback>
</bdi>

-- and now you know!

This is why I also avoid property names like "type", "length", "location", and other reserved [or potentially reserved] words. You'll get no errors when you use those, however...


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.