You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Barry Books <bf...@mac.com> on 2005/02/01 18:46:05 UTC

Component Library Namespaces

I'm working on a table component that  runs mostly on the client. It 
uses XMLHttpRequest() to get the data then allows the user to sort, 
page etc on the client using Javascript. I've got the component in a 
library that I include in another project. All that more or less works 
but when adding the final feature I ran into trouble. I have a 
conditional that says if you don't want the Javascript one just use 
contrib:Table.

The problem is when I view the page I get an exception can't find 
contrib in namespace myLib. I think there was some discussion about 
namespaces a few days ago but unfortunately the mailing list archive 
appears to be down. Is it possible to include components from libraries 
in other libraries and if so how do you do it?

BTW: I'll make the component available when I finish it

Thanks
Barry


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Component Library Namespaces

Posted by Barry Books <bf...@mac.com>.
Thanks, that did the trick.

One other question. I had to create an XMLWriter that's an 
AbstractMarkupWriter. I haven't looked that much at the code but it 
appears the MarkupWriter saves a PrintStream that I'm guessing is the 
output from the servlet. If I put a XSLT filter with it's input as the 
writer and the output connected to the output PrintStream I'm guessing 
I can do XLST transforms on  XML documents generated by a Tapestry 
page. Does that seem correct?


On Feb 1, 2005, at 11:53 AM, Erik Hatcher wrote:

>
> On Feb 1, 2005, at 12:46 PM, Barry Books wrote:
>
>> I'm working on a table component that  runs mostly on the client. It 
>> uses XMLHttpRequest() to get the data then allows the user to sort, 
>> page etc on the client using Javascript. I've got the component in a 
>> library that I include in another project. All that more or less 
>> works but when adding the final feature I ran into trouble. I have a 
>> conditional that says if you don't want the Javascript one just use 
>> contrib:Table.
>>
>> The problem is when I view the page I get an exception can't find 
>> contrib in namespace myLib. I think there was some discussion about 
>> namespaces a few days ago but unfortunately the mailing list archive 
>> appears to be down. Is it possible to include components from 
>> libraries in other libraries and if so how do you do it?
>
> You can put a <library> registration in your own .library file.  That 
> should do the trick.
>
>> BTW: I'll make the component available when I finish it
>
> Awesome!
>
> 	Erik
>
>
> ---------------------------------------------------------------------
> 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


Re: Component Library Namespaces

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 1, 2005, at 12:46 PM, Barry Books wrote:

> I'm working on a table component that  runs mostly on the client. It 
> uses XMLHttpRequest() to get the data then allows the user to sort, 
> page etc on the client using Javascript. I've got the component in a 
> library that I include in another project. All that more or less works 
> but when adding the final feature I ran into trouble. I have a 
> conditional that says if you don't want the Javascript one just use 
> contrib:Table.
>
> The problem is when I view the page I get an exception can't find 
> contrib in namespace myLib. I think there was some discussion about 
> namespaces a few days ago but unfortunately the mailing list archive 
> appears to be down. Is it possible to include components from 
> libraries in other libraries and if so how do you do it?

You can put a <library> registration in your own .library file.  That 
should do the trick.

> BTW: I'll make the component available when I finish it

Awesome!

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Component Library Namespaces

Posted by Andreas Andreou <an...@di.uoa.gr>.
Sounds like a cool component!
Anyway, if you're creating a library and one of its components needs to 
reference a component specified
in a third library, you'ld have to include a library reference in your 
own library-specification.
So, (in mylibrary.library) use something like
<library-specification>
    <library id="contrib" specification-path="..."/>
...
</library-specification>

Take a look at 
http://jakarta.apache.org/tapestry/doc/TapestryUsersGuide/spec.library.html

Andreas Andreou

Barry Books wrote:

> I'm working on a table component that  runs mostly on the client. It 
> uses XMLHttpRequest() to get the data then allows the user to sort, 
> page etc on the client using Javascript. I've got the component in a 
> library that I include in another project. All that more or less works 
> but when adding the final feature I ran into trouble. I have a 
> conditional that says if you don't want the Javascript one just use 
> contrib:Table.
>
> The problem is when I view the page I get an exception can't find 
> contrib in namespace myLib. I think there was some discussion about 
> namespaces a few days ago but unfortunately the mailing list archive 
> appears to be down. Is it possible to include components from 
> libraries in other libraries and if so how do you do it?
>
> BTW: I'll make the component available when I finish it
>
> Thanks
> Barry
>
>
> ---------------------------------------------------------------------
> 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