jsf - JSTL c:foreach not iterating through the collection object -


i using ui.repeat iterate on collection , create primefaces datatables.however, @ time not able set dynamic ids datatables.so after doing research thought of changing c:foreach , try.however,now datatables not getting generated because believe @ build time when c:forach runs,the collection empty. using jstl 1.2. tried following after populating list.

    httpservletrequest origrequest=(httpservletrequest)facescontext.getcurrentinstance        ().getexternalcontext().getrequest();     origrequest.setattribute("datalist",datalist); 

then in xhtml tried this: items="${datalist}" nothing seems working.please help.

edit: funcational requirement

i generate multiple data tables @ runtime using ui:repeat/p:datalist/c:foreach etc. backend want have access each of these datatables because want write them in pdf file using primefaes dataexporter.for purpose wanted assign dynamic ids datatables.but not able make work.

from comments:

after changing jstl namespace xmlns:c="http://java.sun.com/jstl/core"; going inside loop

this suggests you're actually using jstl 1.0, not jstl 1.1/1.2, in contrary said in question. in other words, runtime classpath mess. common starter's mistake in case have arbitrary downloaded standard.jar file becasue didn't work in jstl , saw mentioned somewhere in outdated or poor resource (i sincerely hope have among others roseindia.net in lifetime internet blacklist, right?). should not have file when using jstl 1.2.

carefully read versions overview , installation instructions in our jstl wiki page right download links , right approach.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -