|
Oracle9i Business Components for Java API Reference Oracle9i Jdeveloper (9.0.4) B10391-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jdeveloper.html.WebBeanImpl | +--oracle.jdeveloper.html.DataWebBeanImpl | +--oracle.jbo.html.DataWebBeanImpl | +--oracle.jbo.html.databeans.EditCurrentRecord
The EditCurrentRecord Data Web Bean edits the current record of a View Object's RowSet. This Web Bean contains two main entry points render() and execute().
JDeveloper's JSP Element wizard instantiates the EditCurrentRecord class in a jsp:useBean tag in a .JSP file. Along with the class, the wizard also includes an ID and a scope declaration set to request. If you change the scope to any other value, you will have to handle possible multithreading issues.
The definition of an EditCurrentRecord edit form provided by the wizard includes these methods: setUseRoundedCorners, setSubmitText, setDeleteText, setShowRecordNumbers, setReleaseApplicationResources, initialize, and render. For example:
<jsp:useBean class="oracle.jbo.html.databeans.EditCurrentRecord" id="efDetail" scope="request" > <% efDetail.setUseRoundedCorners(true); efDetail.setSubmitText("Save Changes"); efDetail.setDeleteText("Delete Record"); efDetail.setShowRecordNumbers(true); efDetail.initialize(application,session, request,response,out, "package3_Package3Module.EmpView"); efDetail.render(); %> </jsp:useBean>
The EditCurrentRecord Data Web Bean renders the page by using field renderers. A field renderer is a technique of rendering an attribute. For example, TextAreas and Lists are field renderers. The field renderers are responsible for rendering a single attribute from the current row. The createDefaultFieldRenderers() function populates the collection of field renderes for all the visible attributes. You can retrieve an attribute's field renderer by using the getFieldRenderer() function. You can also create your own field renderers:
Field Summary | |
protected boolean |
bShowDeleteButton Show\Hide delete button |
protected int |
JSlibNeeded Determines whether the bean has already generated the required JavaScript libraries. |
protected int |
maxFieldHeight The default display height (in characters) for an attribute. |
protected int |
maxFieldWidth Determines the threshold width (in characters) of the field. |
protected Row |
newRow Stores the new row when EditCurrentRecord is in INSERT mode. |
protected java.lang.String |
NLSFormat Determines the default date format. |
protected boolean |
renderNewRow Determines whether new rows will be inserted into the form. |
protected java.lang.String |
sDeleteRecord Text displayed on the "Delete" button. |
protected boolean |
showRecordNumber Determines whether record numbers are displayed on the form. |
protected java.lang.String |
sSaveChanges Text displayed on the "Save" button. |
protected java.lang.String |
sTargetUrl The target URL of the HTML form. |
protected boolean |
useJS Determines whether JavaScript is used for the dynamic version of EditCurrentRecord. |
protected boolean |
useRoundedCorners Determines whether rounded or squared corners are used on the HTML form. |
Fields inherited from class oracle.jdeveloper.html.DataWebBeanImpl |
amName, bReleaseApplication, dispAttrs, ds |
Fields inherited from class oracle.jdeveloper.html.WebBeanImpl |
application, bUsedInTag, out, page, request, response, session |
Fields inherited from interface oracle.jdeveloper.html.WebBean |
contentFrameName, defaultCaboBase, defaultCaboImageBase, defaultImageBase, defaultJSPBase, defaultNLSFormat, JS_LIBRARIES, JS_NAMEID, JSButtonConstructorLib, JSCalendarConstructorLib, JSContainerConstructorLib, JSDataConstructLib, JSModalPageConstructorLib, JSTableConstructLib, JSToolbarConstructorLib, JSTreeConstructLib, JSUtilitiesLib |
Constructor Summary | |
EditCurrentRecord() |
Method Summary | |
void |
createDefaultFieldRenderers() Deprecated. Deprecated since 5.0. Field renderer are now created lazily |
void |
createNewRow() Directs the EditCurrentRecord Web Bean to create a new row in the RowSet and to give focus to this row when generating the edit form. |
void |
execute() Reads the _ROWOPERATION parameter from the JSP page's request and performs the appropriate row operation on the record being edited. |
HTMLFieldRenderer |
getDefaultFieldRenderer(AttributeDef attrDef) Retrieves the default field renderer for a specified attribute definition (that is, the attribute metadata). |
HTMLFieldRenderer |
getFieldRenderer(java.lang.String sAttrName) Deprecated. Deprecated since 5.0. Use getDefaultFieldRenderer(AttributeDef attrDef); |
java.lang.String |
getNLSFormat() Deprecated. As of Jdev9i, replaced by support for User Interface Hints. See documentation |
boolean |
getShowDeleteButton() returns whether the delete button will be rendered or not. |
java.lang.String |
getTargetUrl() Gets the target URL that will receive the HTML FORM parameters when the user clicks the SUBMIT button. |
void |
internalInitialize() internalInitialize |
boolean |
isUseMultiPartMimeType() |
void |
render() Renders EditCurrentRecord's edit form containing the current record of the View Object's RowSet. |
void |
setDeleteText(java.lang.String sText) Specifies the title used on the DELETE button displayed by the form. |
void |
setFieldRenderer(java.lang.String sAttrName, HTMLFieldRenderer rField) Associates the provided field renderer with the provided attribute. |
void |
setMaximumFieldHeight(int nHeight) Deprecated. As of Jdev9i, replaced by support for User Interface Hints. See documentation |
void |
setMaximumFieldWidth(int nWidth) Deprecated. As of Jdev9i, replaced by support for User Interface Hints. See documentation |
void |
setNLSFormat(java.lang.String format) Deprecated. As of Jdev9i, replaced by support for User Interface Hints. See documentation |
void |
setRowSet(RowSet aQuery) Deprecated. Deprecated since 5.0. RowSet is now defined with the DataSource |
void |
setShowDeleteButton(boolean bShow) Sets whether to show\hide the delete button |
void |
setShowRecordNumbers(boolean bShow) Determines whether the control will render the record numbers on the form. |
void |
setSubmitText(java.lang.String sText) Specifies the title used on the SUBMIT button displayed by the form. |
void |
setTargetUrl(java.lang.String sUrl) Specifies the target URL that will receive the HTML FORM parameters when the user clicks the SUBMIT button. |
void |
setUseJS(boolean bSet) Determines whether JavaScript is used for the dynamic version of EditCurrentRecord. |
void |
setUseMultiPartMimeType(boolean newBUseMultiPartMimeType) |
void |
setUseRoundedCorners(boolean bSet) Enables or disables the use of rounded corners in the HTML table generated by this Web Bean. |
void |
useCheckBoxGroup(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue) A shortcut method for associating a check box group with the given attribute. |
void |
useComboBox(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue) A shortcut method for associating a combo box with the given attribute. |
void |
useDateField(java.lang.String sAttribute) Displays a calendar for the specified attribute. |
void |
useEditField(java.lang.String sAttribute) Displays a single-line edit field in the HMTL form for the specified attribute. |
void |
useHiddenField(java.lang.String sAttribute) Provides a non-viewable field in the HMTL form for the specified attribute. |
void |
useListBox(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue) A shortcut method for associating a list box with the given attribute. |
void |
useListOfValues(java.lang.String sAttribute, java.lang.String voName, java.lang.String sDisplayAttributes, java.lang.String sDataAttribute) Enables a LOV (list of values) for the specified attribute in the UI. |
void |
useLOV(java.lang.String sAttribute, java.lang.String voName) Enables a LOV (list of values) for the specified attribute in the UI. |
void |
useRadioGroup(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue) A shortcut method for associating a radio button group with the given attribute. |
void |
useStaticCheckBoxGroup(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values) Defines a check box group picklist that is populated from two arrays: one for the labels and the other for the values. |
void |
useStaticComboBox(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values) Defines an attribute's combo box picklist that is populated from two arrays: one for the labels and the other for the values. |
void |
useStaticListBox(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values) Defines an attribute's list box picklist that is populated from two arrays: one for the labels and the other for the values. |
void |
useStaticRadioGroup(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values) Defines a radio group picklist that is populated from two arrays: one for the labels and the other for the values. |
void |
useTextArea(java.lang.String sAttribute) Displays a multi-line edit field in the HTML form for the specified attribute. |
Methods inherited from class oracle.jbo.html.DataWebBeanImpl |
initialize, setUsedInTag |
Methods inherited from class oracle.jdeveloper.html.WebBeanImpl |
generateScriptSrc, getCookie, getOut, getRequest, getRequestVariable, getRequestVariable, getUniqueName, initBeanForJS, initBeanForJS, initBeanForJS, initialize, initialize, initialize, render, setRequestVariable, setRequestVariable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jdeveloper.html.DataWebBean |
clearDisplayAttributes, getApplicationName, getDisplayAttributeDefs, getDisplayAttributes, getDisplayFieldRenderer, getEditFieldRenderer, getRowSet, getViewObjectName, handleCommit, initialize, initialize, isAppStateful, setDisplayAttributes, setDisplayFieldRenderer, setDisplayFieldRenderer, setEditFieldRenderer, setEditFieldRenderer, setReleaseApplicationResources, shouldDisplayAttribute |
Methods inherited from interface oracle.jdeveloper.html.WebBean |
initialize, initialize, render |
Field Detail |
protected java.lang.String sTargetUrl
protected java.lang.String sSaveChanges
protected java.lang.String sDeleteRecord
protected boolean renderNewRow
protected Row newRow
protected boolean showRecordNumber
protected int maxFieldWidth
protected int maxFieldHeight
protected boolean useRoundedCorners
protected boolean useJS
protected int JSlibNeeded
protected java.lang.String NLSFormat
protected boolean bShowDeleteButton
Constructor Detail |
public EditCurrentRecord()
Method Detail |
public void setShowDeleteButton(boolean bShow)
public boolean getShowDeleteButton()
public void setUseRoundedCorners(boolean bSet)
bSet
- true to use rounded corners in the table; false to use squared corners.public void setNLSFormat(java.lang.String format)
format
- the date format.public java.lang.String getNLSFormat()
public void setUseJS(boolean bSet)
bSet
- true to use JavaScript; false otherwise.public void setMaximumFieldWidth(int nWidth)
nWidth
- width of the field, measured in number of characters.public void setMaximumFieldHeight(int nHeight)
nHeight
- height of the TextArea, measured in characters.public void setShowRecordNumbers(boolean bShow)
bShow
- true to render record numbers on the form; false to omit record numbers.public void setSubmitText(java.lang.String sText)
sText
- text displayed on the SUBMIT button.public void setDeleteText(java.lang.String sText)
sText
- text displayed on the DELETE button.public void setTargetUrl(java.lang.String sUrl)
sUrl
- target URL for the HTML FORM parameters.public java.lang.String getTargetUrl()
public void setRowSet(RowSet aQuery)
Sets up the RowSet that contains the row to be edited. That is, it clears the field renderers if the row to be edited is null; otherwise, it populates the the row with its field renderers.
The RowSet is automatically retrieved as a side effect of the initialize() function. Call setRowSet only if you need to initialize the Web Bean with a RowSet other than the one designated by the initialize method.
setRowSet
in interface DataWebBean
setRowSet
in class DataWebBeanImpl
aQuery
- the RowSet to be edited.public void createNewRow()
public void createDefaultFieldRenderers()
public HTMLFieldRenderer getDefaultFieldRenderer(AttributeDef attrDef)
attrDef
- an attribute definition.public void setFieldRenderer(java.lang.String sAttrName, HTMLFieldRenderer rField)
sAttrName
- name of the attribute.rField
- name of the field renderer.public HTMLFieldRenderer getFieldRenderer(java.lang.String sAttrName)
sAttrName
- name of the attribute.public void useComboBox(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue)
sAttribute
- name of the attribute to be associated with the combo box.sQuery
- string representing the query used to populate the combo box.sLabel
- name of the column used for the prompt.sValue
- name of the column used for the value.public void useStaticComboBox(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values)
sAttribute
- name of attribute represented by the combo box.labels
- String array containing the labels for each value.values
- String array containing the values assoicated with each label.public void useListBox(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue)
sAttribute
- name of the attribute to be associated with the list box.sQuery
- string representing the query used to populate the list box.sLabel
- name of the column used for the prompt.sValue
- name of the column used for the value.public void useStaticListBox(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values)
sAttribute
- name of attribute represented by the list box.labels
- String array containing the labels for each value.values
- String array containing the values assoicated with each label.public void useRadioGroup(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue)
sAttribute
- name of the attribute to be associated with the radio group.sQuery
- string representing the query used to populate the radio group.sLabel
- name of the column used for the prompt.sValue
- name of the column used for the value.public void useStaticRadioGroup(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values)
sAttribute
- name of attribute represented by the radio group.labels
- String array containing the labels for each value.values
- String array containing the values assoicated with each label.public void useCheckBoxGroup(java.lang.String sAttribute, java.lang.String sQuery, java.lang.String sLabel, java.lang.String sValue)
sAttribute
- name of the attribute to be associated with the check box group.sQuery
- string representing the query used to populate the check box group.sLabel
- name of the column used for the prompt.sValue
- name of the column used for the value.public void useStaticCheckBoxGroup(java.lang.String sAttribute, java.lang.String[] labels, java.lang.String[] values)
sAttribute
- name of attribute represented by the check box group.labels
- string array containing the labels for each value.values
- string array containing the values assoicated with each label.public void useEditField(java.lang.String sAttribute)
sAttribute
- the attribute for which a single-line edit field should be displayed.public void useTextArea(java.lang.String sAttribute)
sAttribute
- the attribute for which a single-line edit field should be displayed.public void useHiddenField(java.lang.String sAttribute)
sAttribute
- name of the attrubute that should be stored in a non-viewable field.public void useDateField(java.lang.String sAttribute)
sAttribute
- the attribute for which a calendar should be displayed.public void useListOfValues(java.lang.String sAttribute, java.lang.String voName, java.lang.String sDisplayAttributes, java.lang.String sDataAttribute)
This method enables a LOV for one or more of the RowSet's attributes. To return all of the RowSet's attributes, use the useLOV
method.
voName
- name of the View Object to which the attribute belongs.sDisplayAttributes
- a comma-separated list of the RowSet's attributes that will be displayed when the attribute is selected.sDataAttribute
- the location from which the attributes' values are obtained.useLOV(String, String)
public void useLOV(java.lang.String sAttribute, java.lang.String voName)
This method enables a LOV for all of the RowSet's attributes. To enable a LOV for a subset of the attributes, use the useListOfValues
method.
voName
- name of the View Object to which the attribute belongs.useListOfValues(String, String, String, String)
public void execute() throws java.lang.Exception
java.lang.Exception
public void render() throws java.lang.Exception
render
in interface WebBean
render
in class WebBeanImpl
java.lang.Exception
public void internalInitialize() throws java.lang.Exception
internalInitialize
in interface WebBean
internalInitialize
in class DataWebBeanImpl
java.lang.Exception
public boolean isUseMultiPartMimeType()
public void setUseMultiPartMimeType(boolean newBUseMultiPartMimeType)
|
Oracle9i Business Components for Java API Reference Oracle9i Jdeveloper (9.0.4) B10391-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2003, Oracle. All rights reserved.