Revision history [back]

click to hide/show revision 1
initial version

answered 2017-03-22 04:00:29 +0800

cor3000 gravatar image cor3000

the EL syntax is quite particular when it comes to lists ... also 'empty' is an operator not expected as a property name. Simply use @load(empty vm.items)

http://docs.oracle.com/javaee/6/tutorial/doc/bnahu.html

If you are accessing an item in an array or list, you must use either a literal value that can be converted to int or the [] notation with an int and without quotes

Since ListModelList implements the List interface you can't access other properties directly. Unfortunately that's a limitation of EL expressions in general.

Robert

the EL syntax is quite particular when it comes to lists ... also 'empty' is an operator not expected as a property name. Simply use @load(empty vm.items)

Quote from: http://docs.oracle.com/javaee/6/tutorial/doc/bnahu.html

If you are accessing an item in an array or list, you must use either a literal value that can be converted to int or the [] notation with an int and without quotes

Since ListModelList implements the List interface you can't access other properties directly. Unfortunately that's a limitation of EL expressions in general.

Robert

the EL syntax is quite particular when it comes to lists ... also 'empty' is an operator not expected as a property name. name.

Simply use @load(empty vm.items)

Quote from: http://docs.oracle.com/javaee/6/tutorial/doc/bnahu.html

If you are accessing an item in an array or list, you must use either a literal value that can be converted to int or the [] notation with an int and without quotes

Since In fact ListModelList implements the List interface so you can't access other properties directly. Unfortunately that's a limitation of EL expressions in general.

If your model implementation doesn't implement the List interface such as ListModelSet you can access the isEmpty method using: @load(myset['empty'])- still @load(empty myset) looks more consistent.

Robert

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More