Weird data-sly-repeat behavior | Community
Skip to main content
Level 4
Nov 23, 2018 4:12 PM UTC
Solved

Weird data-sly-repeat behavior

Hi guys,

I'm dealing with this weird data-sly behavior and I can't find an explanation for it.

Have you ever encountered it?

So I've got this data sly-repeat:

<div data-sly-repeat.result=${model.result}">

          <form class="randomclass">

               <input id="1" type="text"/>

          </form>

</div>

Expected: I should get 2 form rendered in my html page. but I get this:

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
demd43642519Accepted solution
Level 4
Dec 9, 2018 11:14 AM UTC

I found the issue that caused the problem.

Apparently my data-sly-repeat was inside another form which was not closed where it should be and looks like that caused the problem.
Now it's all fine, thank you !

4 replies

demd43642519AuthorAccepted solution
Level 4
Dec 9, 2018 11:14 AM UTC

I found the issue that caused the problem.

Apparently my data-sly-repeat was inside another form which was not closed where it should be and looks like that caused the problem.
Now it's all fine, thank you !

Translate
Feike_Visser1
Employee
Nov 24, 2018 12:15 PM UTC

you are missing a " here: <div data-sly-repeat.result=${model.result}">

Translate
arunpatidar
New Participant
Nov 23, 2018 6:37 PM UTC

Can you share your Java code as well, I can see there are 3 forms but 4 input tags. There is something wrong with HTL code and Java code as well.

Just for a test can you try with data-sly-list as well e.g.

<sly data-sly-list.myList=${model.result}">

  <div>

          <form class="randomclass">

              <input id="1" type="text"/>

          </form>

  </div>

</sly>

Translate
Arun Patidar
smacdonald2008
Level 10
Nov 23, 2018 4:31 PM UTC

Looks like the model is not setup correctly. See this article as an example of how to work with a repeating data set -- Adobe Experience Manager Help | Creating a HTL Repeating Data Set 6.3 Component that uses Sling Models

Translate