public class OwScriptTable extends Object
Utility class for Java Script supported HTML tables with selection and context menu.
In addition java script code needs to be included into the page. See uilevel<x>.js.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Field and Description |
---|---|
protected static String |
CHECKBOX_PREFIX |
protected static String |
CONTEXT_MENU_ICON_POSTFIX |
protected static String |
CONTEXT_MENU_LABEL_POSTFIX |
protected static String |
ROW_PREFIX_MULTISELECT |
protected static String |
ROW_PREFIX_SINGLESELECT |
Constructor and Description |
---|
OwScriptTable() |
Modifier and Type | Method and Description |
---|---|
static String |
getSelectableListCheckBoxName(String sTableId_p)
get the name of the checkbox in the selectable table
|
static String |
getSelectableListContextMenuID(String sTableId_p)
get the ID of the context menu in the table
|
static void |
writeSelectableListContextMenuEnd(String sTableId_p,
Writer w_p)
end context menu
|
static void |
writeSelectableListContextMenuStart(String sTableId_p,
Writer w_p,
String strClass_p)
write the start tag enclosing a context menu HTML
|
static void |
writeSelectableListContextMenuTREntry(String sTableId_p,
Writer w_p,
String sClassNamePrefix_p,
int iIndex_p,
String sEventURL_p,
String sFormName_p,
String sIcon_p,
String sLabel_p)
insert a menu item for the context menu
|
static void |
writeSelectableListEnableScript(String sTableId_p,
Writer w_p,
OwAppContext context_p)
enable the java script driven table
|
static void |
writeSelectableListHandlerScript(String sTableId_p,
Writer w_p,
String sJavaScriptCode_p)
insert a handler code that will be called if the user clicks a row
Use the following parameters inside your code
fIndex_p index of selected row
rownode_p selected TR tag
fSelected_p true = row was selected
|
static void |
writeSelectableListHeaderStart(String sTableId_p,
Writer w_p,
String strHeaderClass_p,
OwAppContext context_p)
write a TR table row start tag for the header that supports script driven table
|
static void |
writeSelectableListRowStart(Locale locale_p,
String sTableId_p,
Writer w_p,
int iIndex_p,
String strRowClass_p,
boolean fMultiselect_p)
write a TR table row start tag for each row that supports script driven table
|
static void |
writeSelectableListRowStart(Locale locale_p,
String sTableId_p,
Writer w_p,
int iIndex_p,
String strRowClass_p,
String strSelectedRowClass_p,
boolean fMultiselect_p,
boolean fSelected_p)
write a TR table row start tag for each row that supports script driven table
|
protected static final String CONTEXT_MENU_LABEL_POSTFIX
protected static final String CONTEXT_MENU_ICON_POSTFIX
protected static final String ROW_PREFIX_MULTISELECT
protected static final String ROW_PREFIX_SINGLESELECT
protected static final String CHECKBOX_PREFIX
public static String getSelectableListCheckBoxName(String sTableId_p)
sTableId_p
- String the ID that identifies the table if more tables are in one pagepublic static String getSelectableListContextMenuID(String sTableId_p)
sTableId_p
- String the ID that identifies the table if more tables are in one pagepublic static void writeSelectableListHandlerScript(String sTableId_p, Writer w_p, String sJavaScriptCode_p) throws IOException
sTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- WritersJavaScriptCode_p
- java script code to callIOException
public static void writeSelectableListEnableScript(String sTableId_p, Writer w_p, OwAppContext context_p) throws IOException
sTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- Writercontext_p
- OwAppContextIOException
public static void writeSelectableListRowStart(Locale locale_p, String sTableId_p, Writer w_p, int iIndex_p, String strRowClass_p, boolean fMultiselect_p) throws IOException
locale_p
- current localesTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- WriteriIndex_p
- int row indexstrRowClass_p
- String class namefMultiselect_p
- boolean true = table will allow multi selection, false = single selection onlyIOException
public static void writeSelectableListRowStart(Locale locale_p, String sTableId_p, Writer w_p, int iIndex_p, String strRowClass_p, String strSelectedRowClass_p, boolean fMultiselect_p, boolean fSelected_p) throws IOException
locale_p
- current localesTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- WriteriIndex_p
- int row indexstrRowClass_p
- String class namestrSelectedRowClass_p
- String class namefMultiselect_p
- boolean true = table will allow multi selection, false = single selection onlyfSelected_p
- true = line is rendered as checkedIOException
public static void writeSelectableListHeaderStart(String sTableId_p, Writer w_p, String strHeaderClass_p, OwAppContext context_p) throws Exception
sTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- WriterstrHeaderClass_p
- String class namecontext_p
- OwAppContextException
public static void writeSelectableListContextMenuStart(String sTableId_p, Writer w_p, String strClass_p) throws Exception
sTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- WriterstrClass_p
- classnameException
public static void writeSelectableListContextMenuEnd(String sTableId_p, Writer w_p) throws Exception
w_p
- Exception
public static void writeSelectableListContextMenuTREntry(String sTableId_p, Writer w_p, String sClassNamePrefix_p, int iIndex_p, String sEventURL_p, String sFormName_p, String sIcon_p, String sLabel_p) throws Exception
sTableId_p
- String the ID that identifies the table if more tables are in one pagew_p
- WritersClassNamePrefix_p
- String classname prefix will be extended with __Item, _Icon,_LabeliIndex_p
- int index of entrysEventURL_p
- event URL to callsFormName_p
- HTML form namesIcon_p
- icon HTML for entrysLabel_p
- label for entryException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.