You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jamis Buck <jg...@email.byu.edu> on 2004/02/18 00:40:42 UTC
Inheriting a specification
I've got a situation where I need to extend the Form component (to add
another hidden field). I know I need to create a new .jwc file for this
component, but I want it to also have all the parameters of its
ancestor. Is the only way to do this to explicitly copy the contents of
org.apache.tapestry.form.Form.jwc into my NewForm.jwc file? Or is there
a cleaner way of doing this?
--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/blog/jamis.cgi
ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Inheriting a specification
Posted by Jamie Orchard-Hays <ja...@dang.com>.
You can't inherit, but you can wrap and pass through parameters. Use
<inherited-binding>
<component-specification allow-body="yes" allow-informal-parameters="yes"
class="mypackage.MyClass">
<parameter name="data" type="java.lang.Object" direction="in"
required="yes" />
<component id="tableElement" type="contrib:Table"
inherit-informal-parameters="yes">
<inherited-binding name="source" parameter-name="data"/
</component>
</component>
Jamie
----- Original Message -----
From: "Jamis Buck" <jg...@email.byu.edu>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, February 17, 2004 6:40 PM
Subject: Inheriting a specification
> I've got a situation where I need to extend the Form component (to add
> another hidden field). I know I need to create a new .jwc file for this
> component, but I want it to also have all the parameters of its
> ancestor. Is the only way to do this to explicitly copy the contents of
> org.apache.tapestry.form.Form.jwc into my NewForm.jwc file? Or is there
> a cleaner way of doing this?
>
> --
> Jamis Buck
> jgb3@email.byu.edu
> http://www.jamisbuck.org/blog/jamis.cgi
>
> ruby -h | ruby -e
'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a <<
r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org