Le 20 sept. 2010 à 08:44, Raluca Stavro a écrit :

>>> If you're looking for the user's "common name" instead of the user name, 
>>> you might want to look at
>>> $xwiki.getUserName
>>> http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/api/XWiki.html#getUserName%28java.lang.String%29
>>> 
>>> 
>> Please, as $context is a class and getUser() is a method of that class,
>> what is .substring()?
> 
> $context.getUser() returns a String representing the full name of the
> current user document (ex: "XWiki.RicardoRodriguez").
> This is why, all the String methods can be applied on the returned value

At debugging time, I make heavy use of

  $xxxx.getClass()
or the failsafe variant:
  $!xxxx.getClass() 

(which cannot be used as $xxxx.class) so as to recognize the class of an object 
hence know the available properties.
Of course, the javadoc also helps.

paul


_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to