[Building Sakai] take the value of site_id

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Wed May 20 00:33:36 PDT 2009


That looks ok, but it's a two step setup. Do you have the toolManager  
bean injected into your impl in your components.xml? Post  
components.xml as well, or any other spring config you have in pack/ 
src/webapp/WEB-INF/*.xml


cheers,
Steve


On 20/05/2009, at 12:19 AM, menjuanpablo wrote:

>
> my externallogicimpl is
>
> public class ExternalLogicImpl implements ExternalLogic {
>
> 	private static Log log = LogFactory.getLog(ExternalLogicImpl.class);
>
> 	private FunctionManager functionManager;
> 	public void setFunctionManager(FunctionManager functionManager) {
> 		this.functionManager = functionManager;
> 	}
> 	
> 	private ToolManager toolManager;
> 	public void setToolManager(ToolManager toolManager) {
> 		this.toolManager = toolManager;
> 	}
> 	public String getCurrentSiteId(){
> 		return toolManager.getCurrentPlacement().getContext();
> 		}
> i take the toolManager defined above, but i don't know if this  
> function is
> ok, actually i don't know if this toolManager is ok
>
>
>
> Steve Swinsburg-2 wrote:
>>
>> Ok in ExternalLogicImpl, where/how have you defined what toolManager
>> actually is.
>>
>> What is the error you get? Can you have a look in catalina.out and
>> paste the appropriate lines here?
>>
>> cheers.
>>
>>
>>
>>
>> On 20/05/2009, at 12:01 AM, menjuanpablo wrote:
>>
>>>
>>> Hi,
>>> in the externallogicimpl i created this function
>>>               public String getCurrentSiteId(){
>>> 		     return toolManager.getCurrentPlacement().getContext();
>>> 		}
>>> and in my jsp page i created a externallogicimpl objetc to show the
>>> siteid
>>>
>>>  <%! String aaa;
>>>       ExternalLogicImpl eli=new ExternalLogicImpl();%>
>>>  <% aaa = eli.getCurrentSiteId(); %>
>>>  <%=aaa %>
>>> but, when I build and run tool in sakai this generated a error. 	
>>> I'm doing well?
>>>
>>>
>>>
>>> Steve Swinsburg-2 wrote:
>>>>
>>>> Hi,
>>>>
>>>> What was the problem? Was it a null pointer? If so, how have you  
>>>> set
>>>> toolManager? Show us some code.
>>>>
>>>> cheers,
>>>> Steve
>>>>
>>>> On 19/05/2009, at 10:46 PM, menjuanpablo wrote:
>>>>
>>>>>
>>>>> hi,
>>>>> I tried with this function
>>>>>
>>>>> public String getCurrentSiteId(){
>>>>> 	return toolManager.getCurrentPlacement().getContext();
>>>>> }
>>>>>
>>>>> to return the actual siteId, but this generated a problem
>>>>> are there other form to return the siteid ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/take-the-value-of-site_id-tp23525450p23624982.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"
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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"
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/take-the-value-of-site_id-tp23525450p23625987.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"
>>
>>
>>
>> _______________________________________________
>> 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"
>>
>
> -- 
> View this message in context: http://www.nabble.com/take-the-value-of-site_id-tp23525450p23626208.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 --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090520/fe4a1539/attachment.bin 


More information about the sakai-dev mailing list