结合struts的iterate tag+JSTL1.1实现多列列表的显示。下面一段示例代码中显示的是2列,如果想显示多列,则直接把2改成自己想显示的列数即可。
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
1 <nested:iterate property="items" indexId="index">
2 <c:if test="${index%2==0}">
3 <tr>
4 </c:if>
5 <td>
6 ${index}
7 </td>
8 <c:if test="${(index+1)%2==0}">
9 </tr>
10 </c:if>
11
12 </nested:iterate>
http://getfirebug.com/#install
http://www.1cn.biz/index.php?q=node/394
http://forum.springside.org.cn/viewthread.php?tid=360&highlight=session%2B%2Bload
http://www.cnblogs.com/sunsonbaby/archive/2004/11/29/70718.html
http://tech.ccidnet.com/art/294/20021128/32098_1.html
http://java.ccidnet.com/art/297/20061129/962923_1.html
3.4.2 Version Attributes
The Version field or property is used by the persistence provider to perform optimistic locking. It is
accessed and/or set by the persistence provider in the course of performing lifecycle operations on the
entity instance. An entity is automatically enabled for optimistic locking if it has a property or field
mapped with a Version mapping.
An entity may access the state of its version field or property or export a method for use by the application
to access the version, but must not modify the version value[17]. Only the persistence provider is
permitted to set or update the value of the version attribute in the object.
The version attribute is updated by the persistence provider runtime when the object is written to the
database. All non-relationship fields and properties and all relationships owned by the entity are
included in version checks.
The persistence provider's implementation of the merge operation must examine the version attribute
when an entity is being merged and throw an OptimisticLockException if it is discovered that
the object being merged is a stale copy of the entity—i.e. that the entity has been updated since the
entity became detached. Depending on the implementation strategy used, it is possible that this exception
may not be thrown until flush is called or commit time, whichever happens first.
The persistence provider runtime is only required to use the version attribute when performing optimistic
lock checking. Persistence provider implementations may provide additional mechanisms beside
version attributes to enable optimistic lock checking. However, support for such mechanisms is not
required of an implementation of this specification.[18]
If only some entities contain version attributes, the persistence provider runtime is required to check
those entities for which version attributes have been specified. The consistency of the object graph is not
guaranteed, but the absence of version attributes on some of the entities will not stop operations from
completing.