|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-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.RowSetBrowser
The RowSetBrowser Data Web Bean class dynamically generates an HTML table that contains records (rows) from a View Object's RowSet. The subset of the rows in the View Object's RowSet that are rendered to the JSP page's output stream is based on the RangeSize and the position of the View Object's current row.
JDeveloper's JSP Element wizard instantiates the RowSetBrowser 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 a RowSet browser provided by the wizard includes these methods: setUseRoundedCorners, setShowCurrentRow, setVisibleRows, setAlternateColors, setShowRecordNumbers, setReleaseApplicationResources, initialize, and render. For example:
<jsp:useBean class="oracle.jbo.html.databeans.RowSetBrowser" id="rbDetail" scope="request" > <% rbDetail.setUseRoundedCorners(true); rbDetail.setShowCurrentRow(true); rbDetail.setVisibleRows(10); rbDetail.setAlternateColors(true); rbDetail.setShowRecordNumbers(true); rbDetail.initialize(application,session, request,response,out, "DeptToEmp_DeptToEmpModule.EmpView"); rbDetail.render(); %> </jsp:useBean>
Using the setDisplayAttributes method inherited from DataWebBeanImpl, you can set the attributes displayed by the HTML table.
Field Summary | |
protected TableControl |
aTable
|
protected boolean |
bAlternateColors
|
protected boolean |
bShowCurrentRow
|
protected java.util.Hashtable |
colTitles
|
protected java.util.Vector |
extraUrlCols
|
protected java.lang.String |
ImageDir
|
protected int |
nVisibleRows
|
protected boolean |
nVisibleRowsWasChanged
|
protected boolean |
showRecordNumber
|
protected java.lang.String |
sRowEditTarget
|
protected java.lang.String |
sRowEditUrl
|
protected java.lang.String |
sRowUrl
|
protected java.lang.String |
sRowUrlTarget
|
protected boolean |
useRoundedCorners
|
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 | |
RowSetBrowser()
|
Method Summary | |
void |
addImageUrlColumn(java.lang.String sTitle,
java.lang.String sImageFile,
java.lang.String sUrl)
Adds an additional column with an image-based URL. |
void |
addImageUrlColumn(java.lang.String sTitle,
java.lang.String sImageFile,
java.lang.String sUrl,
java.lang.String sTarget)
Adds an additional column with an image-based URL. |
void |
addTextUrlColumn(java.lang.String sTitle,
java.lang.String sText,
java.lang.String sUrl)
Adds an additional column that contains a line of text that represents a URL. |
void |
addTextUrlColumn(java.lang.String sTitle,
java.lang.String sText,
java.lang.String sUrl,
java.lang.String sTarget)
Adds an additional column that contains a line of text that represents a URL. |
java.lang.String |
fixupUrl(java.lang.String sUrl,
java.lang.String sExtra)
Internal: Applications should not use this method. |
java.lang.String |
getImageDir()
Returns the path of the image root directory where all of the browser's images reside. |
java.lang.String |
getRowUrl()
Returns the current Row URL setting. |
java.lang.String |
getRowUrlTargetWindow()
Returns the name of the window being used as the Row URL target. |
boolean |
getShowCurrentRow()
Returns whether the current RowSet row is highlighted when the HTML table is rendered. |
TableControl |
getTableControl()
Returns the instance of the table class the is to be used for rendering |
int |
getVisibleRows()
Returns the number of rows displayed (that is, "visible rows") in the RowSet browser, which is also the value of the RowSet's RangeSize. |
protected boolean |
initializeNewTableRow(HTMLTableRow htmlRow,
Row[] drows,
int rowno,
boolean isEven)
|
void |
render()
Renders an HTML table that contains records from the View Object's RowSet. |
protected void |
renderTableHeaders()
|
void |
setAlternateColors(boolean bSet)
Displays rows in alternating background colors in the generated HTML table. |
void |
setAttributeTitle(java.lang.String sAttribute,
java.lang.String sTitle)
Sets the column title of the given attribute. |
void |
setImageDir(java.lang.String sDir)
Specifies the path of the image root directory where all of the browser's images reside. |
void |
setRowEditTargetWindow(java.lang.String sName)
Sets the name of the target frame or window where the row-editing URL is displayed. |
void |
setRowEditUrl(java.lang.String sUrl)
Sets the row editing URL that is invoked when the user clicks the Edit button. |
void |
setRowUrl(java.lang.String sUrl)
Sets the Row URL to be invoked when the user clicks the row number to the left of each row. |
void |
setRowUrlTargetWindow(java.lang.String sUrl)
If you enabled the Row URL, this function sets up the target window for the URL when the user activates it. |
void |
setShowCurrentRow(boolean bSet)
Enables or disables highlighting of the current RowSet's row when the HTML table is rendered. |
void |
setShowRecordNumbers(boolean bShow)
Sets whether the control will render the record numbers in the browser. |
void |
setUseRoundedCorners(boolean bSet)
Enables or disables the use of rounded corners in the HTML table generated by this Web Bean. |
void |
setVisibleRows(int nRows)
Sets both the number of rows to be displayed by the RowSet browser and the RowSet's RangeSize. |
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, setRowSet, shouldDisplayAttribute |
Methods inherited from interface oracle.jdeveloper.html.WebBean |
initialize, initialize, internalInitialize, render |
Field Detail |
protected int nVisibleRows
protected boolean bAlternateColors
protected java.lang.String sRowUrl
protected boolean bShowCurrentRow
protected java.lang.String sRowUrlTarget
protected java.util.Vector extraUrlCols
protected boolean useRoundedCorners
protected boolean showRecordNumber
protected java.util.Hashtable colTitles
protected java.lang.String sRowEditUrl
protected java.lang.String ImageDir
protected java.lang.String sRowEditTarget
protected boolean nVisibleRowsWasChanged
protected TableControl aTable
Constructor Detail |
public RowSetBrowser()
Method Detail |
public void setImageDir(java.lang.String sDir)
sDir
- path to the image root directory.public java.lang.String getImageDir()
public void setRowEditUrl(java.lang.String sUrl)
sUrl
- URL where the row can be edited.public void setRowEditTargetWindow(java.lang.String sName)
This method is necessary only if you are using HMTL Frames.
sName
- name of the target window.public void setAttributeTitle(java.lang.String sAttribute, java.lang.String sTitle)
sAttribute
- attribute name.sTitle
- column title for attribute.public void setShowRecordNumbers(boolean bShow)
bShow
- true to display record number; false to
suppress record numbers.public void setUseRoundedCorners(boolean bSet)
bSet
- true use rounded corners; false use squared corners.public void addTextUrlColumn(java.lang.String sTitle, java.lang.String sText, java.lang.String sUrl, java.lang.String sTarget)
sTitle
- text to use as the column title.sText
- text that will be used to represent the URL.sUrl
- URL that will be invoked when text is clicked.sTarget
- the target for the URL. This is useful when you are using HTML FRAMES.public void addTextUrlColumn(java.lang.String sTitle, java.lang.String sText, java.lang.String sUrl)
sTitle
- text to use as the column title.sText
- text that will be used to represent the URL.sUrl
- URL that will be invoked when text is clicked.public void addImageUrlColumn(java.lang.String sTitle, java.lang.String sImageFile, java.lang.String sUrl, java.lang.String sTarget)
sTitle
- text to use as the column title.sImageFile
- URL for locating the image to be displayed.sUrl
- URL that will be invoked when image is clicked.sTarget
- the target for the URL. This is useful when you are using HTML FRAMES.public void addImageUrlColumn(java.lang.String sTitle, java.lang.String sImageFile, java.lang.String sUrl)
sTitle
- text to use as the column title.sImageFile
- URL for locating the image to be displayed.sUrl
- URL that will be invoked when text is clicked.public void setRowUrlTargetWindow(java.lang.String sUrl)
public java.lang.String getRowUrlTargetWindow()
public void setRowUrl(java.lang.String sUrl)
sUrl
- Row URL to be invokedpublic java.lang.String getRowUrl()
public void setShowCurrentRow(boolean bSet)
bSet
- true to highlight the current RowSet row; false
to not highlight the row.public boolean getShowCurrentRow()
public void setVisibleRows(int nRows)
nRows
- number of rows to display in the RowSet browser and the
RowSet's RangeSize.
NOTE:
The setVisibleRows() temporarily changes the display set of rows, but it
doesn't make this change permanent to the rowset's RangeSize. If you need to make the
change permanent you need to use dwb.getRowSet().setRangeSize(50) prior to rendering.public int getVisibleRows()
public void setAlternateColors(boolean bSet)
bSet
- true to display rows in alternating background colors;
false to display rows in a single background color.public TableControl getTableControl()
protected void renderTableHeaders() throws java.lang.Exception
java.lang.Exception
protected boolean initializeNewTableRow(HTMLTableRow htmlRow, Row[] drows, int rowno, boolean isEven)
public void render() throws java.lang.Exception
render
in interface WebBean
render
in class WebBeanImpl
java.lang.Exception
public java.lang.String fixupUrl(java.lang.String sUrl, java.lang.String sExtra)
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.