Hi Andre,

Is it just the contrib:TablePages component you want to override? That is 
fairly simple:

contrib:Table is an empty wrapper component for contrib:TablePages, 
contrib:TableColumns, contrib:TableRows and contrib:TableValues.

So make your own Table component that does the same, but includes your own 
TablePages component.

If you don't want to duplicate the backing java code for TablePages then just 
create the .page and .html files, and set the backing class to be the 
TablePages class from the contrib library.

As for feature requests see the JIRA 
http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573

But I don't necessarily think that the ability to override any component jibes 
with a component-oriented framework necessarily. Component-oriented 
frameworks typically emphasise customisation by encapsulation rather than 
extension.

regards,
Scott

On Sat 18 March 2006 22:49, André wrote:
> Hi Scott,
> and thanks a lot, if that really was true, that sounded like a huge
> limitation to me - only being able to override within the default
> namespace. I'd like to suggest an enhancement - where may post tapestry
> enhancement request?
>
> Regarding what would work maybe:
> 1. copy Contrib.library to my project
> 2. change all paths to absolute
> 3. change tablePages component to my own component
> 4. include the modified Contrib.library instead of the original one
> would that work?
>
> Isn't there an option using spring or hivemind? I read there is
> auto-discovery and stuff like that. What should I read to grasp how to
> do it using these?
>
> As tapestry is component oriented I though it might even be possible to
> exchange compatible components at run time, isn't there a component
> registry where you can go and connect things differently? Or is this one
> of the tap 4.1 or 5 features?
>
> Thanks a lot,
> André
>
> Scott Russell wrote:
> > Hi Andre,
> >
> > Components in the contrib library are not in the same namespace as those
> > in the framework library (ie. the default library). Framework components
> > have the default namespace (eg. Insert) and these can be overridden by
> > providing your own component with the same name (ie. your own Insert).
> > But I don't think that mechanism is available for components from other
> > libraries like contrib.
> >
> > -Scott
> >
> > On Sat 18 March 2006 05:38, André wrote:
> >> Hi all,
> >> (I am not on the list, please include me in replies)
> >> I want to do what is stated being possible in:
> >> http://jakarta.apache.org/tapestry/UsersGuide/components.html#components
> >>.li braries.namespace "In fact, it is possible to override both pages and
> >> components provided by the framework."
> >> But how?
> >>
> >> I want to replace my implementation of contrib:tablePages for my
> >> application without touching anything. Wherever, from my application,
> >> contrib:tablePages is referenced, I want my implementation to appear.
> >>
> >> I tried this in several variations:
> >> <library id="contrib"
> >> specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
> >> (original)
> >> <library id="contrib" specification-path="/org/trails/demo/t.library"/>
> >> (my lib)
> >>
> >> My library only basically contains:
> >> <component-type type="TablePages"
> >> specification-path="TablePagesMy.jwc"/>
> >>
> >> Except an overriden contrib:tablePages this results in an error, "A
> >> child namespace with id 'contrib' already exists." - How do I override
> >> compoentns within namesapces then?
> >>
> >> To set things in context, this is what I want to reach:
> >> Contrib:Table does not support AJAXed Paging. I want to exchange
> >> DirectLinks in Contrib:TablePages while not touching anything.
> >> It is easy to add new rows and reload a table using AJAX (see trails
> >> example), but I am not sure how to approach this one.
> >>
> >> What is the best way to solve this? I also though at "extending" or
> >> "subclassing" component specification while overriding inner components,
> >> seems not to be possible.
> >>
> >> I am kind of new to tapestry, spring etc. please keep that in mind while
> >> responding :-)
> >>
> >> Regards,
> >> andré
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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