Kees Jongenburger wrote:
> other examples where false to
> <mm:node>
>     <mm:field name="bla"/>
> </mm:node>
> 
> can also be written as
> <mm:node id="test"/>
> <mm:field node-"test" field="title"/>
> 
> but that is almost never used because it requires to define a test variable.

That is not actually possible. The node attribute of field is meant for the
following:

<mm:listnodes id="news" type="news">
  <mm:relatednodes type="url">
    <mm:field node="news" name="title" /> <mm:field name="url" />
  </mm:relatednodes>
</mm:listnodes>

So, access to other then 'direct' parent. I suppose using an EL syntax that
would become ${news.title} ${url.url}, so quite straighforward as well.

Also this use of 'node' is hardy every used, but _if_ you need it, things
would get rather ugly if you would't have it.

> jtsp:forEach tags:
> the forEach tag can be useful. but when people start using it they
> will need the exact functions that are in the mmbase taglib
> -know the size of the list
> -know if the list is not empty
> -know if this is the first / last element

This partly overlaps with Wouter's argument of the missing 'container'
functionality, with which I also agree. Btw the 'first' element can be quite
easily determinged with something like ${item == 0} in EL. 'odd' and 'even'
are similary possible, and you'd also have 'dividable by 3' and so on;
features we have even talked about to support in taglib, but (happily) never
did. Knowing the last element I don't readily know how to do in EL either, but 
are
you really sure that it can't be done?

The other thing that I would very much miss is the <mm:content / escaper
functionallity, which perhaps would be a detail, but actually quit
essential, because generally it is wrong to just put your field to the page,
it would normally need escaping, and I think that you would end up using
<c:out then, which is hardy any more consice then <mm:field. But anyhow,
because it has some merits I tried to support ${news.title} in 1.8 mmbase
taglib, and it was easy.

You could also make functions available to support this. The 'mm:escape' 
function would come
into mind:
${mm:escape(news.title)}, ${mm:escape(news.body, 'p')}, or so. But well, I
would then rahter use <mm:field name="title" />

So generally I think the idea of a new taglib with JSP2 has merits, but it
feels a bit like the ammount of effort which was put in the current taglib
to get all kind of details right, for which the need grew largely while
_using_ it,  is ignored. 



Michiel

-- 
Michiel Meeuwissen                  mihxil'
Mediacentrum 140 H'sum                [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US



_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to