Please do so.

However, it opens up the concept of changing the way components render.  
Perhaps more components should act like PropertySelection, and have a delegate 
used to perform rendering (with a shared instance used in most cases).  You 
could then create standard Foo's with an alternate FooRenderDelegate to 
accomplish what you want.

On the other hand, what you really want is to do a little thing to TextField 
and have it affect all TextField's in your app.  

I guess, in the world of HotSpot, adding additional empty methods will not 
cause an issue; HotSpot will inline the method calls to nothing (unless you 
actually do override the empty method in a subclass).



Are you sure there isn't a CSS way to do this?  I forget how CSS references 
input fields.


--
[EMAIL PROTECTED]

http://tapestry.sf.net
> Hi Howard -
>  
> Yours suggestions of using inheritance for my own text field worked great.
> However, I also wanted to the same behavior in Radio, PropertySelection,
> Select, TextArea and Checkbox.  These components do not have a
> beforeCloseTag method.  Therefore, I must copy their entire renderComponent
> method into my subclass.  Unless there is another approach, I would like to
> file and enhancement request for these components to have a beforeCloseTag
> method added.
>  
> Dorothy
> 
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 08, 2003 4:01 AM
> To: Dorothy Gantenbein; [EMAIL PROTECTED]
> Subject: Re: [Tapestry-developer] Extending Textfield Question
> 
> 
> TextField is designed for this, fortunately (mostly to support ValidField).
>  
> You should be able to copy the TextField .jwc into your application and
> modify it to point to your own class.  Add the class parameter as direction
> "in" to a property named "styleClass".
>  
> Subclass TextField and override beforeCloseTag() to insert your styleClass
> property.
>  
> By putting TextField into the application specification it will
> automatically take effect for all the pages of your application.
> 
> ----- Original Message ----- 
> From: Dorothy Gantenbein <mailto:[EMAIL PROTECTED]>  
> To: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>  
> Sent: Tuesday, January 07, 2003 8:37 PM
> Subject: [Tapestry-developer] Extending Textfield Question
> 
> Hi -
>  
> We would like to have our own textfield with an HTML 'class' parameter.
> This class parameter would have a default to our pre-defined style.  Should
> I inherit from Tapestry's TextField or use delegation?  If I use delegation,
> how do I pass the informal parameters to the contained Tapestry TextField?
>  
> Thanks...
> Dorothy
> 
>  <http://informative.com/advise/index.jsp>    
>   <http://informative.com/images/spacer_clear.gif>    
> 
> 
> 
> Dorothy Gantenbein
> Software Architect
> 650.534.1077 | t
> 650.534.1020 | f
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
> 
>  
> 


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to