This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 3, 2011, 2:02 AM
5 Posts

About naming container

  • Category: Documentation
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: naming container
  • Replies: 2
Sorry for my poor English...
Mar 3, 2011, 4:12 AM
41 Posts
Re: About naming container
 Panel and all its descendants are naming containers, so this includes custom controls, repeats, tab panels, and the "include page" component, as well as some components in the Extension Library. The primary purpose of the naming container is to ensure uniqueness of the client ID (the value of the id attribute in the rendered markup), so for any given component, that ID is some indication of the hierarchy of naming containers that contain it. For example, "view:_id1:basicinfo:firstName" might be the client ID of an inputText inside a panel inside a top-level XPage... the deeper the hierarchy of naming containers, the longer the client ID will become.
 
Although Designer enforces uniqueness of the component ID for any given .xsp file (XPage or custom control), the ID technically only needs to be unique to each naming container. So, for example, if you had two separate panels on the same custom control, each panel could contain a separate component with the same ID, because each panel will generate a different client ID for its own descendant components. But because Designer prevents this behavior, you would only see it in action if the components are injected at runtime.
Mar 3, 2011, 5:49 AM
5 Posts
Re: About naming container
thanks for your reply.
 
I did an experiment, here is some code:
 
XPage

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

    <xp:panel id="panel1">
        <xp:inputText id="inputText1"></xp:inputText>
    </xp:panel>
    <xp:br></xp:br>
   
    <xp:repeat id="repeat1" rows="30">
        <xp:this.value><![CDATA[#{javascript:["test"]}]]></xp:this.value>
        <xp:inputText id="inputText2"></xp:inputText>
    </xp:repeat>
    <xp:br></xp:br>
   
    <xp:tabbedPanel id="tabbedPanel1">
        <xp:tabPanel label="Tab1" id="tabPanel1"><xp:inputText id="inputText3"></xp:inputText></xp:tabPanel>
        <xp:tabPanel label="Tab2" id="tabPanel2"></xp:tabPanel>
    </xp:tabbedPanel>
</xp:view>
 
and rendered html
 
<div id="view:_id1:panel1">
  <input type="text" id="view:_id1:inputText1" name="view:_id1:inputText1" class=
  "xspInputFieldEditBox">
</div><br>

<div id="view:_id1:repeat1">
  <input type="text" id="view:_id1:repeat1:0:inputText2" name=
  "view:_id1:repeat1:0:inputText2" class="xspInputFieldEditBox">
</div><br>

<div class="xspTabbedPanelOuter">
<!-- remove some html code -->
  <div class="xspTabTabbedPanel">
    <input type="text" id="view:_id1:tabPanel1:inputText3" name=
    "view:_id1:tabPanel1:inputText3" class="xspInputFieldEditBox">
  </div>
</div>
 
Does this mean that repeat and tabbedPanel is naming container, but panel is not?
And where can I find a list of all the naming containers?
 
Thanks!

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal