If you want an instance of your calendar object on a whole slew of different pages, create a component that needs no parameters and displays your component with all of its parameters set the way you like them, and then put *that* component on all your pages. You get your calendar all nicely configured and it doesn't take a bunch of lines in your .jwc files, as described by MindBridge below.
Or is that still too hard?
Kyle Dawkins
Central Park Software
On Thursday, Dec 19, 2002, at 12:27 US/Eastern, Mind Bridge wrote:
Hi Christian,
I think am clear as to what you suggest (see below for an example). Here is
an example of what I am talking about:
New Component (Tapestry 2.4): ----------------------------- 1 x defining a new component 5 lines + 'component configuration', 1 line template, 1 line aliasN x using the new component 1 line in templateJWC:huh? Sorry I really cannot follow. What are those 5 lines?
----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE component-specification PUBLIC "-//Howard Lewis Ship//Tapestry
Specification 1.3//EN"
"http://tapestry.sf.net/dtd/Tapestry_1_3.dtd">
<component-specification class="net.sf.tapestry.BaseComponent">
<!-- begin component configuration -->
<component id="compId" type="SomeComponentThatNeedsToBeConfigured">
<binding name="someParameter1" expression="some value 1"/>
<binding name="someParameter2" expression="some value 2"/>
</component>
<!-- end component configuration -->
</component-specification>
Template:
---------
<span jwcid="compId"/>
App spec:
---------
<component-alias type="ConfiguredComponent" specification-path="..."/>
Using the new component in every relevant page (same effect as what you
suggest):
----------------------------------------------------------------------- -
<span jwcid="@ConfiguredComponent"/>
What you suggest is to put the following block in the App spec instead:What is "? lines + 'component configuration'"?
<!-- begin component configuration -->
<component id="compId" type="SomeComponentThatNeedsToBeConfigured">
<binding name="someParameter1" expression="some value 1"/>
<binding name="someParameter2" expression="some value 2"/>
</component>
<!-- end component configuration -->
and make it possible for that component to be used in all application pages
and components in the following way:
<span jwcid="compId"/>
As you can see, the difference between the above approaches is precisely 7
lines in the locations that I have specified. I have put the '? lines'
because it is possible that additional code may be needed, although it is
not apparent that it is at this point.
Note that there is basically no difference between the two approaches when
'use' is concerned -- they both require one short line.
I have to go out in about -5 minutes, so just a few quick final remarks for
now:
This is where we come from, actually. In the pre-2.2 world aliases were1. make type aliases optional (tapestry 2.4?)
optional and Spindle, for example, did not use them at all. This is not very
compatible with the notion of libraries, however. Please have a look at the
mailing list archives on this topic, or perhaps Howard can explain his point
of view.
I hope this makes things clearer.
You proposal is definitely interesting, but I think the 'composing
component' one described above is very close.
Best regards,
-mb
-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
