Re: [Sandler-develop] Default Content
Brought to you by:
intabulas
|
From: Mark L. <ma...@ca...> - 2004-04-14 20:36:50
|
Sorry it took a bit to reply, I lost my DSL while working at home yesterday. So I have read this a few times and re-read that section of the spec (http://www.mnot.net/drafts/draft-nottingham-atom-format-02.html#rfc.section.4.13.10 for those lurking) and at this point I think specifing a default selector is not all that bad. I think you jstl example is quite a good argument for it, though the long method name aint my favorite choice.. We could also make a assumption that setting a general ContentSelector for the builder would be enough and the model where it needs it uses it. M > Looking at the Atom Syndication Spec (tm) I notice that although an > Entry can have multiple Content elements, the client is only ever > supposed to display one. > > I would like to provide a means for obtaining this one via an > <code>Entry.getContent(): Content</code> method but cannot decide best > way to do it. > > Options I am considering: > > on the Builders provide the ability to specify a ContentSelector which > will be an interface which, when passed an array/collection of Entry > instances will return a single Entry which will be the default: > > <code>XPPBuilder.setDefaultEntryContentSelector(ContentSelector): > null</code> but this doesn't feel completely correct. The main reason I > want to be able to specify this somewhere, rather than present it as a > <code>Entry.selectContent(ContentSelector): Entry</code> is that I > would like to make Sandler elements JEXL/OGNL friendly, and passing > args (especially complicated ones) is a bear there. > > <channel> > ... > <c:forEach items="${feed.entries}" var="entry"> > <item> > ... > ${entry.content.body} > </item> > </c:forEach> > > is nice to be able to do =) > > Any thoughts? > > -Brian > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Sandler-develop mailing list > San...@li... > https://lists.sourceforge.net/lists/listinfo/sandler-develop |