|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.html.ListEditor
public class ListEditor
The ListEditor is a TransformationBean that generates the appropriate HTML 4.0 and JavaScript to represent an editable list of items. A ListEditor consists of a list of items and list management buttons. List management takes the form of "Add", "Update", "Delete", and "Delete All" functions. The Add button should add an item to the list. Update should modify an existing item (likely the selected item). Delete should delete the selected item (or items if the list allows multiple selection). Finally, Delete All should eliminate all items in the list.
You can use ListEditor beans in a Java servlet or in a JSP scriplet. The ListEditor requires a javax.swing.ListModel for its model.
Most of the properties used for a ListEditor are inherited from
BaseListEditor
The ListEditor is one of several TransformationBeans that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans as well as the TransformationBeans Style Sheet Reference.
The ListEditor is one of several TransformationBeans that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The ListEditor uses the following JavaScript files:
Note that the toString() method on this class calls the write
method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging
For More Information:
Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.
Examples for this class may be found on the Examples Site.
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
BaseListEditor
,
ListModel
,
Serialized FormField Summary | |
---|---|
protected java.lang.String |
confirmDelAllMsg
The message to display in the confirmation box when all entries are to be deleted. |
protected java.lang.String |
confirmDeleteMsg
The message to display in the confirmation box when an entry is to be deleted. |
static java.lang.String |
DEFAULT_TEMPLATE_FILE_NAME
The default composite template filename. |
static java.lang.String |
RB_KEY
The prefix used for resource properties associated with this class. |
Fields inherited from class com.sas.servlet.tbeans.BaseListEditor |
---|
postAddTrigger, postDeleteAllTrigger, postDeleteTrigger, postSelectTrigger, postUpdateTrigger, preAddTrigger, preDeleteAllTrigger, preDeleteTrigger, preSelectTrigger, preUpdateTrigger |
Fields inherited from interface com.sas.servlet.tbeans.html.ListEditorStyleKeysInterface |
---|
LISTEDITOR_ADD_BUTTON_CONTAINER, LISTEDITOR_BUTTON_CONTAINER, LISTEDITOR_CONTAINER, LISTEDITOR_DELETE_BUTTON_CONTAINER, LISTEDITOR_DELETEALL_BUTTON_CONTAINER, LISTEDITOR_LIST_CONTAINER, LISTEDITOR_UPDATE_BUTTON_CONTAINER |
Fields inherited from interface com.sas.servlet.tbeans.BaseListEditorKeysInterface |
---|
LISTEDITOR_ADD_BUTTON, LISTEDITOR_BODY, LISTEDITOR_DELETE_BUTTON, LISTEDITOR_DELETEALL_BUTTON, LISTEDITOR_LIST, LISTEDITOR_UPDATE_BUTTON |
Constructor Summary | |
---|---|
ListEditor()
Constructs a new ListEditor component with the default properties. |
|
ListEditor(java.lang.String name)
Constructs a new ListEditor component with the given name. |
Method Summary | |
---|---|
protected java.lang.String |
getAddButtonOnClick()
Constructs and returns the JavaScript code for the "OnClick" event for the "Add" button. |
java.lang.String |
getConfirmDeleteAllMessage()
Returns the current "all entries deletion" confirmation message text. |
java.lang.String |
getConfirmDeleteMessage()
Returns the current "selected entry deletion" confirmation message text. |
BaseButton |
getDefaultAddButton()
Constructs and returns a new default "Add" button component. |
java.lang.String |
getDefaultConfirmDeleteAllMessage()
Returns the default "all entries deletion" confirmation message text. |
java.lang.String |
getDefaultConfirmDeleteMessage()
Returns the default "selected entry deletion" confirmation message text. |
BaseButton |
getDefaultDeleteAllButton()
Constructs and returns a new default "Delete All" button component. |
BaseButton |
getDefaultDeleteButton()
Constructs and returns a new default "Delete" button component. |
BaseListBox |
getDefaultListComponent()
Constructs and returns a new default list component. |
BaseButton |
getDefaultUpdateButton()
Constructs and returns a new default "Update" button component. |
protected java.lang.String |
getDeleteAllButtonOnClick()
Constructs and returns the JavaScript code for the "OnClick" event for the "Delete All" button. |
protected java.lang.String |
getDeleteButtonOnClick()
Constructs and returns the JavaScript code for the "OnClick" event for the "Delete" button. |
protected java.lang.String |
getJavaScript()
Constructs and returns the JavaScript code for this component. |
protected java.lang.String |
getJavaScriptName()
Returns the name of this component as referred to in any JavaScript code. |
protected java.lang.String |
getListComponentOnChange()
Constructs and returns the JavaScript code for the "OnChange" event for the list component. |
java.util.Map |
getStyleMap()
Returns the active style map. |
protected java.lang.String |
getUpdateButtonOnClick()
Constructs and returns the JavaScript code for the "OnClick" event for the "Update" button. |
void |
setConfirmDeleteAllMessage(java.lang.String value)
Sets the "all entries deletion" confirmation message text. |
void |
setConfirmDeleteMessage(java.lang.String value)
Sets the "selected entry deletion" confirmation message text. |
void |
setId(java.lang.String id)
Sets the id for this ListEditor component. |
protected void |
setLocaleDependentProperties(java.util.Locale locale)
Sets or refreshes any locale dependent properties. |
void |
setName(java.lang.String name)
Deprecated. Use setId |
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request object for this tbean. |
void |
write(java.io.PrintWriter out)
Constructs the HTML code for this tbean and sends it to the given output. |
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface |
---|
getRequest |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
protected java.lang.String confirmDeleteMsg
protected java.lang.String confirmDelAllMsg
Constructor Detail |
---|
public ListEditor()
public ListEditor(java.lang.String name)
name
- the name for the new tbeanMethod Detail |
---|
protected void setLocaleDependentProperties(java.util.Locale locale)
setLocaleDependentProperties
in class BaseTransformation
locale
- the locale to usepublic java.util.Map getStyleMap()
getStyleMap
in interface ComplexStyleInterface
getStyleMap
in class BaseCompositeTransformation
public BaseListBox getDefaultListComponent()
getDefaultListComponent
in class BaseListEditor
public BaseButton getDefaultAddButton()
getDefaultAddButton
in class BaseListEditor
public BaseButton getDefaultUpdateButton()
getDefaultUpdateButton
in class BaseListEditor
public BaseButton getDefaultDeleteButton()
getDefaultDeleteButton
in class BaseListEditor
public BaseButton getDefaultDeleteAllButton()
getDefaultDeleteAllButton
in class BaseListEditor
public void setId(java.lang.String id)
setId
in interface TransformationInterface
setId
in class BaseCompositeTransformation
id
- the new id for this componentpublic void setName(java.lang.String name)
setName
in interface TransformationInterface
setName
in class BaseTransformation
name
- the new name for this componentBaseTransformation.setId(java.lang.String)
protected java.lang.String getListComponentOnChange()
protected java.lang.String getAddButtonOnClick()
protected java.lang.String getUpdateButtonOnClick()
protected java.lang.String getDeleteButtonOnClick()
protected java.lang.String getDeleteAllButtonOnClick()
public java.lang.String getDefaultConfirmDeleteMessage()
public java.lang.String getDefaultConfirmDeleteAllMessage()
public java.lang.String getConfirmDeleteMessage()
public java.lang.String getConfirmDeleteAllMessage()
public void setConfirmDeleteMessage(java.lang.String value)
value
- the new confirmation messagepublic void setConfirmDeleteAllMessage(java.lang.String value)
value
- the new confirmation messagepublic void write(java.io.PrintWriter out) throws java.io.IOException
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseCompositeTransformation
out
- the output to write the HTML code to
java.io.IOException
- if any errors occur while processing the outputprotected java.lang.String getJavaScriptName()
protected java.lang.String getJavaScript()
public void setRequest(javax.servlet.http.HttpServletRequest request)
setRequest
in interface HttpActionProviderInterface
setRequest
in interface TransformationInterface
setRequest
in class BaseCompositeTransformation
request
- the new requestHttpActionProviderInterface.getRequest()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |