Instead of using BeanBlockSource (as used by PropertyEditor), would I be able 
to use ComponentSource instead (passing in complete id to it)? I need the 
actual Component instead of the Block containing it. Since ComponentSource uses 
the RequestPageCache, I assume I will not end up creating a large number of 
ComponentPageElements with it. Is that an accurate?



----- Original Message ----
From: Dave Greggory <davegregg...@yahoo.com>
To: Tapestry users <users@tapestry.apache.org>
Sent: Monday, September 14, 2009 6:44:27 PM
Subject: Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce  
after forced GC)

I created a ComponentLoader component (below) based off of PropertyEditor 
component and I got it working for the top most of layer of my 
ubercomponent-stack. It uses PropertyEditBlock page and the existing 
BeanBlockSource to provide the right Block containing my layouts / components. 
Does it look right to you?

Also, if I understand this correctly, the page that uses this ComponentLoader 
will not load all the other components mentioned in the PropertyEditBlocks 
page, just the ones refered to using the calling page, right?

public class ComponentLoader
{
  @Parameter(required = true)
  private String componentType;

  @Inject
  private BeanBlockSource beanBlockSource;

  @BeginRender
  Block selectComponent()
  {
    return beanBlockSource.getEditBlock(componentType);
  }

  @BeforeRenderBody
  boolean noBodyForComponentLoader()
  {
    return false;
  }
}


      


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to