Smart list automatically logs results to source

This is in a JSP file, using the JSTL tag <c:forEach to iterate through the component results:<script>    <c:forEach items="${component.results}" var="content">        var Data = {            text1: "${content.text1}",            text2: "${content.text2}",            text3: "${content.text3}"        };

 

This is just done so I can access the different types (text1, text2, text3) of the component results later. 

For some reason the page source is printing out 

var Data = {
  text1: "[Whatever text 1 is]",
  text2: "[Whatever text 2 is]",
  text3: "[Whatever text 3 is]"
  }; 

for each of the results, which makes my source page 20,000+ lines long. Anyway to prevent this? Or does anyone know if this is even a WEM issue and not a Javascript/JSP issue?

Any input would be appreciated. 

Comments

  • Jay,

     

    This looks like code issue to me. Nothing to do with WEM API here.

     

    Given I do  not know enough about your requirements cannot propose what should be done.

     

    Best Regards

     

    Qutub

     

    From: eLink Entry: Discussion Group - Web Experience Management <v7webcontentmanagement@elinkkc.opentext.com>
    Sent: Monday, March 18, 2019 3:41 PM
    To: eLink Recipient <devnull@elinkkc.opentext.com>
    Subject: Smart list automatically logs results to source

     

    Smart list automatically logs results to source

     

    Posted byjay.uppaluri@wellsfargo.com (Uppaluri, Jay) On 03/18/2019 03:37 PM

     

     

     
    This is in a JSP file, using the JSTL tag <c:forEach to iterate through the component results:
    <script>
        <c:forEach items="${component.results}" var="content">
            var Data = {
                text1: "${content.text1}",
                text2: "${content.text2}",
                text3: "${content.text3}"
            };

     

    This is just done so I can access the different types (text1, text2, text3) of the component results later. 

    For some reason the page source is printing out 

    var Data = {

     

    text1: "[Whatever text 1 is]",

     

    text2: "[Whatever text 2 is]",

     

    text3: "[Whatever text 3 is]"

     

    }; 

    for each of the results, which makes my source page 20,000+ lines long. Anyway to prevent this? Or does anyone know if this is even a WEM issue and not a Javascript/JSP issue?

    Any input would be appreciated. 


    [To post a comment, use the normal reply function]

    Forum:

    Discussion Group - Web Experience Management

    Content Server:

    My Support