Are you referring to properties, or parameters?
In any event, you can have parameters and properties for components
that have a template. Declare the parameter in the .jwc file.
Tapestry will generate properties with the same name as your parameter
(unless you explicitly specify a different name).
So, in your code, if you need to get the value passed in as the
parameter, you can either do getProperty("foo") or else you can make
your class abstract and add a public abstract Foo getFoo(). Setting can
either be done with setProperty("foo",value); or public abstract void
setFoo(Foo f);

Robert

Edward Scanzano wrote:
> Unable to enhance class
> com.intaglio.webclient.site.CFolderList because it
> implements a non-abstract read method for property
> 'currentMessage'.
> 
> If I am passing parameters don't I need an
> AbstractComponent subclass.
> 
> Ed
> 
> --- Edward Scanzano <[EMAIL PROTECTED]> wrote:
> 
> 
>>Can I still pass parameters. The way I am reading
>>the
>>documentation it says that Tapestry requires an
>>AbstractComponent implementation to handle
>>parameters.
>>
>>Am I reading this wrong.
>>
>>E
>>
>>--- Erik Hatcher <[EMAIL PROTECTED]> wrote:
>>
>>
>>>On Jun 10, 2005, at 3:45 PM, Edward Scanzano
>>
>>wrote:
>>
>>>>Hi all,
>>>>
>>>>I have a custom component with a complex .html
>>>
>>>file
>>>
>>>>and it accepts a parameter. I am not sure what I
>>>
>>>am
>>>
>>>>supposed to do in the renderComponent method. It
>>>
>>>is
>>>
>>>>empty right now and naturally nothing is getting
>>>>rendered. I noticed in the Tapestry In Action
>>
>>book
>>
>>>>that Howard is rendering the output with the
>>>
>>>writer
>>>
>>>>object. I cannot do that since I have a template
>>>>already. What do I do?
>>>>
>>>>What am I supposed to do in this method if I
>>
>>have
>>
>>>a
>>>
>>>>template?
>>>
>>>If you have a template and simply want to render
>>
>>it,
>>
>>>then subclass  
>>>from BaseComponent and do _not_ override
>>>renderComponent.  If you  
>>>need to do rendering yourself, subclass from
>>>AbstractComponent  
>>>instead and implement the abstract method needed
>>
>>for
>>
>>>rendering.
>>>
>>>I've never seen a case where you needed to have
>>
>>both
>>
>>>a template and  
>>>do rendering in code manually.
>>>
>>>     Erik
>>>
>>>
>>>
>>
> ---------------------------------------------------------------------
> 
>>>To unsubscribe, e-mail:
>>>[EMAIL PROTECTED]
>>>For additional commands, e-mail:
>>>[EMAIL PROTECTED]
>>>
>>>
>>
>>
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to