Mar 1, 2016, 3:02 AM
67 Posts

xp:checkBox Data Binding in Repeat Control

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 2


cause of bad rendering of xp:checkboxgroup (in tables...) my plan is to render normal checkboxes within a Repeat Control. Every checkbox should bind to an own item (in Postsave i will put them together in one item).


first loop:

<xp:checkBox value="#{docVG.Feat1}" .....></xp:checkBox>

second loop:

<xp:checkBox value="#{docVG.Feat2}" .....></xp:checkBox>

... and so on


The document 'docVG' is defined as data source and available at that place.

I don't know how to achieve data binding via EL within repeat control. Who has the answer ?




Mar 1, 2016, 3:18 PM
67 Posts
a try to solve it, but ...

i've tried to build EL expression out of strings within the repeat control.


         return '#{docVG.Feat' + lnr + '}';



The rendered checkboxes are 'Readonly' and not clickable :-(( 

It is not clear how to achieve the individual data binding for each checkbox.

The complete Control looks like this:


<xp:repeat id="repeat1" rows="10" value="#{viewFPbx1}" repeatControls="false" var="col" indexVar="lnr" disableOutputTag="true">
    <xp:checkBox uncheckedValue="">
             return '#{docVG.Feat' + lnr + '}';


May 13, 2016, 12:14 PM
94 Posts
check your data definition for the checkboxes

Make sure they are set to Compute on Page Load, not Compute Dynamically.  Also the Repeat control must be checked to Create Controls at Page Creation.