I've create a custom control that has a Property Definition Group. The Group has checked to "Allow multiple instances". When I drop the control on an xPage I can through the UI manually add 2 items to the property and set the sub-properties of the group(s) but I need to figure out how to programmatically populate the group by looping through an array and doing some calculations.
相关问题
- Unresponsive buttons after certain time
- Xpages “filter by category name” with two fields v
- Logout control not working
- How to stream file from xPages?
- How to avoid the 64k limit when retrieving data fr
相关文章
- call partialRefreshGet from SSJS using view.PostSc
- Bootstrap4XPages plugin: how to catch a change eve
- How to add html stored in a richtext item to an HT
- Remove Dojo from XPages globally
- Complex Xpage takes long for partial refreshs
- Getting Application Layout to work with Bootstrap4
- Parsing JSON from HttpClient request using JSON.or
- How do you work around the issue of long load time
In a custom control for a bootstrap progress bar I have a property group called BarDetail. There are 3 properties : style, width, and order. And multiple instances is turned on.
Below is the XML on how I access the properties. I believe I also talked about this in a video on NotesIn9 151 (http://www.notesin9.com/2014/08/10/notesin9-151-bootstrap-progressbars-in-xpages/)
I tend to define a Custom Control Property named "configuration", and set that to be an "object" (you'll have to type that in vs. select it from the dropdown):
Now, you can pass an object as your property:
When viewed in the XPages Source:
Now, to loop though this, you could easily use an xp:repeat control bound to #{compositeData.configuration.groups}, and then all "child" binding can be done directly to the variable defined for the xp:repeat:
Using this approach, you're not limiting to the size, the scope, nor the content contained within your Custom Control Property.