Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Cómo reutilizar objetos de JS y reutilizarlos en foreach taglib

1.Actualmente, tengo 2 piezas de código. Necesito pasar el objeto filterFactory a continuación para foreach elementos en JSP. Soy muy nuevo en esto, ya que es la primera vez que abordé JSP:

2. ¿Es posible en el taglib que pueda llamar al objeto, ejemplo: 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'}

Al siguiente código:

 $("#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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!