I found this, which explains the hivemind override pretty well:
http://jakarta.apache.org/hivemind/override.html

I made a BaseTagWriter that just does nothing.  I'm not sure we really need
any base tag at all.

-chris

On 2/2/06, Jason Suplizio <[EMAIL PROTECTED]> wrote:
>
> Yeah, I had the same issue. I resolved it by creating my own version of
> the
> BaseTagWriter and then referencing that in hivemind...see the notes below.
>
> /**
> * Using the Tapestry shell component will construct and write a base
> * tag to the rendered html output. Doing so makes all the links within
> * the page relative to this tag. This ultimately breaks any inline anchor
> * tags. The solution is this class, which essentially does not write the
> * tag at all. Writing the base tag is a configurable Hivemind service,
> * therefore, to configure your Tapestry application you must tell Hivemind
> * to use this class as the base tag rendering service:
> *
> *  <implementation service-id="tapestry.url.BaseTagWriter">
> *      <create-instance class="
> com.expd.app.expo2.tapestry.components.EmptyBaseTagWriter"/>
> *    </implementation>
> *
> * @author
> *
> */
> public class EmptyBaseTagWriter implements IRender {
>
>     /**
>      * This prevents rendering of the any base tag.
>      */
>     public void render(IMarkupWriter writer, IRequestCycle cycle)
>     {
>         IPage page = cycle.getPage();
>         StringBuffer sb = new StringBuffer();
>         sb.append("/");
>         if(page.getNamespace().getId() == null)
>         {
>             String name = page.getPageName();
>             int slashx = name.lastIndexOf('/');
>             if(slashx > 0)
>                 sb.append(name.substring(0, slashx + 1));
>         }
>     }
>
> }
>
> On 2/2/06, Chris Norris <[EMAIL PROTECTED]> wrote:
> >
> > I'd like to use my own implementation of BaseTagWriter that does
> nothing.
> > This is so that relative anchor tag links work like our designers are
> used
> > to in static html pages.  I've tried overriding the Shell class to do
> > everything but write the base tag, and everything works fine (our html
> > templates are all in the servlet root).  But that's hackish and
> ugly.  Is
> > there a hivemind way to do this?  I'm sure there is but it's not jumping
> > out
> > at me.
> >
> > Thanks,
> > Chris
> >
> >
>
>

Reply via email to