Results 1 to 2 of 2

Thread: Possible to inject objects in Tiles?

  1. #1
    Join Date
    Dec 2004
    Posts
    9

    Default 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. #2

    Default

    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.

Similar Threads

  1. Replies: 1
    Last Post: Jun 24th, 2007, 10:58 AM
  2. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  3. Replies: 12
    Last Post: Jun 21st, 2005, 01:28 PM
  4. Replies: 2
    Last Post: Jun 16th, 2005, 04:15 PM
  5. Should Business Objects have References to DAOs?
    By sethladd in forum Architecture
    Replies: 9
    Last Post: Aug 25th, 2004, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •