F**e 发帖数: 593 | 1 有没有办法把variable传给expression?
比如说一个简单的例子:
.. show something about this file1
问题是我有10个这样的variable, file1, file2, ..., file10. 我可以用个forEach
loop
.. show something about this file1
怎样才能把这个loop里的i传给这个file${i} 呢?上面这样不行啊。 | l****3 发帖数: 8 | 2 I think the easist way is to creat a colletion, either array or list,for
example, filelist to store your all variables, file1...file10, and then use
.....
make sure to save filelist as attribute to any of EL implicit object so EL can access it.
【在 F**e 的大作中提到】 : 有没有办法把variable传给expression? : 比如说一个简单的例子: : : .. show something about this file1 : : 问题是我有10个这样的variable, file1, file2, ..., file10. 我可以用个forEach : loop : : : .. show something about this file1
| F**e 发帖数: 593 | 3 great idea. worked. Thank you so much. 5 baozi sent.
use
can access it.
【在 l****3 的大作中提到】 : I think the easist way is to creat a colletion, either array or list,for : example, filelist to store your all variables, file1...file10, and then use : : : ..... : make sure to save filelist as attribute to any of EL implicit object so EL can access it.
|
|