The  "View newest Post" Button shows the newest Post in the forum, not in the topic.
I think i have found the solution for this problem:

Index: PostEJB.java
  | ===================================================================
  | RCS file: 
/cvsroot/jboss/nukes/bb/src/main/org/jboss/nukes/addons/modules/bb/ejb/PostEJB.java,v
  | retrieving revision 1.10
  | diff -u -r1.10 PostEJB.java
  | --- PostEJB.java    25 Jan 2004 20:33:05 -0000      1.10
  | +++ PostEJB.java    17 May 2004 10:53:29 -0000
  | @@ -62,6 +62,10 @@
  |   * @ejb.finder
  |   *    signature="org.jboss.nukes.addons.modules.bb.ejb.PostEJBLocal 
findLatestPost(java.util.Date threshold)"
  |   *    query="SELECT OBJECT(p) FROM post AS p"
  | + * 
  | + * @ejb.finder
  | + *    signature="org.jboss.nukes.addons.modules.bb.ejb.PostEJBLocal 
findLatestPost(java.util.Date threshold, 
org.jboss.nukes.addons.modules.bb.ejb.TopicEJBLocal topic)"
  | + *    query="SELECT OBJECT(p) FROM post AS p"
  |   *
  |   * @ejb.finder
  |   *    signature="java.util.Collection findRange(int offset, int limit)"
  | @@ -102,6 +106,10 @@
  |   * @jboss.query
  |   *    signature="org.jboss.nukes.addons.modules.bb.ejb.PostEJBLocal 
findLatestPost(java.util.Date threshold)"
  |   *    query="SELECT OBJECT(p) FROM post AS p WHERE p.postDate>=?1 ORDER BY 
p.postDate LIMIT 1"
  | + * 
  | + * @jboss.query
  | + *    signature="org.jboss.nukes.addons.modules.bb.ejb.PostEJBLocal 
findLatestPost(java.util.Date threshold, 
org.jboss.nukes.addons.modules.bb.ejb.TopicEJBLocal topic)"
  | + *    query="SELECT OBJECT(p) FROM post AS p WHERE p.postDate>=?1 AND p.topic=?2 
ORDER BY p.postDate LIMIT 1"
  |   *
  |   * @jboss.query
  |   *    signature="java.util.Collection findRange(int offset, int limit)"
  | 

Index: BBModule.java
  | ===================================================================
  | RCS file: 
/cvsroot/jboss/nukes/bb/src/main/org/jboss/nukes/addons/modules/bb/BBModule.java,v
  | retrieving revision 1.64
  | diff -u -r1.64 BBModule.java
  | --- BBModule.java   15 May 2004 23:40:17 -0000      1.64
  | +++ BBModule.java   17 May 2004 10:52:17 -0000
  | @@ -2195,7 +2195,8 @@
  |                       Date lastVisit = user.getPreviousLastVisitDate();
  |                       try
  |                       {
  | -                        PostEJBLocal post = 
homesRO.post.findLatestPost(lastVisit);
  | +                        topic=homesRO.topic.findByPrimaryKey(topicId); 
  | +                        PostEJBLocal post = 
homesRO.post.findLatestPost(lastVisit, topic);
  |                          page.sendRedirect("index.html?module=bb&op=viewtopic&p=" 
+ post.getId() + "#" + post.getId());
  |                          return;
  |                       }
  | 




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835170#3835170

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835170


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to