jspプロジェクトで表示タグを設定するにはどうすればよいですか?
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/lang/UnhandledException
jspプロジェクトで表示タグを設定するにはどうすればよいですか?
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/lang/UnhandledException
表示タグの場合、web.xmlでの構成は必要ありません
表示タグは、グリッドデータのページネーションの並べ替えに使用されます
(1)displaytag-1.2、(2)displaytag-export-poi-1.2、(3)displaytag-portlet-1.2の3つのjarのみが配置されます
次のようにjspページにタグlibを書き込みます。
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
グリッド化のためのコード:
<display:table name="sessionScope.yourListname" pagesize="5" sort="list" cellspacing="10" cellpadding="5">
<display:column property="var1" title="Title1" sortable="true" />
<display:column property="var2" title="Title2" sortable="true" />
<display:column property="var3" title="Title3" sortable="true" />
</display:table>
詳細については、リンクをたどってください
http://viralpatel.net/blogs/struts-displaytag-tutorial-sort-pagination-data-displaytag-struts/
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<display:table uid="ratingAdjustmentHistoryUID" name="${ratingAdjustmentHistoryForm.ratingAdjustmentHistoryQOList}"
requestURI="/ratingAdjustmentHistoryPre.do?method=searchRatingTracker" excludedParams="method"
decorator="com.ford.mpl.superg.decorator.RatingAdjustmentHistoryTableDecorator" keepStatus="true" style="width:100%">
<%@include file="/jsp/include/displaytag.jsp"%>
<display:column property="shipSite" title="RAHSiteCode" sortable="true" />
<display:column property="ratingMonth" title="RAHRatingMonth" sortable="true" />
<display:column property="prior" title="RAHPrior" sortable="true" />
<display:column property="revised" title="RAHRevised" sortable="true" />
<display:column property="adjustments" title="RAHAdjustments" sortable="true" />
<display:column property="comments" title="RAHComments" sortable="true" />
<display:column property="lastUpdated" title="RAHLastUpdated" sortable="true" />
<display:column property="lastUpdatedCDSID" title="RAHLastUpdatedCDSID" sortable="true" />
</display:table>
RatingAdjustmentHistoryTableDecorator
-デコレータに使用されます
displaytag.jarファイルを場所*YourApplicationName*/Webcontent/WEB-INF/lib/
displaytag-1.2.jar`に貼り付けます
display:column
列を表示するために
property
使用されますJavaファイルで定義されたBean名
title
を使用してテーブルのヘッダーを表示するために
sortable
使用されます個々の列を並べ替えるために使用されるか
name
、フォーム名を使用してリストを取得するために使用さ
uid
れますテーブルをオブジェクトとして保存するに
keepStatus
は、セッションが期限切れになるまでテーブルのステータスを維持するために使用されます
それでも問題が発生する場合は、お知らせください。ありがとう。