You've got at least two options.

<component id="shell" type="Shell">
   <binding name="delegate" expression="shellDelegate"/>
</component>

public IRender getShellDelegate()
{
  return new BIg5Renderer();
}

or

<bean id="shellDelegate" class="mypackage.Big5Renderer"/>

<component id="shell" type="Shell">
   <binding name="delegate" expression="beans.shellDelegate"/>
</component>

or

<component id="shell" type="Shell">
   <binding name="delegate" expression="new mypackage.Big5Renderer"/>
</component>


I would generally use the middle one, since you can control the lifecyle of
the bean and it doesn't require Java code.


----- Original Message -----
From: "smallufo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 3:27 AM
Subject: Re: [Tapestry-developer] Chinese Big5 encoding problem


> Can somebody tell me how to assign a "delegate" class ?
> I implemented one "IRender" class , Big5Renderer.java,
> but don't know how to assign it to Shell component ...
>
>  <component id="shell" type="Shell">
>   <binding name="delegate" expression="@mypackage.Big5Renderer"/>
>  </component>
>
>  <component id="shell" type="Shell">
>   <binding name="delegate" expression="mypackage.Big5Renderer"/>
>  </component>
>
> The two above don't work......
>
> I am using Tapestry 2.2b2
>
>
> > Hi,
> >
> > I am also a Tapestry developer in Taiwan (but I am
> > now in the States, pursuing the MS degree of CS).
> > And we've developed a complexed system with Tapestry
> > pretty successfully.
> >
> > Your problem can be solved with the Shell component.
> > With appropriate delegate (which is an IRender), you
> > may add the META tags you like.
> >
> > Good luck.
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to