I would like to use a!applyComponents to dynamically generate Sail components fo

I would like to use a!applyComponents to dynamically generate Sail components for a section layout. To simplify the problem, I've broken it down to just basic Sail components for testing. As we all know, this works fine:
a!sectionLayout(
firstColumnContents: {
a!textField(
label: "TEST1",
readOnly: true
),
a!textField(
label: "TEST2",
readOnly: true
)
}
)
But I want to have multiple Test1 and Test2 text boxes based off some array inside this section, so I wrap my text components up in a rule, and try this:
a!sectionLayout(
firstColumnContents: {
a!applyComponents(
rule!SubReviewTest(x:_),
{1,2}
)
}
)
Where SubReviewTest is:
{
a!textField(
label: "TEST 1 " & ri!x,
readOnly: true
),
a!textField(
label: "TEST 2 " & ri!x,
readOnly: true
)
}
The interface errors out with: "Unexpected error in ColumnLayout. Its configuration may be invalid." If I use section layout to grou...

OriginalPostID-156944

OriginalPostID-156944

  Discussion posts and replies are publicly visible

Parents
  • In application, I would be using two different types of Sail Components, such as Text, than Radio, I only used two text here for simplicity. So in the end I would like something such as:
    TextField
    RadioField
    ImageField
    Repeated as many times as elements in my array. So for array {1,2,3}:
    TextField
    RadioField
    ImageField
    TextField
    RadioField
    ImageField
    TextField
    RadioField
    ImageField
Reply
  • In application, I would be using two different types of Sail Components, such as Text, than Radio, I only used two text here for simplicity. So in the end I would like something such as:
    TextField
    RadioField
    ImageField
    Repeated as many times as elements in my array. So for array {1,2,3}:
    TextField
    RadioField
    ImageField
    TextField
    RadioField
    ImageField
    TextField
    RadioField
    ImageField
Children
No Data