Olivier Revollat wrote:
> Hello !
> I'm new to displaytag and I don't understand how to customize 
> generated html.
>  
> let's take an example :
>  
> I've got a list of articles (lisArticles)
>  
> If I do :
>  
> <display:table id="article" name="lisArticles" pagesize="7" 
> requestURI="/rechercheArchive.do"> <display:column property= 
> "dateDebutPublication"> </display:column> <display:column property= 
> "titre"> </display:column> </display:table>
> It works fine, I see a paginated table with 2 cols and 7 rows ...
> But I don't understand how displaytag works if I want to customise 
> each cells or even if I want that my two columun 
> ( dateDebutPublication and titre) display in the same cell ? ..
> In fact, I would like to be able to do something like this : 
> <display:column>
>
> Retrieve here my object property (i.e. dateDebutPublication  or titre) 
> and DO MY OWN HTML CODE
>
> </display:column>
>
>  
>
> I don't know if I'm clear... I can give you more information about 
> what I really need ... but basically I want to have more "control" 
> over HTML generation ..
>

You can do this:

<display:table id="article" name="lisArticles" pagesize="7" 
requestURI="/rechercheArchive.do"> <display:column title= "My Column">
    <b>${article.dateDebutPublication}</b> <i>${article.titre}</i>. I 
can put any html I like in here!
</display:column>
</display:table>

( http://displaytag.sourceforge.net/11/tut_basic.html )

or you can use a decorator:

http://displaytag.sourceforge.net/11/tut_decorators.html

Ed!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to