• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Extend JForum best practice & get data from rmi server or webservice

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there!

I consider to use JForum for a website.
Therefore I would need to implement some additional features:
I'd like to get additional (user) information from a jsf web application (maybe running on the same tomcat server) and display this information in user details (next to a post) and other places.
The information can be reached either by an local RMI-Server or a web service.

Now the question:
What would be the best practice for extending/editing JForum?
Would you recommend to edit the source code and build a personal version of JForum?
I doubt that a little bit as editing a cvs conected source file may lead to conflicts when updating.

I appreciate any suggestions/commends
Thanks in advance
Timon
[originally posted on jforum.net by timon]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, for this situation the best (only?) solution is to edit the source code. The method that displays messages is net/jforum/view/forum/PostAction.java, method "list"

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow! That's a quick response!
Thanks, i'll give that a try about next week and let you know how things are going
[originally posted on jforum.net by timon]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there again!

I just managed to merge some additional information into the net.jforum.entities.User class.
Maybe someone is interested too so here's my way to do this:


  • added some ints to net.jforum.entities.User class ( plus setter- & getter-methods), e.g. User.getUploadedDevices()

  • added corrensponding output in templates/default/post_show_user_inc (displayed left to each post), e.g. uploaded devices: ${user.getUploadedDevices()}

  • added a fetching code block into net.jforum.view.forum.PostAction.java's list() method (local rmi server in my case)

  • iterate over local variable 'topicPosters'

  • if user was found set the additional infos, e.g. user.setUploadedDevices()


  • If this should not be the best way to do this, please let me know as i'm going to add some other things to

    [originally posted on jforum.net by timon]
     
    Migrated From Jforum.net
    Ranch Hand
    Posts: 17424
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    IMHO, the "Recommended" way of adding new fields to any jForum entity object is to:

    1) Modify the POJO entity to include the new fields with setter/getters (like you did)

    2) Modify the associated DAO object (e.g. the GenericUserDAO) to populate these fields from your external source and the jforum tables.

    Note: In the current non-Hibernate form, this is database specific. But it means that the entity object (e.g. user) will always have this information regardless of where you need it.

    3) Create a new DataAccessDriver that extends your DB type's driver and uses your new DOA class.

    4) Modify the templates and any form handlers as needed for the new property. E.g., if you want users to change this via a profile page.
    [originally posted on jforum.net by monroe]
     
    I wasn't selected to go to mars. This tiny ad got in ahead of me:
    Gift giving made easy with the permaculture playing cards
    https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    reply
      Bookmark Topic Watch Topic
    • New Topic