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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user