Hi all,

and here is another short question:
As I didn't get to know how to "mix" a BaseComponent derived
component with a AbstractComponent derived one (using a
component html template _and_ output some html code with
IMarkupWriter) I decided to switch to AbstractComponent completely.

I was able to change the former ognl code "page.admin" in the component
template (which checks if a admin user is logged in and displays the
component only in this single case) by calling cycle.getPage() and
casting to my custom page object (which is not portable to other
apps - if you have an idea how to fix this please let me know).

But what I wasn't able to achieve is to do a wrapping of the component
with another one in Java. My AdminPanel component included a "ShowPanel"
component to have a box printed around it.

AdminPanel:
<body jwcid="$content$">
        <span jwcid="@If" condition="ognl:page.admin">
                <span id="adminpanel">
                        <span jwcid="@ShowPanel" width="250" color="red">
                        ...
                        </span>
                </span>
        </span>
</body>

Within AdminPanel I can output all the html markup I want but how
can I achieve to wrap all this output with a ShowPanel instance?
I tried to do

IComponent panel = getComponent("panel");
panel.addBody(this);

... markup from AdminPanel

panel.render(writer, cycle);

but this doesn't work :(

If you can't understand what I mean please reply and I will try
to explain better ;)

Thanks for your help,
  Andreas

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

Reply via email to