Hello,

Livetable is somehow magic but ... (there are always a 'but') is it possible to 
use multiple Class?

I read XWiki.LiveTableResultsMacros
"#macro(gridresultwithfilter_buildQuery $className ...
#set($class = $xwiki.getDocument($className).getxWikiClass())"
=> livetable use getxWikiClass method (and not getxWikiClasses :-( )

Here my problem in my nice xwiki 6.4.0 application:
I created some Class/Sheet/Template with 2 common properties/field: I mean on 
each document Class I created this common property (same name, same source): 
this one by example
- Name:P1_DgMoa_req Type: Database List
- XWiki Class Name: FormSMQ.ListeDGClass
- Id Field: Name DGId
- Value Field: Name DGLib

On my WebHome I paste this livetable:

#set ($columnsProperties = {
 'TypeFiche_RO': {"type":"list","size":10},
 'P1_DgMoa_req': {"type":"list","size":10},
  'doc.name': {"type":"text","size":10,"link":"view"},
  'doc.date': {"type":"text","size":10},
  'doc.creator': {"type":"text","size":10,"link":"creator"},
  '_actions': 
{"sortable":false,"filterable":false,"html":true,"actions":["edit"]}
})
#set ($options = {
  'className': 'MySpace.MyClass',
  'translationPrefix' : 'FormSMQ.livetable.',
  'tagCloud': true,
  'rowCount': 15,
  'maxPages': 10,
  'selectedColumn': 'doc.name',
  'defaultOrder': 'asc',
  'extraParams': "&space=${doc.space}"
})

With one class ( 'className': 'MySpace.MyClass',) my livetable work perfectly 
but display only documents 'linked' with this class (doc with 'MySpace.MyClass' 
object)
If I use 'className': ''  (empty), livetable show all document on the space but 
my select list are not filled.
I tried  'TypeFiche_RO': {"type":"list","size":10,'class': 'MySpace.MyClass' } 
with empty 'classname', but if I select a value in my select list, only  
document 'linked' with this class are displayed.
I tried topFilters      options (HTML fragment that will be placed in a "top 
filter" area in the same fashion as the Tag Cloud filter) 'topFilters': '<input 
type="text" size="15" name="doc.name" value="">', but no document will 
displayed. I didn't managed either (I don't know how to choose the field who is 
filtered by the new input tag)

I don't know if someone understand my problem ( livetable with multiple class 
source), but every magics tricks are welcome to help me.

Thxs.

Pascal B



_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to