Announcement Announcement Module
Collapse
No announcement yet.
Possible to inject objects in Tiles? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Possible to inject objects in Tiles?

    Is it possible to inject objects in struts tiles?

    I have this working for Actions, but I can't find a way to do this for tiles. Currently I can only get objects (from the registry) in a tile is via the ApplicationContext.

    ex.
    Code:
    ApplicationContext ctx = getApplicationContext();
    SessionFactory sf = (SessionFactory) ctx.getBean("sessionFactory");
    Any ideas?

    Thanks

  • #2
    Have you tried mapping a Tile to a Controller? You can inject the controller with what you need, and then return the object as part of the "model" (ModelAndView) to the Tile.

    Comment

    Working...
    X