• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Re-using views

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to be able to re-use views?

For example - if I wanted to be able to show the list of currently logged on users on every page, I would like to be able to do this in a re-usable way.

However, if I were to put the list of currently logged on users into a jsp separate from the current list.jsp, I couldn't then simply use <c:import> to display that list on other pages as the variables would not have been initialised in the property bag.

I would like to be able to do this without having to amend all of the actions that create the other pages to set this data up etc.

Is there any way to achieve this or does anyone have any thoughts about how it could be done?


[originally posted on jforum.net by StuBramley]
 
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
You can make an extension. Take a look at net/jforum/actions/extensions/TopicWatchExtension.java, and look for methods with the @Extends annotation

In JForum3, extensions are methods that are executed after a specific action.

However, at the current stage, you can't simply say "execute this method after all methods of all actions", you would need to an an extension to each method you need.

Ideas?

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
The only thing I can think of so far is to make the 'view' just generate XML and then have a jsp that contains the necessary AJAX code to load the view and render it...
[originally posted on jforum.net by StuBramley]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic