public class ListTagHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PAGE_ACTION |
static java.lang.String |
PAGE_LIST |
static java.lang.String |
PARENT_URL |
Modifier and Type | Method and Description |
---|---|
static void |
bindSetDeclTo(java.lang.String listName,
RhnSetDecl decl,
javax.servlet.ServletRequest request)
Stores the declaration information of an rhnSet
so as to be used by the list tag while
rendering a set.
|
static void |
bindSetDeclTo(java.lang.String listName,
java.lang.String label,
javax.servlet.ServletRequest request)
Stores the declaration information of an rhnSet
so as to be used by the list tag while
rendering a set.
|
static java.lang.String[] |
getAll(java.lang.String listName,
javax.servlet.http.HttpServletRequest request)
Returns the values of all the row items in a given list
This is useful for example in diff'ing between the result set
and the selected items on a page.
|
static java.lang.String |
getFilterValue(javax.servlet.ServletRequest request,
java.lang.String uniqueName)
returns the value that the list is being filtered upon.
|
static java.lang.String |
getListAction(java.lang.String listName,
javax.servlet.http.HttpServletRequest request)
Checks if any of the list actions were clicked like
selectAll, unselectAll update set, pagination buttons (in which
page_action will be returned)..
|
static java.lang.String |
getObjectId(java.lang.Object current)
Returns the object id given an object
deals with selectable/identifiable objects
or uses hashcode for general
|
static int |
getPageNumber(java.lang.String listName,
javax.servlet.http.HttpServletRequest request)
Gets the current page number for the named list
This is zero based
|
static java.lang.String |
getRadioSelection(java.lang.String listName,
javax.servlet.http.HttpServletRequest request)
Returns the value of the selected radio button
Applicable if you are using RadioColumnTag (rl:radiocolumn)
|
static java.lang.String[] |
getSelected(java.lang.String listName,
javax.servlet.http.HttpServletRequest request)
Returns the values of all selected checkboxes
|
static boolean |
isParentAnElement(javax.servlet.ServletRequest request,
java.lang.String uniqueName)
returns true if the list that is being filtered upon is allowed to
to treat the parent as an element (always true for normal list)
|
static java.lang.String |
lookupSetDeclFor(java.lang.String listName,
javax.servlet.ServletRequest request)
Returns a set declaration associated to this list
if it was previously bound.
|
static java.lang.String |
makeRowId(java.lang.String listName,
java.lang.Object current)
Makes the tr row ids useful especially for expandable row renderers.
|
static void |
selectRadioValue(java.lang.String listName,
java.lang.String selectionKey,
javax.servlet.http.HttpServletRequest request)
Given a list and a value the following method preselects
a value in the list.
|
static void |
setSelectedAmount(java.lang.String listName,
int amount,
javax.servlet.http.HttpServletRequest request)
Stores how many objects are selected for use by the list tag
|
public static final java.lang.String PARENT_URL
public static final java.lang.String PAGE_LIST
public static final java.lang.String PAGE_ACTION
public static void bindSetDeclTo(java.lang.String listName, RhnSetDecl decl, javax.servlet.ServletRequest request)
listName
- name of listdecl
- the set declaration to bindrequest
- current HttpServletRequestpublic static void bindSetDeclTo(java.lang.String listName, java.lang.String label, javax.servlet.ServletRequest request)
listName
- name of listlabel
- the set declaration to bindrequest
- current HttpServletRequestpublic static java.lang.String lookupSetDeclFor(java.lang.String listName, javax.servlet.ServletRequest request)
listName
- the name of the list to who holds the set.
Note: this must be a Unique Name ..
See bindSetDeclTo method for more info.request
- the servlet request objectpublic static void setSelectedAmount(java.lang.String listName, int amount, javax.servlet.http.HttpServletRequest request)
listName
- name of listamount
- amount of items selectedrequest
- current HttpServletRequestpublic static int getPageNumber(java.lang.String listName, javax.servlet.http.HttpServletRequest request)
listName
- name of listrequest
- active HttpServletRequestpublic static java.lang.String getRadioSelection(java.lang.String listName, javax.servlet.http.HttpServletRequest request)
listName
- name of listrequest
- active HttpServletRequestpublic static void selectRadioValue(java.lang.String listName, java.lang.String selectionKey, javax.servlet.http.HttpServletRequest request)
listName
- name of the listselectionKey
- the selection key uniquely identifying
the item to be selected.request
- the active http request.public static java.lang.String[] getSelected(java.lang.String listName, javax.servlet.http.HttpServletRequest request)
listName
- name of listrequest
- active HttpServletRequestpublic static java.lang.String[] getAll(java.lang.String listName, javax.servlet.http.HttpServletRequest request)
listName
- name of listrequest
- active HttpServletRequestpublic static java.lang.String getListAction(java.lang.String listName, javax.servlet.http.HttpServletRequest request)
listName
- name of listrequest
- active HttpServletRequestpublic static java.lang.String getFilterValue(javax.servlet.ServletRequest request, java.lang.String uniqueName)
request
- the request to look inuniqueName
- the unique (hashed) name for the listpublic static boolean isParentAnElement(javax.servlet.ServletRequest request, java.lang.String uniqueName)
request
- the request to look inuniqueName
- the unique (hashed) name for the listpublic static java.lang.String getObjectId(java.lang.Object current)
current
- the current objectpublic static java.lang.String makeRowId(java.lang.String listName, java.lang.Object current)
listName
- the name of the listcurrent
- the object to be expanded on