On Fri, Sep 28, 2012 at 10:11 PM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
On 09/28/2012 05:54 AM, Thomas Mortagne wrote:
Hi devs,
In many APIs we sometime want to manipulate several Block but we don't
want to put them in a meaningful Block like XDOM which is supposed to
mean a full document. Right now the only way to do it is to have both
an API with Block and another with Collection<Block> but it's a bit
more annoying for return type where you are forced to return a
List<Block> even if you are in a case where you actually have only one
Block to return like in macros for example.
We talked a long time ago with Vincent about a BlockCollection which
would not have any meaning (i.e. no corresponding event in the stream
rendering API) and would just be here to be able to pass several
blocks as a Block.
Does BlockCollection extend Block or the other way around? It's not very
clear to me how exactly this would work.
Since UI extension is going to use it a lot I
propose to introduce it now.
WDYT ?
Any better idea for the name ?
In standard DOM that's a NodeList, so BlockList would be the equivalent
name.
Here is my +1.
+0.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs