boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - java EL 问题请教
相关主题
求教:Facade Pattern vs Static Variable
这个怎么不对?
JavaBean variable name standard
how to solve the problem: the members change by each other .
问一个java的面试题 (转载)
Re: Put classes into different files
error of unix redirecting command called by java
超级菜鸟问题:什末时候load class
[合集] java 得 inner class 有没有 static 有什么区别啊?
问个可能比较奇怪的弱问题
相关话题的讨论汇总
话题: file1话题: foreach话题: el话题: empty话题: filelist
进入Java版参与讨论
1 (共1页)
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.

1 (共1页)
进入Java版参与讨论
相关主题
问个可能比较奇怪的弱问题
interview question:
synchronized method does lock the object that passed into the method as a parameter?
Javascript speed up
想说动同事用java而不是c++做新项目,大家能否列举一下优点?
modify parameter, or return?
Why java.lang.Iterable depends on java.util.Iterator
JSF 链接中的变量
Quick jdbc question, help needed, thx!
一个怪异的java 运行问题
相关话题的讨论汇总
话题: file1话题: foreach话题: el话题: empty话题: filelist