I've tried it with a ComponentWrapper (or loader) too, but don't got it to work this way.
Now i use a simple BeanEditForm with an own simple BeanModel.
I pass a property with my custom datatype into the beanmodel and it does the rest.

Define and register your custom components with their corresponding datatypes as described here:
http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock
and try it with the propertyEditor or a beanEditor.





Am 16.09.2009 um 21:46 schrieb Dave Greggory:

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



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to