how to render a datatable based on the list size in jsf using java EL?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Three ways:
Add an extra getter.
with
Use JSTL
fn:length()function. Install JSTL if not done yet (just drop jstl-1.2.jar in/WEB-INF/lib) and declarefntaglib in top of JSP as follows:and use it as follows:
Use JBoss EL (“enhanced EL”) as JSF EL implementation instead. It’s backwards compatible with standard JSF EL implementation. Drop jboss-el.jar in
/WEB-INF/liband declare the following inweb.xml, assuming you’re using Mojarra JSF implementation:This way you can access non-getter methods directly: