[xwiki-users] How do i know what's methods in $xwiki
Hi, can anybody help me ? How do i know what's methods in $xwiki? Is there any api doc? -- View this message in context: http://n2.nabble.com/How-do-i-know-what-s-methods-in-xwiki-tp4227025p4227025... Sent from the XWiki- Users mailing list archive at Nabble.com.
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide Mayby you are looking for that? :-) hel. tomcatlee wrote:
Hi, can anybody help me ?
How do i know what's methods in $xwiki? Is there any api doc?
----- semantic-web.hel.at hel@hel.at -- View this message in context: http://n2.nabble.com/How-do-i-know-what-s-methods-in-xwiki-tp4227025p4227047... Sent from the XWiki- Users mailing list archive at Nabble.com.
Here is the XWiki api doc. http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D2.0... Here is the entire javadoc for the public api. http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-2.0.5-j... Document maps to $doc Context maps to $xcontext (or $context if using xwiki syntax 1.0) Good luck, remember that velocity converts everything to Strings so something like #set($x = 1) $xwiki.methodRequiringInteger($x) will fail because velocity turns 1 the number into "1" the 1 character string I think $mathtool has a way to convert it back. Caleb James DeLisle tomcatlee wrote:
Hi, can anybody help me ?
How do i know what's methods in $xwiki? Is there any api doc?
Thanks. got it $xwiki is an instance com.xpn.xwiki.api.XWiki class,I throught it is an instance of com.xpn.xwiki.XWiki Caleb James DeLisle wrote:
Here is the XWiki api doc. http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D2.0...
Here is the entire javadoc for the public api. http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-2.0.5-j...
Document maps to $doc Context maps to $xcontext (or $context if using xwiki syntax 1.0)
Good luck, remember that velocity converts everything to Strings so something like #set($x = 1) $xwiki.methodRequiringInteger($x) will fail because velocity turns 1 the number into "1" the 1 character string I think $mathtool has a way to convert it back.
Caleb James DeLisle
tomcatlee wrote:
Hi, can anybody help me ?
How do i know what's methods in $xwiki? Is there any api doc?
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
-- View this message in context: http://n2.nabble.com/How-do-i-know-what-s-methods-in-xwiki-tp4227025p4227127... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 12/29/2009 11:02 AM, tomcatlee wrote:
Thanks.
got it $xwiki is an instance com.xpn.xwiki.api.XWiki class,I throught it is an instance of com.xpn.xwiki.XWiki
$xwiki.class will print the exact classname. Works for every variable. When something doesn't work, although it should, check that each variable has the class you think they do.
Caleb James DeLisle wrote:
Here is the XWiki api doc. http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D2.0...
Here is the entire javadoc for the public api. http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-2.0.5-j...
Document maps to $doc Context maps to $xcontext (or $context if using xwiki syntax 1.0)
Good luck, remember that velocity converts everything to Strings so something like #set($x = 1) $xwiki.methodRequiringInteger($x) will fail because velocity turns 1 the number into "1" the 1 character string I think $mathtool has a way to convert it back.
Caleb James DeLisle
tomcatlee wrote:
Hi, can anybody help me ?
How do i know what's methods in $xwiki? Is there any api doc?
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On 12/29/2009 10:33 AM, Caleb James DeLisle wrote:
Good luck, remember that velocity converts everything to Strings so something like #set($x = 1) $xwiki.methodRequiringInteger($x) will fail because velocity turns 1 the number into "1" the 1 character string I think $mathtool has a way to convert it back.
No, that's not true. {{velocity}} #set($x = 1) $x.class {{/velocity}} Prints: class java.lang.Integer -- Sergiu Dumitriu http://purl.org/net/sergiu/
That's interesting, I had that issue when calling search with start and nb #if($request.startAt) #set($start = $mathtool.toInteger($request.startAt)) #else #set($start = 0) #end #set ($results = $xwiki.xWiki.getHibernateStore().search($query, 50, $mathtool.toInteger($start), $context.context)) With $start rather than $mathtool.toInteger($start) it failed. Caleb Sergiu Dumitriu wrote:
On 12/29/2009 10:33 AM, Caleb James DeLisle wrote:
Good luck, remember that velocity converts everything to Strings so something like #set($x = 1) $xwiki.methodRequiringInteger($x) will fail because velocity turns 1 the number into "1" the 1 character string I think $mathtool has a way to convert it back.
No, that's not true.
{{velocity}} #set($x = 1) $x.class {{/velocity}}
Prints:
class java.lang.Integer
On 12/29/2009 01:56 PM, Caleb James DeLisle wrote:
That's interesting, I had that issue when calling search with start and nb
#if($request.startAt)
$request.startAt is $request.get('startAt') which is XWikiServletRequest.get(String) which always returns a String.
#set($start = $mathtool.toInteger($request.startAt)) #else #set($start = 0) #end #set ($results = $xwiki.xWiki.getHibernateStore().search($query, 50, $mathtool.toInteger($start), $context.context))
With $start rather than $mathtool.toInteger($start) it failed.
Caleb
Sergiu Dumitriu wrote:
On 12/29/2009 10:33 AM, Caleb James DeLisle wrote:
Good luck, remember that velocity converts everything to Strings so something like #set($x = 1) $xwiki.methodRequiringInteger($x) will fail because velocity turns 1 the number into "1" the 1 character string I think $mathtool has a way to convert it back.
No, that's not true.
{{velocity}} #set($x = 1) $x.class {{/velocity}}
Prints:
class java.lang.Integer
-- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (4)
-
Caleb James DeLisle -
hel-o -
Sergiu Dumitriu -
tomcatlee