練功房推薦書單

  • Google!Android 3手機應用程式設計入門(第四版)
  • 賈伯斯傳(軟皮精裝版)
  • 猛虎出閘制霸版:最新OCP Java SE 6 Programmer專業認證(附原始程式碼及範例檔)
  • SCWCD 5 猛虎出閘:Java Web 應用程式專業認證
lpi.userId是什么  XML
Forum Index » JForum中文社群 JForum Chinese Users Community
Author Message
g7235723

十級學員

Joined: 2008-10-07 18:03:25
Messages: 3
Offline

请问在论坛列表里forum_list.htm
lpi.userId
${lpi.username}是在哪里定义的?
andowson

六段學員
[Avatar]

Joined: 2007-01-02 22:20:40
Messages: 652
Location: 台北
Offline

lpi是一個net.jforum.entities.LastPostInfo類別的物件,包含底下幾個符合JavaBean定義的屬性(properties):
postTimeMillis
topicId
postId
userId
topicReplies
username
postDate
hasInfo

JForum使用FreeMarker作為template engine,所以,我們可以透過lpi.userId來呼叫LastPostInfo的getUserId()來取得某個版面最後發表的文章資訊。

您可以參考此篇JForum Eclipse WTP開發環境設定來建立您的JForum開發環境,對於原始碼的追蹤就會變得很容易。

參考資料:
http://freemarker.org/docs/pgui_quickstart_createdatamodel.html

分享經驗 累積智慧
[WWW] [MSN]
 
Forum Index » JForum中文社群 JForum Chinese Users Community
Go to: