| java.lang.Object net.jforum.view.forum.common.ViewCommon
ViewCommon | final public class ViewCommon (Code) | | author: Rafael Steil version: $Id: ViewCommon.java,v 1.32 2007/09/20 16:07:08 rafaelsteil Exp $ |
contextToLogin | public static String contextToLogin()(Code) | | Prepares the template context to show the login page, using the current URI as return path.
TemplateKeys.USER_LOGIN |
contextToLogin | public static String contextToLogin(String returnPath)(Code) | | Prepares the template context to show the login page, using "returnPath" as return path
Parameters: returnPath - the URI to use as return path TemplateKeys.USER_LOGIN |
contextToPagination | public static void contextToPagination(int start, int totalRecords, int recordsPerPage)(Code) | | Prepared the user context to use data pagination.
The following variables are set to the context:
- totalPages - total number of pages
- recordsPerPage - how many records will be shown on each page
- totalRecords - number of records fount
- thisPage - the current page being shown
- start -
Parameters: start - int Parameters: totalRecords - int Parameters: recordsPerPage - int |
espaceHtml | public static String espaceHtml(String contents)(Code) | | Escapes < by < and > by >
Parameters: contents - the string to parse the new string |
formatDate | public static String formatDate(Date date)(Code) | | Formats a date using the pattern defined in the configuration file.
The key is the value of
net.jforum.util.preferences.ConfigKeys.DATE_TIME_FORMAT Parameters: date - the date to format the string with the formated date |
getForumLink | public static String getForumLink()(Code) | | Gets the forum base link.
The returned link has a trailing slash
The forum link, with the trailing slash |
getStartPage | public static int getStartPage()(Code) | | Returns the initial page to start fetching records from.
The initial page number |
prepareUserSignature | public static void prepareUserSignature(User u)(Code) | | Parse the user's signature, to make it proper to visualization
Parameters: u - the user instance |
replaceAll | public static String replaceAll(StringBuffer sb, String what, String with)(Code) | | Replaces some string with another value
Parameters: sb - the StrinbBuilder with the contents to work on Parameters: what - the string to be replaced Parameters: with - the new value the new string |
|
|