Great Marius! You are right, I was mistaking the class concept. To me, I was understanding that if I create an object based on a class template then the "classname property" of the object would be the "class name template".
Now it is working. Thank you a lot, more one time. Sincerely, Danilo Oliveira -----Mensagem original----- De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Em nome de Marius Dumitru Florea Enviada em: terça-feira, 3 de setembro de 2013 06:54 Para: XWiki Users Assunto: Re: [xwiki-users] RES: Information Organization Challenge On Mon, Sep 2, 2013 at 5:32 PM, Danilo Amaral de Oliveira <danilo.olive...@energisa.com.br> wrote: > Exactly Vincent. > > I want to show the table with the documents of a specific space except the > documents based on the "ProcedimentoOperacionalClass" > I wrote the following code below but the search is returning 0 results.: > > Livetable page: > {{velocity}} > #set($collist = ["doc.name","doc.date", "doc.author"]) #set($colprops > = { > "doc.name" : { "type" : "text" , "size" : 30, "link" : > "view"}, > "doc.date" : { "type" : "date" }, > "doc.author" : { "type" : "text", "link" : "author"} > }) > #set($options = { > "resultPage":"Reles.gridFilterJSON", > "translationPrefix" : "xe.index.", > "rowCount": 15 }) > #livetable("alldocs" $collist $colprops $options) > > #set($showLeftPanels = 0) > #set($showRightPanels = 0) > {{/velocity}} > > JSONpage: > {{include document="XWiki.LiveTableResultsMacros" /}} > > {{velocity wiki="false"}} > #gridresultwithfilter($request.classname $request.collist.split(",") > "", " and doc.space='Reles' and doc.name <> 'WebHome' and doc.name <> > 'WebPreferences' and doc.className <> 'ProcedimentoOperacionalClass'") replace doc.className <> 'ProcedimentoOperacionalClass' with: doc.fullName not in (select doc.fullName from XWikiDocument doc, BaseObject as obj where doc.fullName = obj.name and obj.className = 'SpaceName.ProcedimentoOperacionalClass') and replace "SpaceName" with the space were ProcedimentoOperacionalClass is located. > {{/velocity}} > > In the fact, I don't know exactly how to get the class of a specific document > to compare the value. > Is Anyone know how to get the class of a specific object? You're mixing things. A class is defined by a single document (e.g. ProcedimentoOperacionalClass, ProcedureClass). You can view it as a data type. And you can have 0 or more documents that have objects of that type (i.e. instances of that class). More over documents can have multiple objects of different types. So something like "doc.className <> 'ProcedimentoOperacionalClass'" doesn't make sense unless you want to exclude the document that defines the class, but I think you want to exclude the documents that have objects of that type (ProcedimentoOperacionalClass). Hope this helps, Marius > > Thank you. > Danilo > > -----Mensagem original----- > De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] Em nome > de Vincent Massol Enviada em: sábado, 31 de agosto de 2013 06:12 > Para: XWiki Users > Assunto: Re: [xwiki-users] Information Organization Challenge > > H Danilo, > > If I understand correctly you wish to have a livetable with some documents > except for some which have a given xobject. > > See > http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#H > Filterorganizationsbydomain > > Thanks > -Vincent > > On Aug 31, 2013, at 12:03 AM, Danilo Amaral de Oliveira > <danilo.olive...@energisa.com.br> wrote: > >> Hello People, >> >> How are you? >> >> I am creating a new wiki that will support 2 kind of documents - the default >> (empty page) and a ProcedureClass (procedure template). >> Each space in the wiki will contain the two kinds of documents and I want to >> show them separately in the Webhome. Then if I enter in space A, the webhome >> will show two list of documents, the default and the Procedures. >> >> My idea is to build 2 livetable in the webhome page in each space. The first >> livetable will contain the Default Documents and the second one will contain >> the procedures documents of that space. >> I could build the livetable of the class document with the code below, BUT I >> couldn't think in a way to build a livetable to show only the "default >> documents(pages)" because I couldn't identify if the default document has a >> unique class like the procedure (ProcedimentoOperacionalClass). >> >> Anyone has some suggestion? >> >> {{velocity}} >> #set ($columnsProperties = { >> 'doc.title': {"type":"text","size":20,"link":"view"}, >> 'doc.author': {"type":"text","size":10,"link":"author"} >> }) >> >> #set ($options = { >> 'className': 'XWiki.ProcedimentoOperacionalClass', >> 'resultPage': 'XWiki.LiveTableResults', >> 'rowCount': 15, >> 'maxPages': 10, >> 'selectedColumn': 'doc.title', >> 'defaultOrder': 'asc', >> 'extraParams' : '&space=Reles' >> }) >> #set ($columns = ['doc.title', 'doc.author']) #livetable('bug' >> $columns $columnsProperties $options) {{/velocity}} >> >> Thank you, >> Danilo >> _______________________________________________ >> users mailing list >> users@xwiki.org >> http://lists.xwiki.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users