[Building Sakai] why i can't use sakai service in my app :( ?

Small Cat shadowless4288 at gmail.com
Thu Oct 15 22:58:39 PDT 2009


Ok,
In ExternalLogic class, I add a function
*public String getOneSite(String locationId);*

In ExternalLogicImpl class ( I copy from function getLocationTittle )
*public String getOneSite(String locationId) {
        String title = null;
        try {
            Site site = siteService.getSite(locationId);
            title = site.getTitle();
        } catch (IdUnusedException e) {
            log.warn("Cannot get the info about locationId: " + locationId);
            title = "----------";
        }
        return title;
    }*
In main class, I call it
*public String getOneSiteTitle(){

        return
externalLogic.getOneSite(externalLogic.getCurrentALocationId());
        //return
externalLogic.getLocationTitle(externalLogic.getCurrentALocationId());
    }*
In .jsp file ( I use JSF to presentation )
*<sakai:instruction_message value="Hello,
#{MyportfoliosBean.oneSiteTitle}"/>*

Thank you very much ,

2009/10/16 Steve Swinsburg <steve.swinsburg at gmail.com>

> Hi Tran,
>
> Can you post your API and Impl classes, and your Spring config
> (components.xml) and we'll take a look. I assume from the error log that it
> is the getOneSite method that you are trying to call?
>
> cheers,
> Steve
>
>
>
> On 16/10/2009, at 3:56 PM, Small Cat wrote:
>
>  Dear all,
>> I used sakai app builder to generate a full CRUD application for sakai
>> 2.5.4 . It can run in sakai with no error.
>> In ExternalLogic class and ExternalLogicImpl class , i add a function. In
>> this function, I used some APIs of SiteService, but it has some error when
>> run in Sakai :(.
>> Now, I test again, by copy a function ,change it's name ( and change it's
>> name in ExternalLogic ) and use it, but it has error  when I run it in Sakai
>> portal>"<.
>> I don't understand, with same function,  original function can run, but
>> copy function can't run :(.
>> I feel it's very hard to use sakai service for my application :(.
>> Please help me !!!!
>>
>>
>>
>> --
>> Regards,
>> Tran Trung Kien
>> <error.txt>_______________________________________________
>> 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"
>>
>
>


-- 
Regards,
Tran Trung Kien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091016/5af1901b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExternalLogic.java
Type: application/octet-stream
Size: 2429 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091016/5af1901b/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExternalLogicImpl.java
Type: application/octet-stream
Size: 5746 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091016/5af1901b/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: components.xml
Type: text/xml
Size: 1627 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091016/5af1901b/attachment.xml 


More information about the sakai-dev mailing list