Menu application - Deprecated usage of getter [com.xpn.xwiki.api.Context.getUix]

Our logfiles are full with:

WARN  o.a.v.introspection            - Deprecated usage of getter [com.xpn.xwiki.api.Context.getUix] in Topmenu.WebHome@2,108
WARN  o.a.v.introspection            - Deprecated usage of getter [com.xpn.xwiki.api.Context.getUix] in Topmenu.WebHome@1,62

Topmenu has an object XWiki.UIExtensionClass. It’s content is:

{{velocity}}
#if ($xwiki.hasAccessLevel('view', $xcontext.user, $xcontext.uix.doc.documentReference))
{{menu type="horizontal fixedWidth" id="menu-horizontal-Menu-Test-WebHome"}}{{include reference="$xcontext.uix.doc.documentReference" /}}{{/menu}}
#end
{{/velocity}}

I think those lines are the reason for. Any suggestion how to rewrite this code to avoid the warnings in the log file?

Regards, Simpel

Since 14.1, the standard way to access the UI extensions contextual information is through the $uix binding (instead of $xcontext.uix).

1 Like