What version of Tapestry are you using? This works in 5.0.11. Do you
have the matching afterRender block to close the div?

        public Block beginRender(MarkupWriter writer) {
                writer.write("Something else");
                String elementName = _resources.getElementName("div");
                writer.element(elementName);
                _resources.renderInformalParameters(writer);
                return _blockParam;
        }
        
        public void afterRender(MarkupWriter writer) {
                writer.end();
        }
Josh

On Tue, Apr 1, 2008 at 4:25 PM, Imants Firsts <[EMAIL PROTECTED]> wrote:
> Is it possible for component to render it's tag from
> parent component with informal parameters and return a
> block to render inside it?
>
> The following code throws an exception while tapestry
> modifies the component class.
>
> Object beginRender(MarkupWriter writer) {
>        writer.element(resources.getElementName("div"));
>        resources.renderInformalParameters(writer);
>
>        return myBlock;
> }
>
> Method which returns void with writer.element() inside
> it works. And returning block without writer.element()
> works. Both of them together do not work. The problem
> seems to be with accessing ComponentResources.
>
> Is it a tapestry bug, or such combination is not
> supported? What are the alternatives?
>
> Thanks in advance,
> Imants Firsts
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to