You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Zimmek, Jan" <Ja...@jamba.net> on 2005/04/22 15:28:28 UTC

page/component design question

Hi All,

I am currently developing my first Tapestry-Application and got a
design-issue.

Having a border-component containing a login-box at the bottom of the
screen, I thought it would be very elegant to be able to dynamically
toggle this box (login <-> logout). But when I start up my webapp I got
some Tapestry-Messages in stdOut:

22.04.2005 15:03:47 org.apache.tapestry.BaseComponentTemplateLoader
checkAllComponentsReferenced
SCHWERWIEGEND: Template for component Home/border.authPaneLogin does not
reference embedded components: login_username and login_password.
22.04.2005 15:03:47 org.apache.tapestry.BaseComponentTemplateLoader
checkAllComponentsReferenced
SCHWERWIEGEND: Template for component Home/border does not reference
embedded components: authPaneLogout and authPaneLogin.


This occurs because I declare two components in my border-component-spec
which will not be referenced directly in my border-template (it got
referenced through a delegate).

Here is some source-code:

MainBorder.page
---------------
<component-specification class="foo.MainBorder" ...>
    <property-specification name="authPane"
type="org.apache.tapestry.IComponent" persistent="no"/>
    <bean name="delegate"
class="org.apache.tapestry.valid.ValidationDelegate"/>
    <component id="authPaneLogin" type="LoginPane"/>
    <component id="authPaneLogout" type="LogoutPane"/>
</component-specification>

MainBorder.html
---------------
<span jwcid="@Delegator" delegate="ognl:authPane"/>


Is this the way to implement dynamic-content(components) in a
component-template or is there another way to go ?
I simply won't go back like in struts-time and do those dynamic-content
using conditionals directly in the template.


How can I get rid of of the above Tapestry-Messages, because nearly each
of my pages contains a MainBorder-components and for each of my pages an
Tapestry-Message is written.


Any help would be very appreciated.



Jan Zimmek

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: page/component design question

Posted by Kent Tong <ke...@cpttm.org.mo>.
Zimmek, Jan <Jan.Zimmek <at> jamba.net> writes:

> MainBorder.page
> ---------------
> <component-specification class="foo.MainBorder" ...>
>     <property-specification name="authPane"
> type="org.apache.tapestry.IComponent" persistent="no"/>
>     <bean name="delegate"
> class="org.apache.tapestry.valid.ValidationDelegate"/>
>     <component id="authPaneLogin" type="LoginPane"/>
>     <component id="authPaneLogout" type="LogoutPane"/>
> </component-specification>

I wonder how your authPane renders while involving the
authPaneLogin and authPaneLogout components. In particular,
how do they find their html templates?

You may want to make a AuthPane component that contains
an authPaneLogin and an authPaneLogout component. Alternatively,
just keep everything the same but use a Conditional and get
rid of the authPane.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org