On 25 Feb 2016 at 15:24:24, Eduard Moraru
(enygma2...@gmail.com(mailto:enygma2...@gmail.com)) wrote:
> Hi,
>
> On Thu, Feb 25, 2016 at 3:26 PM, pgregoire wrote:
>
> > Eduard Moraru wrote
> > > On Thu, Feb 25, 2016 at 12:31 PM, Eduard Moraru <
> >
> > > enygma2002@
> >
> > > >
> > > wrote:
> > >
> > >> Hi Phil,
> > >>
> > >> As you can read from the LiveTable Macro's documentation [1], the
> > >> "queryFilters" parameter is used to specify which (already registered)
> > >> query filter name to use in the query that is performed by the backend
> > of
> > >> the livetable macro that you are using. This is not the place where you
> > >> would add "WHERE" clauses, but it`s for the actual name of existing
> > query
> > >> filters (e.g. "unique", "hidden", etc. See [2] 5th bullet).
> > >>
[snip]
> > Now it does look like the extraParams option is what I'm looking for, but I
> > can't get that to work either.
> >
> > The documentation says
> > "all the objects that have a specific value for a property ("extraParams" :
> > "&yourProperty=yourValue" - note that in this particular case, yourProperty
> > has to be declared in the $columns array). "
> >
> > Here's what I did:
> > #set($columns = ["Version", "Name", "ReleaseDate"])
> > #set($columnsProperties = {
> > "Name": { "link" : "none" }
> > })
> > #set($options = {
> > "className":"Development.Resources.Version
> > Information.VersionInformationClass",
> > "tagCloud" : true,
> > "rowCount": 20,
> > "extraParams" : "&Version='4.0'"
> >
>
> You need to be aware that these paremeters are actually URL parameters that
> are sent to the livetable results page with javascript (when loading the
> livetable, switching to the next page, filtering, etc.), so you don`t need
> to quote the value.
>
> Assuming that "Version" is indeed the name of the property you want to
> filter by (and it's not the pretty name of the property; please check that.
> It would usually be lowercase. It needs to match both the class property
> name and the column name), it should just be:
> "extraParams" : "&Version=4.0"
>
> Note: If you need to have more complicated values in the extraParams
> option, you will need to escape the values by hand.
> Example:
> "extraParams" :
> "&$name1=$escapetool.url($value1)&name2=$escapetool.url($value2)", where
> $valueN would be "Value/with?URL&specific%characters”.
Maybe those additional info could be added to the Velocity Macro doc page so
that reading that page would be enough to understand how to use it? :)
Thanks
-Vincent
> Thanks,
> Eduard
>
> })
> > #livetable("4_0_VersionInformation" $columns $columnsProperties $options)
> >
> > Which would seem like it follows the documentation, but the list comes out
> > empty.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users