• Anonymous
  • Login
  • Register
XPages Extension Library - Response: Dynamic controls need IDs determined at compile time

Created on Jul 5, 2012
Created by Maire Kehoe

Yes, you are correct, the ID cannot be computed at load time in that situation.

There is a limitation that controls that use dynamic content behavior need to have an ID that is available at compile time.

For example, for this page:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:dialog id="${javascript:compositeData.dialogId}">
EMPTY DIALOG
</xe:dialog>
<xe:dialog id="dialog2">
EMPTY DIALOG
</xe:dialog>
</xp:view>

If you look at the corresponding .java file, you'll see a method:

        public int getComponentForId(String id) throws NoSuchComponentException {
            if( "dialog2".equals(id) )
                return 3;
            return -1;
        }

That method is used when dynamically loading the control content into the server-side control tree. At compile time, when that .java file is generated, the ID "dialog2" is available, so it would be possible to dynamically load dialog2. However the ID of the first xe:dialog is not available at compile time (it will only be available later at page load time), so the getComponentForId method which is generated at compile time cannot handle the ID for the first xe:dialog control.

The controls that use dynamic content behavior are Dynamic Content, In Place Form, Tooltip, Dialog and Mobile Application Page.









Documents
     
Creation Date
Author
Subject
Jul 5, 2012 Jan Christian Krüger Dialog Control with computed ID in a CC
Jul 5, 2012 Maire Kehoe     Response: Dynamic controls need IDs determined at compile time
     
In this field you can enter the actual content.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.