How to change the component id on the data table ?? Repeat works!! Data Table does not change the id?
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:repeat id="rAnal" rows="30" style="width:auto" indexVar="rIndx" repeatControls="true" first="0" value="#{java script:return 5;}">
<xp:inputText id="iAnal_${rIndx}"></xp:inputText>
<xp:br></xp:br>
</xp:repeat>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:dataTable id="dataTable1" rows="30" indexVar="tIndx" first="0" value="#{java script:return 5;}">
<xp:column id="column1">
<xp:inputText id="input_${tIndx}"></xp:inputText></xp:column>
</xp:dataTable></xp:view>
You can't do that with the dataTable component.
You have to declare id
attribute for component before everything else. Also, it cannot be modified in the runtime. Repeat has repeatControls="true"
attribute which creates controls inside the repeat iterator once and reuse them for all subsequent updates. Therefore it can provide value bindings for id
attribute. However, dataTable component has no such an ability.