Hi, The method you are mentioning is used to list the available options, thus to run the query. The code you mention with the comment was added in order to make sure that if you are on wiki A and you are getting objects from a document in wiki B (through velocity for example) and you want to display those objects from wiki B, then the DBList properties of those objects will run their queries on wiki B (where their class comes from) and not in wiki A (where they are called from/displayed).
I also tried to do something similar to what you want, but found that this is not yet supported by DBList properties. What you could do at this point is to have a custom displayer for your property that runs the query on the right wiki and displays the current value(s) and the possible values. Hope this helps, Eduard On Tue, Mar 17, 2015 at 3:32 PM, Peter Huisman <[email protected]> wrote: > Hi, > > I am looking for a solution for the following situation. > > I have 2 wiki's. The fist one (ref: MD) contains "Master Data". The second > one (ref: UD) contains "User Data". I have Classes in UD that use data from > the MD. The way to connect them is using DBList. I am however not able to > compose a HQL query that enables me to select a different Wiki to run the > query on. I know it is possible to select the Wiki in Velocity but until > now, that didn't help me. In the Github code (the getDBList method in the > DBListClass.java) a comment is included just before a statement: > > // The DBlist may come from an other wiki > StringwikiName =getReference().extractReference(EntityType. > WIKI).getName(); > > This might indicate that selecting a wiki might be an option when getting > a DBList. > > Anybody knows how to solve this problem (without replicating the data from > MD in UD ;-))? Any additional suggestions are welcome. > > Thanks, > > Peter > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
