RE: Extending Textfield Question

Dorothy Gantenbein <[email protected]> Wed, 8 Jan 2003 15:07:50 -0800
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <6FFA5AEBCD9ED311861A00508B0E71FB01E0DD32@SFREXCH>
Thanks for the info.  I will look at the InheritInformalAny component as
well.  Earlier in this email thread, Howard had suggested an enhancement
request.  I will add the enhancement request soon.
 
Thanks again...
Dorothy

-----Original Message-----
From: Mindbridge [mailto:[email protected]]
Sent: Wednesday, January 08, 2003 3:07 PM
To: [email protected]
Subject: Re: [Tapestry-developer] Extending Textfield Question


Hi Dorothy,
 
Some time ago I suggested to have the ablity to inherit informal parameters
with precisely this use case in mind. It can be implemented with something
like the inherited-binding component parameter, but that inherits all
informal parameters instead. We have faced the need for such a functionality
as well.
 
I think that with the major new extensions in 2.4 the smaller proposals have
been put a bit on a back-burner for a while (as it can be expected). In any
case, I will add this to the list of developer issues on the Wiki. Given the
DTD changes in 2.4, it may be a good idea to add such modifications in that
release as well, but that has to be voted by the contributors first.
 
Btw, if you look at the InheritInformalAny component in Contrib, it offers
precisely that service for the Any component (it renders the parent's
informal parameters as well -- heavily used in Table). Should the above
feature be available, such a component will not be necessary.
 
Best regards,
-mb
 

----- Original Message ----- 
From: Dorothy Gantenbein <mailto:[email protected]>  
To: 'Richard Lewis-Shell' <mailto:[email protected]>  ; Dorothy Gantenbein
<mailto:[email protected]>  ;
[email protected]
<mailto:[email protected]>  
Sent: Thursday, January 09, 2003 12:12 AM
Subject: RE: [Tapestry-developer] Extending Textfield Question


Initially, I thought of the same approach.  However, how do you pass the
informal parameters into your contained Submit button?

Thanks... 
Dorothy 

-----Original Message----- 
From: Richard Lewis-Shell [ mailto:[email protected]
<mailto:[email protected]> ] 
Sent: Wednesday, January 08, 2003 2:13 PM 
To: Dorothy Gantenbein; [email protected]
<mailto:[email protected]>  
Subject: Re: [Tapestry-developer] Extending Textfield Question 


OK - I see now.  We have the same problem - mainly with submit buttons.  We 
just created a FooSubmit component that uses (rather than inherits) a submit

component.  We can then control the default class from the FooSubmit, and 
let it be overriden on a case-by-case basis.  It's then just a matter of 
making sure everyone uses FooSubmit, rather than Submit... 

R 

PS. Some names were changed in the above to protect the innocent ;-) 

----- Original Message ----- 
From: "Dorothy Gantenbein" <[email protected]> 
To: "'Richard Lewis-Shell'" <[email protected]>; "Dorothy Gantenbein" 
<[email protected]>; <[email protected]>; 
"Neil Clayton" <[email protected]> 
Sent: Thursday, January 09, 2003 10:55 AM 
Subject: RE: [Tapestry-developer] Extending Textfield Question 


> Hi - 
> 
> We want to the HTML class to defaulted to our standard style.  We do not 
> want to pass "class" everywhere a text field is used within a page or 
> component.  For odd cases, the UI designer can pass "class" and override 
our 
> standard style. 
> 
> Does that help? 
> 
> Dorothy 
> 
> -----Original Message----- 
> From: Richard Lewis-Shell [ mailto:[email protected]
<mailto:[email protected]> ] 
> Sent: Wednesday, January 08, 2003 2:02 PM 
> To: Dorothy Gantenbein; [email protected]; Neil 
> Clayton 
> Subject: Re: [Tapestry-developer] Extending Textfield Question 
> 
> 
> I think I have missed the point of this discussion - can you explain why 
> informal parameters cannot do this (as per Malcolm's suggestion)?  We use 
> informal parameters on loads of Tapestry's form components to control 
their 
> class, and it works fine... 
> 
> Richard 
> 
> ----- Original Message ----- 
> From: "Dorothy Gantenbein" <[email protected]> 
> To: "'Howard M. Lewis Ship'" <[email protected]>; "Dorothy Gantenbein" 
> <[email protected]>; <[email protected]> 
> Sent: Thursday, January 09, 2003 10:35 AM 
> Subject: RE: [Tapestry-developer] Extending Textfield Question 
> 
> 
> > 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]
<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]
<mailto:[email protected]> > 
> > To: [email protected] 
> > < mailto:[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/advise/index.jsp> > 
> >   < http://informative.com/images/spacer_clear.gif
<http://informative.com/images/spacer_clear.gif> > 
> > 
> > 
> > 
> > Dorothy Gantenbein 
> > Software Architect 
> > 650.534.1077 | t 
> > 650.534.1020 | f 
> > [email protected] < mailto:[email protected]
<mailto:[email protected]> > 
> > 
> > 
> > 
> > 
> 
>