[xwiki-devs] property "List of users"
Hi All! I am trying to solve next task: I need to compare login of current user (current session login) and login of user which is stored in the object, which is added to the page. To get first value i use next function: xwiki.getUserName(xcontext.getUser(), false) it is working good! to store second value i have created object ( which is linked to page) and added property "List of users" into it. I can input username into this object, but i cannot get back it. i try to get it via ${xwiki.getUserName(MyObject.display("ApproverList", "view"), true) but it doesn't work ( it returns link to the user profile image) i have tried other but they don't work too. Can somebody help me and explain, how to get user name from this object?
Hi, Sorry have no wiki to check, but should be something like: $MyObject.get('ApproverList').getValue() Or $MyObject.display('ApproverList', 'view') Br, Jeremie Le 15 avr. 2013 10:03, "Добровольский Евгений" <[email protected]> a écrit :
Hi All!
I am trying to solve next task: I need to compare login of current user (current session login) and login of user which is stored in the object, which is added to the page.
To get first value i use next function: xwiki.getUserName(xcontext.getUser(), false) it is working good!
to store second value i have created object ( which is linked to page) and added property "List of users" into it. I can input username into this object, but i cannot get back it. i try to get it via ${xwiki.getUserName(MyObject.display("ApproverList", "view"), true) but it doesn't work ( it returns link to the user profile image) i have tried other but they don't work too.
Can somebody help me and explain, how to get user name from this object? _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Mon, Apr 15, 2013 at 9:48 PM, Jeremie BOUSQUET <[email protected]> wrote:
Hi,
Sorry have no wiki to check, but should be something like:
$MyObject.get('ApproverList').getValue()
Actually it's $MyObject.getProperty('ApproverList').value if you want the raw value. Hope this helps, Marius
Or $MyObject.display('ApproverList', 'view')
Br, Jeremie Le 15 avr. 2013 10:03, "Добровольский Евгений" <[email protected]> a écrit :
Hi All!
I am trying to solve next task: I need to compare login of current user (current session login) and login of user which is stored in the object, which is added to the page.
To get first value i use next function: xwiki.getUserName(xcontext.getUser(), false) it is working good!
to store second value i have created object ( which is linked to page) and added property "List of users" into it. I can input username into this object, but i cannot get back it. i try to get it via ${xwiki.getUserName(MyObject.display("ApproverList", "view"), true) but it doesn't work ( it returns link to the user profile image) i have tried other but they don't work too.
Can somebody help me and explain, how to get user name from this object? _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi your solutions don't work both solutions return link to the user profile image :( -- View this message in context: http://xwiki.475771.n2.nabble.com/property-List-of-users-tp7584692p7584716.h... Sent from the XWiki- Dev mailing list archive at Nabble.com.
On Tue, Apr 16, 2013 at 5:49 PM, evgdobr <[email protected]> wrote:
Hi
your solutions don't work both solutions return link to the user profile image :(
I'm pretty sure it works fine because I tested before: $xwiki.getDocument('XWiki.Admin').getObject('XWiki.XWikiRights', 1).getProperty('users').value outputs XWiki.Admin without any link.
-- View this message in context: http://xwiki.475771.n2.nabble.com/property-List-of-users-tp7584692p7584716.h... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Thank You, Marius! i have understood my mistake I used another function instead getProperty, now it is ok, thank You ! -- View this message in context: http://xwiki.475771.n2.nabble.com/property-List-of-users-tp7584692p7584737.h... Sent from the XWiki- Dev mailing list archive at Nabble.com.
participants (4)
-
evgdobr -
Jeremie BOUSQUET -
Marius Dumitru Florea -
Добровольский Евгений