You can do something like this:

public class Crud {
    ... // all your code

    @Inject
    private ComponentResources resources;

    @Inject
    private Block yourBeanEditorBlock;

    /**
     * A Block from the page to render instead of the normal BeanEditor.
     */
    @Parameter(defaultPrefix = BindingConstants.LITERAL)
    private Block *overrideEditorBlock*;

    private Block *getChosenEditor* () {
        if (resources.isBound("*overrideEditorBlock*")) {
            return *overrideEditorBlock*;
        } else {
        return yourBeanEditorBlock;
    }
    }
}

in Crud.tml:
<t:delegate to="prop:*chosenEditor*"/>

and in your page:
<t:crud object="mybean" ... >
    <t:parameter name="*overrideEditorBlock*">
        // your components here
    </t:parameter>
</t:crud>

I didn't tested this specific code, but I have a component like this and it
works.

Cheers,
Giulio

Reply via email to