203 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Questions from the DataTables Webinar
Tue, Oct 18th 2016 3
Upcoming Webinar: XPages and jQuery DataTables
Tue, Oct 4th 2016 3
Adding icon columns to DataTables with FontAwesome
Wed, Sep 14th 2016 8
Demo database from my MWLUG session
Thu, Sep 8th 2016 4
Slides (and thoughts) from MWLUG – XPages & jQuery DataTables
Wed, Aug 24th 2016 6
I’m speaking at MWLUG about…
Wed, Jun 29th 2016 4
XPage loading slow? Check your document datasource
Wed, Dec 16th 2015 5
Top 10
My first OpenNTF project – Dojo Name Picker
Fri, Jul 25th 2014 9
Adding icon columns to DataTables with FontAwesome
Wed, Sep 14th 2016 8
SSJS variables vs. scope variables
Mon, Jul 14th 2014 6
Slides (and thoughts) from MWLUG – XPages & jQuery DataTables
Wed, Aug 24th 2016 6
XPage loading slow? Check your document datasource
Wed, Dec 16th 2015 5
I’m speaking at MWLUG about…
Wed, Jun 29th 2016 4
Demo database from my MWLUG session
Thu, Sep 8th 2016 4
XPages tip: Using jQuery class selectors with hidden inputs
Mon, Aug 18th 2014 3
My first #MWLUG … what was I waiting for?
Sun, Aug 23rd 2015 3
Upcoming Webinar: XPages and jQuery DataTables
Tue, Oct 4th 2016 3


Copying Custom Controls
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
michaelgsmith    

This tip is pretty simple, and it might be common knowledge to most people, but I stumbled onto it pretty much by accident.

Copying a custom control from one XPage to another is fairly common, but when you do so and go to build your new page, you get the message:

The prefix “xc” for element “xc:ccTest” is not bound.

error_message

Previously, I never really bothered to look into this message any further.  I took the easy way out and simply dragged a new copy of the custom control onto the XPage, copied any custom properties (if any), and went on my way.  However, this can get annoying REAL fast if you have a lot of custom controls that need to be copied.

Luckily, there is a ridiculously easy way to quickly get rid of the above message.

When you create a new Xpage, the standard markup looks like this:

<?xml version="1.0" encoding="UTF-8"?> 
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"> </xp:view>

Look what happens as soon as you drag a custom control on to your XPage:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
	xmlns:xc="http://www.ibm.com/xsp/custom">
	<xc:ccTest></xc:ccTest>
</xp:view>

Adding the bolded line above to the xp:view tag of your page will allow you to copy custom controls to your XPage without frustration.  At the end of the day is it really a big time saver?  No.  But at least you have a better understanding of the error message.

 




---------------------
http://xpage.me/2014/07/17/copying-custom-controls/
Jul 17, 2014
2 hits



Recent Blog Posts




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition