You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Kent Tong <ke...@cpttm.org.mo> on 2006/12/12 08:47:55 UTC

T5: Some items that I may help

Hi,

As needed by the workbench, there are some items that I may help with. 
Please let me know if it is the way to go or you have some other ideas 
in mind:

1) Image component. Why have an Img component in app1? What's missing
in it preventing to become a core component?

2) Any component. I've written a simple one in the workbench. If there
is no proposed design change, I'd like to move it to the core. There
is a minor issue though: it seems there is no way to specify a "type"
attribute as an informal parameter:
  
  <t:comp type="literal:text/css" element="literal:link" .../>

3) Shell component. Any proposed enhancements?

4) The "source" parameter of the Loop component doesn't accept an array
(because arrays don't implement Iterable). Maybe we can enhance to
TypeCoercer to handle the conversion (map Array.class to Iterable.class)?

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


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


Re: T5: Some items that I may help

Posted by Kent Tong <ke...@cpttm.org.mo>.
Ron Piterman <rpiterman <at> gmx.net> writes:
> 
> it would be possible if one uses
> 
>      <link t:type="Any" type="literal:text/css" .../>

I am not sure about that. I've tried something similar:

<html xmlns:h="www.w3.org/1999/xhtml" xmlns:t="...">
   <t:comp h:type="literal:text/css" .../>
</html>

But it doesn't work. Besides, support for T4-style templates with 
"invisible annotations" has not been implemented yet.

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


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


Re: T5: Some items that I may help

Posted by Ron Piterman <rp...@gmx.net>.
Kent Tong wrote:
> Hi,
> 
> As needed by the workbench, there are some items that I may help with. 
> Please let me know if it is the way to go or you have some other ideas 
> in mind:
> 
> 1) Image component. Why have an Img component in app1? What's missing
> in it preventing to become a core component?
> 
> 2) Any component. I've written a simple one in the workbench. If there
> is no proposed design change, I'd like to move it to the core. There
> is a minor issue though: it seems there is no way to specify a "type"
> attribute as an informal parameter:
>   
>   <t:comp type="literal:text/css" element="literal:link" .../>

it would be possible if one uses

     <link t:type="Any" type="literal:text/css" .../>

Cheers,
Ron


> 
> 3) Shell component. Any proposed enhancements?
> 
> 4) The "source" parameter of the Loop component doesn't accept an array
> (because arrays don't implement Iterable). Maybe we can enhance to
> TypeCoercer to handle the conversion (map Array.class to Iterable.class)?
> 
> --
> Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


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


Re: T5: Some items that I may help

Posted by Andreas Andreou <an...@di.uoa.gr>.

Howard Lewis Ship wrote:
> On 12/11/06, Kent Tong <ke...@cpttm.org.mo> wrote:
>
> 3) Shell component. Any proposed enhancements?
>
>
> Hoping this will not be needed, though it is useful for linking to
> stylesheets.  

Not entirely true, even in 4.1.1

Using http://tapestry.apache.org/tapestry4.1/components/general/style.html
we can have stylesheets added to the page from anywhere - no need to
define them
beforehand (in @Shell for instance) .

> I'm hoping that we'll soon be able to say:
>
> <html>
>  <head>
>    <title>${page.title}</title>
>   <link type="text/css" href="${stylesheet}"/>
>
>
> I want to loosen up the rules to allow expansions inside non-component
> element attributes.
>
> I think the asset: prefix will be different too, it will be used to
> identify
> a resource relative to the actual template (the template may
> be on the classpath).  In many cases, it will be easier to use the
> @Inject
> annotation and expose a read-only property, but still ...
>
>
> 4) The "source" parameter of the Loop component doesn't accept an array
>> (because arrays don't implement Iterable). Maybe we can enhance to
>> TypeCoercer to handle the conversion (map Array.class to
>> Iterable.class)?
>
>
>
> That would be a good solution, either Object[] --> List or Object[] -->
> Iterable would be good.
>
>
> -- 
>> Author of a book for learning Tapestry
>> (http://www.agileskills2.org/EWDT)
>
>
>
> Having fun yet?
>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>

-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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


Re: T5: Some items that I may help

Posted by Kent Tong <ke...@cpttm.org.mo>.
Howard Lewis Ship <hlship <at> gmail.com> writes:

> Again, I hope that the workbench is temporary; I really think we want more
> compelling examples than this old hack!

Sure. Make it work and make it better.

> 3) Shell component. Any proposed enhancements?
> 
> Hoping this will not be needed, though it is useful for linking to
> stylesheets.  I'm hoping that we'll soon be able to say:
> 
> <html>
>   <head>
>     <title>${page.title}</title>
>    <link type="text/css" href="${stylesheet}"/>
> 
> I want to loosen up the rules to allow expansions inside non-component
> element attributes.

It seems a good idea. Now I see why you hesitate to have the Image, 
Shell and Any components. So I'll just keep them in the workbench 
for the moment and revise/remove them as it goes.

> I think the asset: prefix will be different too, it will be used to identify
> a resource relative to the actual template (the template may
> be on the classpath).  In many cases, it will be easier to use the  <at> 
> Inject annotation and expose a read-only property, but still ...

OK.

> 4) The "source" parameter of the Loop component doesn't accept an array
> > (because arrays don't implement Iterable). Maybe we can enhance to
> > TypeCoercer to handle the conversion (map Array.class to Iterable.class)?
> 
> That would be a good solution, either Object[] --> List or Object[] -->
> Iterable would be good.

Will try.

> Having fun yet?

Well, I'd say it's a good learning experience.



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


Re: T5: Some items that I may help

Posted by Howard Lewis Ship <hl...@gmail.com>.
On 12/11/06, Kent Tong <ke...@cpttm.org.mo> wrote:
>
> Hi,
>
> As needed by the workbench, there are some items that I may help with.
> Please let me know if it is the way to go or you have some other ideas
> in mind:


Again, I hope that the workbench is temporary; I really think we want more
compelling examples than this old hack!


1) Image component. Why have an Img component in app1? What's missing
> in it preventing to become a core component?


I'm just being very slow and very careful about adding components. I really
think there should be far fewer coponents in T5 than in T4.


2) Any component. I've written a simple one in the workbench. If there
> is no proposed design change, I'd like to move it to the core. There
> is a minor issue though: it seems there is no way to specify a "type"
> attribute as an informal parameter:
>
>   <t:comp type="literal:text/css" element="literal:link" .../>


This may need to wait for invisible (T4-style) template instrumentation, i.e
.:

  <link t:type="Any" type="text/css" ...

My current leaning is that for this style, parameters are assumed to be
literal: unless prefixed.  We'll see if that is confusing.


3) Shell component. Any proposed enhancements?


Hoping this will not be needed, though it is useful for linking to
stylesheets.  I'm hoping that we'll soon be able to say:

<html>
  <head>
    <title>${page.title}</title>
   <link type="text/css" href="${stylesheet}"/>


I want to loosen up the rules to allow expansions inside non-component
element attributes.

I think the asset: prefix will be different too, it will be used to identify
a resource relative to the actual template (the template may
be on the classpath).  In many cases, it will be easier to use the @Inject
annotation and expose a read-only property, but still ...


4) The "source" parameter of the Loop component doesn't accept an array
> (because arrays don't implement Iterable). Maybe we can enhance to
> TypeCoercer to handle the conversion (map Array.class to Iterable.class)?



That would be a good solution, either Object[] --> List or Object[] -->
Iterable would be good.


--
> Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)



Having fun yet?

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


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com