Hello Paul, Thanks a lot...That was all I wanted... :) Thanks Sarthak Gupta
On Mon, Jun 26, 2017 at 9:28 PM, "Expédition Est (Paris Match)" < [email protected]> wrote: > Oh, you mean to go from a string to a reference? > That seems well documented: > https://network.xwiki.com/xwiki/bin/view/DocXE741En/ModelModule > paul > > > > On 26 Jun 2017, at 16:26, Sarthak Gupta <[email protected]> > wrote: > > > > Hello Paul, > > > > Just to be clear, the transformation searches for the word on the wiki > > pages which matches the glossary entries already present in glossary > space. > > Here 'doc' is a glossary item present in 'Glossary' space. The > > transformation searches for the word 'doc' on the wiki pages and creates > > the link to the 'doc' page present in 'Glossary' space i.e I want to > > navigate to 'Glossary.doc'(space.page). > > In my code, I know the name of the page('doc'), and I want to navigate to > > the page 'doc' present in 'Glossary' Space. And I am not able to find > out, > > how to do that? Is there some method for doing this? > > > > The highlighted code in the Pastebin is totally wrong and I want a > > replacement for it. > > > > Thanks > > Sarthak Gupta > > > > On Mon, Jun 26, 2017 at 5:20 PM, "Expédition Est (Paris Match)" < > > [email protected]> wrote: > > > >> Hey Sarthak, > >> > >> Is “Glossary.doc” an attachment?? > >> “located in XWiki” is like saying “it’s in your shelf”. It’s a bit > >> unprecise! > >> References are to pages with a space and a name; attachments have a name > >> after this. > >> > >> If you want to reference the same page you probably need to start with > the > >> current page’s reference which the context should provided you > (normally in > >> the form of the “doc” variable). > >> > >> Any reason you did not start with a groovy or velocity script? At least > >> the variable would be there. > >> > >> paul > >> > >> > >>> On 26 Jun 2017, at 11:12, Sarthak Gupta <[email protected]> > >> wrote: > >>> > >>> Hello, > >>> I have written some java code on 'transformations'. > >>> https://pastebin.com/CCHsg0hq > >>> > >>> In order to navigate to the required page, I am using the method > >>> 'ResourceReference' (highlighted region-line 86,87). Now I want to > >> navigate > >>> to the page named 'Glossary.doc' which is located in XWiki. I know my > >>> current implementation is wrong and I have been struggling for 2 days > to > >>> find the right implementation/method. > >>> Is there any method that I can use which can return me the String > >>> 'Glossary.doc' so that I can create a linkReference to the same page in > >>> XWiki? > >>> > >>> Thanks > >>> Sarthak Gupta > >> > >> > >

