// Path: src/java/com/idega/block/staff/business/StaffUserBusiness.java
// public interface StaffUserBusiness extends UserBusiness {
// 	
// 	public static final String PARAMETER_USER_ID = "st_user_id";
// 	
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getGroups
// 	 */
// 	public Collection getGroups(Group parentGroup)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getUserEducation
// 	 */
// 	public String getUserEducation(User user, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getUserTitle
// 	 */
// 	public String getUserTitle(User user, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getUserArea
// 	 */
// 	public String getUserArea(User user, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getBeganWork
// 	 */
// 	public Date getBeganWork(User user) throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#storeStaffUser
// 	 */
// 	public void storeStaffUser(User user, String education, String title,
// 			String area, Date beganWork, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// }
// 
// Path: src/java/com/idega/block/staff/business/StaffUserSession.java
// public interface StaffUserSession extends IBOSession {
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#setUser
// 	 */
// 	public void setUser(User user) throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#getUser
// 	 */
// 	public User getUser() throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#setUserID
// 	 */
// 	public void setUserID(int userID) throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#getUserID
// 	 */
// 	public int getUserID() throws java.rmi.RemoteException;
// 
// }


import java.rmi.RemoteException;
import com.idega.block.staff.business.StaffUserBusiness;
import com.idega.block.staff.business.StaffUserSession;
import com.idega.business.IBOLookup;
import com.idega.business.IBOLookupException;
import com.idega.business.IBORuntimeException;
import com.idega.core.accesscontrol.business.NotLoggedOnException;
import com.idega.idegaweb.IWApplicationContext;
import com.idega.idegaweb.IWBundle;
import com.idega.idegaweb.IWResourceBundle;
import com.idega.idegaweb.IWUserContext;
import com.idega.presentation.Block;
import com.idega.presentation.IWContext;
import com.idega.presentation.PresentationObject;
import com.idega.user.data.User;
				userID = Integer.parseInt(iwc.getParameter(StaffUserBusiness.PARAMETER_USER_ID));
			}
			catch (NumberFormatException e) {
				userID = -1;
			}
		}
		else {
			try {
				userID = iwc.getCurrentUserId();
			}
			catch (NotLoggedOnException nloe) {
				userID = -1;
			}
		}

		if (userID != -1 && userID != getSession(iwc).getUserID()) {
			getSession(iwc).setUserID(userID);
			getSession(iwc).setUser(getBusiness(iwc).getUser(userID));
		}
	}
	
	protected StaffUserBusiness getBusiness(IWApplicationContext iwac) {
		try {
			return (StaffUserBusiness) IBOLookup.getServiceInstance(iwac, StaffUserBusiness.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

// Path: src/java/com/idega/block/staff/business/StaffUserBusiness.java
// public interface StaffUserBusiness extends UserBusiness {
// 	
// 	public static final String PARAMETER_USER_ID = "st_user_id";
// 	
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getGroups
// 	 */
// 	public Collection getGroups(Group parentGroup)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getUserEducation
// 	 */
// 	public String getUserEducation(User user, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getUserTitle
// 	 */
// 	public String getUserTitle(User user, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getUserArea
// 	 */
// 	public String getUserArea(User user, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#getBeganWork
// 	 */
// 	public Date getBeganWork(User user) throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserBusinessBean#storeStaffUser
// 	 */
// 	public void storeStaffUser(User user, String education, String title,
// 			String area, Date beganWork, Locale locale)
// 			throws java.rmi.RemoteException;
// 
// }
// 
// Path: src/java/com/idega/block/staff/business/StaffUserSession.java
// public interface StaffUserSession extends IBOSession {
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#setUser
// 	 */
// 	public void setUser(User user) throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#getUser
// 	 */
// 	public User getUser() throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#setUserID
// 	 */
// 	public void setUserID(int userID) throws java.rmi.RemoteException;
// 
// 	/**
// 	 * @see com.idega.block.staff.business.StaffUserSessionBean#getUserID
// 	 */
// 	public int getUserID() throws java.rmi.RemoteException;
// 
// }


// Path: src/java/com/idega/block/staff/presentation/item/StaffUserItem.java
import java.rmi.RemoteException;
import com.idega.block.staff.business.StaffUserBusiness;
import com.idega.block.staff.business.StaffUserSession;
import com.idega.business.IBOLookup;
import com.idega.business.IBOLookupException;
import com.idega.business.IBORuntimeException;
import com.idega.core.accesscontrol.business.NotLoggedOnException;
import com.idega.idegaweb.IWApplicationContext;
import com.idega.idegaweb.IWBundle;
import com.idega.idegaweb.IWResourceBundle;
import com.idega.idegaweb.IWUserContext;
import com.idega.presentation.Block;
import com.idega.presentation.IWContext;
import com.idega.presentation.PresentationObject;
import com.idega.user.data.User;

				userID = Integer.parseInt(iwc.getParameter(StaffUserBusiness.PARAMETER_USER_ID));
			}
			catch (NumberFormatException e) {
				userID = -1;
			}
		}
		else {
			try {
				userID = iwc.getCurrentUserId();
			}
			catch (NotLoggedOnException nloe) {
				userID = -1;
			}
		}

		if (userID != -1 && userID != getSession(iwc).getUserID()) {
			getSession(iwc).setUserID(userID);
			getSession(iwc).setUser(getBusiness(iwc).getUser(userID));
		}
	}
	
	protected StaffUserBusiness getBusiness(IWApplicationContext iwac) {
		try {
			return (StaffUserBusiness) IBOLookup.getServiceInstance(iwac, StaffUserBusiness.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	protected StaffUserSession getSession(IWUserContext iwuc) {