會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

JForum中文社群 JForum Chinese Users Community » lpi.userId是什么

發表人: g7235723, 十級學員
2008-10-08 13:44:45
请问在论坛列表里forum_list.htm
lpi.userId
${lpi.username}是在哪里定义的?

發表人: andowson, 七段學員
2008-10-08 22:32:10
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




會員註冊 / 登入  |  電腦版  |  Jump to top of page