[Building Sakai] how to get ToolManager object in XsltRenderContext in XSL-PORTAL

Steve Swinsburg steve.swinsburg at gmail.com
Tue Jan 17 20:46:32 PST 2012


Hi,

The bean ref for the ToolManager should be:

<property name="toolManager" ref="org.sakaiproject.tool.api.ToolManager" />

You have site.api.

Also, note that you can use the javax.annotation.Resource annotation to inject the bean, you don't need any Spring XML or even a setter/getter.

@Resource(name="org.sakaiproject.tool.api.ToolManager")
private ToolManager toolManager;

regards,
Steve

On 18/01/2012, at 3:37 PM, rash143 wrote:

> 
> hi All,
> 
> i have tried to get ToolManager object in XsltRenderContext by using
> web-config.xml...
> 
> 
> i have tried in this way...
> 
> step-1;
> 
>   <bean id="org.sakaiproject.portal.xsltcharon.impl.XsltRenderContext"
> singleton="false"
>         class="org.sakaiproject.portal.xsltcharon.impl.XsltRenderContext">
>         <property name="renderEngine"
> ref="org.sakaiproject.portal.api.PortalRenderEngine.xslt"/>
>         <property name="userDirectoryService"
> ref="org.sakaiproject.user.api.UserDirectoryService"/>
>         <property name="siteService"
> ref="org.sakaiproject.site.api.SiteService"/>
>       <property name="toolManager"
> ref="org.sakaiproject.site.api.ToolManager"/>
>   </bean>
> 
> step-2;
> 
> create a setter and getter method in XsltRenderContext for this toolManager
> property...
> 
> step-3;
> 
> we have called getInstance method in ToolManager that was available in cover
> , with in  XsltRenderContext constructor
> 
> 
> i have followed these steps..even though i am not able to get the object of
> ToolManager..
> i have found userDirectoryService and SiteService objects or coming in the
> same way
> 
> can you please guide me ,do i followed the same process or is there any
> mistake ....
> 
> Thanks in Advance...
> 
> Thanks & Regards,
> Shaik Rasheed
> 
> 
> -- 
> View this message in context: http://old.nabble.com/how-to-get-ToolManager-object-in-XsltRenderContext-in-XSL-PORTAL-tp33158988p33158988.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120118/360b672d/attachment.html 


More information about the sakai-dev mailing list