Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

247
Vistas
How to reuse object from JS and reuse back in the foreach taglib

1.Currently, i have 2 pieces of code. I need to pass filterFactory object below to foreach items in JSP. Im very new on this as this is my first time tackle JSP:

2.Is it possible in the taglib i can call the object, example: filterFactory.lineName

const lookupFilterLine = ${lookupFilterLine};
const filterFactory = lookupFilterLine.filter(function (x) {
                          return x.factoryName === factory;
                          });

output from filterFactory:
   {factoryName: 'TEST', type: 'line', lineName: 'This is line B'},
   {factoryName: 'TEST', type: 'line', lineName: 'This is line C'},
   {factoryName: 'TEST', type: 'line', lineName: 'This is line A'}

To below code:

$("#lineId").html('<c:forEach items="filterFactory" var="filterFactory">'
                    '<c:if test="${fn:contains(filterFactory, factory)}">'
                      +'<option value="${filterFactory}" label="${filterFactory}" />'
                     </c:if>'
                  +'</c:forEach>');
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda