on 03-23-2006 6:59 AM
Hi,
We have a custom service which returns a string.We would like to display the string in the masthead.
I have added the sharing reference to the custom service and using the following code to get the String
private String GetOrgCode(IPortalComponentRequest request){
IUserContext userContext = request.getUser();
IConnectionService cgservice =(IConnectionService) PortalRuntime.getRuntimeResources().getService(IConnectionService.KEY);
String s=cgservice.getOrgDesc(userContext.getLogonUid());
return s;
}
And display the string using <%=GetOrgCode(componentRequest)%>
The masthead on the portal does not display the string and when I preview the masthead from portal content I am getting an error which says:
Caused by: com.sapportals.portal.prt.component.PortalComponentException: Error occurs during the compilation of java generated from the jsp
What is wrong in the code or Have I missed something?
Thanks,
Suparna
Hi,
The componentRequest variable won't be visible in jsp.
Invoke the method GetOrgCode() from ur portal component,pass the current user as an argument and see if u get the string displayed in the masthead.
Hope it helps.
Regards,
M.Subathra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subathra,
Thanks for your reply!
I managed to solve the problem.I have awarded you points.
Daniel,
We can define funtions.
Thanks,
Suparna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suparna,
I don't believe you can define a function in JSP.
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.