cancel
Showing results for 
Search instead for 
Did you mean: 

Unread mail in UWL (Universal Worklist)?

ChrisSolomon
Active Contributor
0 Kudos

Any ideas on how to display the number of unread messages in the user's UWL next to the link? Kinda like web email (ie. Yahoo) does. It would look like....

<u>Universal Worklist(15)</u>

where "15" would be the unread message count.

Ideas?

Thanks in advance!

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

did it help.

If so kindly close and reward points.

Thanks

Former Member
0 Kudos

Hello Cristopher et al,

You'll need to do a custom development. My suggestion is create a new Java iView (abstract portal component) wherein you use the UWL API (available from SPS 09 onwards)

This blog will help you get started: https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5450

Code you might need to use to show the number of unread items is below:

IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
			QueryResult result = itemManager.refreshCacheAndGetItems(uwlContext,null,null,null);
			int noOfItems = result.getTotalNumberOfItems();
ItemCollection collection = result.getItems();
			List list = collection.list();
			
			Item item = null;
			int totalTasksUnread = 0;

			for(int i=0;i<list.size();i++)
			{
				item = collection.get(i);
				if (item.isUnRead() == true)
					{	
						
						totalTasksUnread = totalTasksUnread + 1;
					}
                                               }

Hope this helped, if it did kindly consider rewarding points.

P.S. I'm also a fan of John Lennon (the Beatles actually)

Former Member
0 Kudos

Chris,

I have a similiar requirement to show the number of unread messages in UWL. have to got a solution for this? could you help me on this as always

John

Former Member
0 Kudos

Hi,

I am trying to use the UWL PAR file in eclipse to modify the components. I am not an Java expert, so i tried to modify the UWL namespace and when i looked for the class file which is under dist\PORTAL-INF\.. i couldn't open the class file to find out the gridlayout.

Do you know how to do that?

Any Idea?

Thank you

arun

Former Member
0 Kudos

what are you trying actually?

I guess uwl par is not supposed to be modified.

ChrisSolomon
Active Contributor
0 Kudos

ok...I was hoping while gone on vacation, someone would have some feedback. 😃

Here's what we are trying to do....within the tools area of the header area that the collaboration/KM links reside in (for example, "search"), we would like to display UWL folder/box info such as "tasks(23/1)" where the numbers next to the link would be the unread/new counts and so forth. Right now, we simply have a UWL link that just launches the UWL in a new window.

Sooooo upon inspection, I have located the com.sap.netweaver.bc.uwl.ui.UWLNavigation iView which is exaclty the functionality we need. However, I need to:

(a) set it to "link" style (instead of default "tree" style)

(b) show in the "tools area" as described

Any idea?

Thanks in advance!

Former Member
0 Kudos

Hi!

Sorry for being so late.

Well to create something similar for a customer, I created a new Portal Component which hooks up on the Universal Worklist Service

<property name="ServicesReference" value="com.sap.netweaver.bc.uwl"/>

Then I work my way into the service, and extract the list of items that are in the inbox, count them up and checks which ones are read.

This is served to a JSP page that renders it in an iView.

(this has been integrated into a new toolbar I build for the customer as well.)

Quite a cool solution, quite JAVA heavy.

Unfortunately I'm unsure if I'm allowed to reveal the code here.

Greetings