a more permanent fix to that Find problem - moved the "static" functions

defined in the JSP to the FindData object and eliminated the InternalStateError
throw.  Lesson here, kids...just because you CAN do a thing doesn't mean you
SHOULD do a thing.
This commit is contained in:
Eric J. Bowersox
2001-11-19 09:16:11 +00:00
parent 6ec1986ba6
commit a376aad722
2 changed files with 44 additions and 44 deletions

View File

@@ -390,4 +390,41 @@ public class FindData implements JSPRender, SearchMode
} // end getCatJumpLink
public static String getCommunityHostName(CommunityContext comm)
{
try
{ // get the host name for the specified community
UserProfile prof = comm.getHostProfile();
return prof.getUserName();
} // end try
catch (DataException e)
{ // just return NULL if an exception strikes
return null;
} // end catch
} // end getCommunityHostName
public static int getCommunityMemberCount(CommunityContext comm)
{
try
{ // get the member count for the specified community
return comm.getMemberCount();
} // end try
catch (DataException e)
{ // just return -1 if an exception strikes
return -1;
} // end catch
} // end getCommunityMemberCount
public static String getActivityString(CommunityContext comm, RenderData rdat)
{
return rdat.getActivityString(comm.getLastAccessDate());
} // end getActivityString
} // end class FindData