Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-tapestry Wiki" 
for change notification.

The following page has been changed by SvenHomburg:
http://wiki.apache.org/jakarta-tapestry/ApplicationBorderComponent

New page:
== 1. insert into your application hivemodule.xml ==

{{{
    <implementation service-id="tapestry.page.ComponentSpecificationResolver">

        <invoke-factory model="threaded">
            <construct 
class="de.hsofttec.core4.resolver.Core4ComponentSpecificationResolverImpl">
                <set-object property="specificationSource" 
value="infrastructure:specificationSource"/>
                <set-service property="delegate" 
service-id="tapestry.page.SpecificationResolverDelegate"/>
                <set-object property="applicationId" 
value="infrastructure:applicationId"/>
                <set-object property="contextRoot" 
value="infrastructure:contextRoot"/>
                <set-object property="classFinder" 
value="infrastructure:classFinder"/>
            </construct>
        </invoke-factory>

    </implementation>
}}}

== 2. overwrite tapestry's ComponentSpecificationResolverImpl ==

{{{
public class Core4ComponentSpecificationResolverImpl extends 
ComponentSpecificationResolverImpl
{
    public void resolve(IRequestCycle cycle, INamespace containerNamespace, 
String libraryId, String type, Location location)
    {
        // we detect the Border component and are sure, we dont call from the 
application namesspace
        if (type.equals("Border") && 
!containerNamespace.isApplicationNamespace())
        {
            INamespace namespace = containerNamespace;
            while (!namespace.isApplicationNamespace() && namespace != null)
                namespace = namespace.getParentNamespace();

            if (namespace != null)
                containerNamespace = namespace;
        }

        super.resolve(cycle, containerNamespace, libraryId, type, location);
    }
}
}}}

== 3. make more flexible ==
insert into your application config a meta key like "appl.border" in fill the 
value with the name of your border component.
then retrieve the value of this meta key in the 
Core4ComponentSpecificationResolverImpl.

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

Reply via email to