The assert keyword is mainly used for unit testing, enabling you to test variable (value) assumptions of your program during runtime. Assert checking could be enabled by configuring "-ea" on VM options - otherwise assert statements would be ignored. With the use of assert, you will be able to pin point potential bugs faster.
In practice I don't often use assert; so prolly I'm writing this entry to change that.
programming is an art, a form of expression only the logic side of our brain could appreciate
Wednesday, June 29, 2011
Tuesday, June 28, 2011
Functions on Responsibility
I wanted to configure the USD/PHP GL Daily Rates for the day but didn't know the responsibility that contains the setup function. So I used this query:
GL Super User contained it ~ not sure though if this is a custom responsibility or not.
GL Super User contained it ~ not sure though if this is a custom responsibility or not.
Monday, June 27, 2011
Value Set Auto Filter based on a Parent Parameter
For scenarios you’re required to populate the selection list of the second parameter based on a parent parameter, you’ll need to use :$FLEX$.[parent_value_set_name] inside the where clause configuration of the second value set (table type)
parent parameter value set:
second parameter value set:
When you run the concurrent program, the parameter prompt will somehow look like this
- Rain
parent parameter value set:
second parameter value set:
When you run the concurrent program, the parameter prompt will somehow look like this
- Rain
Tuesday, June 21, 2011
OAF File Upload
I tried to utilize an attachment image component as an attempt to work on a file upload function (because of the word "attachment") but failed miserably XDww Second attempt was with messageFileUpload component and yeah I finally got it right this time.
The only thing you need to take note is to link the component with a ViewObject attribute - which value will be used as a reference to retrieve the file for later viewing.
A null reference value will render the textfield + browse button combo, while a non-null value will render a view hyperlink and a clear button (which removes the reference value from the attribute)
TODO: clarify internal mecha / tables related.
The only thing you need to take note is to link the component with a ViewObject attribute - which value will be used as a reference to retrieve the file for later viewing.
A null reference value will render the textfield + browse button combo, while a non-null value will render a view hyperlink and a clear button (which removes the reference value from the attribute)
TODO: clarify internal mecha / tables related.
Friday, May 27, 2011
Concurrent Phase and Status Codes
Return codes (OUT parameters) from FND_CONCURRENT.WAIT_FOR_REQUEST
Phase Codes | |
Value | Meaning |
C | Completed |
I | Inactive |
P | Pending |
R | Running |
Status Codes | |
Value | Meaning |
D | Cancelled |
U | Disabled |
E | Error |
M | No Manager |
R | Normal |
I | Normal |
C | Normal |
H | On Hold |
W | Paused |
B | Resuming |
P | Scheduled |
Q | Standby |
S | Suspended |
X | Terminated |
T | Terminating |
A | Waiting |
Z | Waiting |
G | Warning |
Phase | Status | Description |
PENDING | Normal | Request is waiting for the next available manager. |
PENDING | Standby | Program to run request is incompatible with other program(s) currently running. |
PENDING | Scheduled | Request is scheduled to start at a future time or date. |
PENDING | Waiting | A child request is waiting for its Parent request to mark it ready to run. For example, a request in a request set that runs sequentially must wait for a prior request to complete. |
RUNNING | Normal | Request is running normally. |
RUNNING | Paused | Parent request pauses for all its child requests to finish running. For example, a request set pauses for all requests in the set to complete. |
RUNNING | Resuming | All requests submitted by the same parent request have completed running. The Parent request resumes running. |
RUNNING | Terminating | Request is terminated by choosing the Cancel Request button in Requests window. |
COMPLETED | Normal | Request completed successfully. |
COMPLETED | Error | Request failed to complete successfully. |
COMPLETED | Warning | Request completed with warnings. For example, a request is generated successfully but fails to print. |
COMPLETED | Cancelled | Pending or Inactive request is cancelled by choosing the Cancel Request button in the Requests window. |
COMPLETED | Terminated | Request is terminated by choosing the Cancel Request button in the Requests window. |
INACTIVE | Disabled | Program to run request is not enabled. Contact your system administrator. |
INACTIVE | On Hold | Pending request is placed on hold by choosing the Hold Request button in the Requests window. |
INACTIVE | No Manager | No manager is defined to run the request. Check with your system administrator. A status of No Manager is also given when all managers are locked by run-alone requests. |
Thursday, May 26, 2011
Programmatic Request Submission (FND_REQUEST.SUBMIT_REQUEST)
used when you need to issue a request within a PL/SQL block (normally from a parent request; parameters doesn’t include the errbuf and retcode). Oracle Apps will automatically assign a concurrent manager for this request. Once successful the function will return the request ID, otherwise it will return 0.
arguments (from source code)
application - Short name of application under which the program is registered
program - concurrent program name for which the request has to be submitted (short name)
description - (optional) Will be displayed along with user concurrent program name
start_time - (optional) Time at which the request has to start running
sub_request - (optional) Set to TRUE if the request is submitted from another running request and has to be treated as a sub request. Default is FALSE
argument1..100 - (optional) Arguments for the concurrent request
After calling FND_REQUEST.SUBMIT_REQUEST, in case you want to wait for the sub request to be completed before proceeding with the rest of the PLSQL codes, you'll need to issue a COMMIT command and call FND_CONCURRENT.WAIT_FOR_REQUEST. Issuing COMMIT is required because during the process of submit request, records related to the request are inserted into relevant tables, which only becomes visible to the concurrent manager after the COMMIT. Otherwise, the concurrent manager will not be able to see the request and will not run it at all - which in effect FND_CONCURRENT.WAIT_FOR_REQUEST will keep on waiting for an nonexistent request and enter an endless loop.
arguments (from source code)
(IN) request_id - Request ID to wait on
(IN) interval - time between checks. Number of seconds to sleep (default 60 seconds)
(IN) max_wait - Max amount of time to wait (in seconds) for request's completion
(OUT) phase - Request phase (from meaning in fnd_lookups)
(OUT) status - Request status(for display purposes)
(OUT) dev_phase - Request phase as a constant string so that it can be used for comparisons
(OUT) dev_status - Request status as a constatnt string
(OUT) message - Completion message if request has completed
For instances you want to submit a request from OAF, you can utilize the oracle.apps.fnd.cp.request.ConcurrentRequest class and call its submitRequest method. It completely mirrors FND_REQUEST.SUBMIT_REQUEST arguments, the only thing is that you need to store the parameters inside a Vector (considering the PLSQL defaults the arguments to VARCHAR type, we could safely assume that the parameter Vector should contain String objects)
method signature
public int submitRequest(String ProgramApplication ,
String ProgramName ,
String ProgramDescription ,
String StartTime,
boolean SubRequest,
Vector Parameters) throws RequestSubmissionException
(source)
Friday, May 20, 2011
ERRBUFF and RETCODE
hese are required parameters when you want to call a PLSQL procedure from Oracle Apps.
ERRBUF
varchar that holds error messages (I haven't tested this yet, but theoretically inside the program you must assign the error message string to this variable - being an IN OUT enables you modify this variable)
RETCODE
0 - success
1 - success with warnings
2 - with errors
ERRBUF
varchar that holds error messages (I haven't tested this yet, but theoretically inside the program you must assign the error message string to this variable - being an IN OUT enables you modify this variable)
RETCODE
0 - success
1 - success with warnings
2 - with errors
Tuesday, May 17, 2011
Oracle Apps Concurrent Programs / Executable Table
Use this query (or parts of it) if you want to look for details regarding you concurrent programs. I find it tedious to use Oracle Apps interface =w=;;
Monday, May 16, 2011
Single Bundled Exception
Used when a page has multiple fields that needs to be validated at once. OAF allows Exceptions to be “bundled” inside a List object which will enable you display multiple error messages once you call the OAException.raiseBundledOAException(List) method.
(note: in this example, OAException messages are defined explicitly within the code. However normally you need to define the messages in Oracle Apps and call the message names instead)
(note: in this example, OAException messages are defined explicitly within the code. However normally you need to define the messages in Oracle Apps and call the message names instead)
Friday, March 11, 2011
3 Types of OARow Removal
methods inherited from oracle.jbo.Row
note: you cannot remove a row if it's marked as read-only
OARow.remove()
- removes the row from the DB
OARow.removeFromCollection()
- removes the row from the ViewObject. Once the row is removed, it cannot be used anymore.
OARow.removeAndRetain()
- same as removeFromCollection() but the row can still be inserted to a different ViewObject instance. Prolly you can still manipulate the OARow object and changes will still be reflected on the DB once COMMIT is called (theorectically)
- source : OAF docs
note: you cannot remove a row if it's marked as read-only
OARow.remove()
- removes the row from the DB
OARow.removeFromCollection()
- removes the row from the ViewObject. Once the row is removed, it cannot be used anymore.
OARow.removeAndRetain()
- same as removeFromCollection() but the row can still be inserted to a different ViewObject instance. Prolly you can still manipulate the OARow object and changes will still be reflected on the DB once COMMIT is called (theorectically)
- source : OAF docs
Sunday, March 6, 2011
OAF Development Paths
source: andrei
most of my work involves Extensions, but I would also like to have experience on Personalization @w@ In terms of SAP this would be ABAP developers and SAP Basis Administrator? XDw
Thursday, March 3, 2011
Oracle Application Framework (OAF) Predefined CSS Classes List
as documented in Oracle BLAF Guidelines
commonly used
complete list
commonly used
- OraFieldText Updatable Fields
- OraDataText Display Only Fields
- OraPromptText Used for Prompts, Checkboxes
- OraLinkText For Links/URLs
- OraInstructionText For Plain Text Instruction
complete list
GENERAL COMPONENT CSS DEFINITIONS | |
OraBody | used on the element to define the default bgcolor/font family for the entire page |
OraApplicationSwitcherText | label of Application Switcher |
OraPromptText | Text Prompts (Labels) |
OraDataText | Data text string anywhere in page except in tables - also often used for numeric values which don't need to be right-aligned |
OraFieldText | Text and numeric data in standard Web widget (field, poplist) |
OraFieldTextDisabled | Renders gray text in disabled form controls such as text fields, radio buttons, check boxes - does not match current BLAF guidelines |
OraFieldNumber | Right-aligned numeric Data in Field |
OraFieldNumberDisabled | Renders gray text for disabled Numeric Data fields - does not match current BLAF guidelines |
OraInstructionText | Instruction Text |
OraInstructionTextStrong | Instruction Text with Emphasis |
OraPageStampText | Page stamp text |
OraPageStampLabel | Page stamp label |
OraButtonText | Action/Navigation Button Text |
OraButtonTextDisabled | Button Text - disabled |
OraLinkText | Link Text (would be underlined with href tag) |
OraVLinkText | visited link text (would be underlined with href tag) |
OraALinkText | active link text - color change on mouse button down (would be underlined with href tag) |
OraGlobalButtonText | Global Button Enabled} (This would be an "a href" link |
OraGlobalButtonTextSelected | Global Button Active |
OraGlobalButtonTextDisabled | Global Button Disabled |
OraTipText | Tip Text for page or section of page |
OraTipLabel | Tip label (the word "Tip") in bold |
OraInlineErrorText | Inline Error Text embedded in page content (not in message box; not for other message types) |
OraInlineInfoText | Inline Info and Hint Text embedded in page content (not in message box; not for other message types) |
OraTextInline | Variant of OraInlineInfoText - not specified in current BLAF guidelines |
OraErrorHeader | Header for Error Message Only |
OraErrorNameText | Error Name Text |
OraMessageBoxList | numbered list within message box for list of informational or warning messages (not for error messages) |
OraMessageBoxLink | blue links in message boxes - current BLAF guidelines specify brown links |
OraMessageBoxParagraph | body text in non-error message boxes |
OraMessageBoxErrorList | numbered list in red text within message box for list of error messages |
OraMessageBoxErrorLink | blue links in message boxes - current BLAF guidelines specify brown links |
OraMessageBoxErrorParagraph | red paragraph text in Error message boxes |
OraPrivacy | Link in Footer to Privacy Statement |
OraCopyright | Copyright Statement Text in Footer |
OraCalendarTitle | Title of Date Picker - usually name of the month |
OraCalendarHeader | Date Picker column headers - usually days of the week |
OraCalendarEnabled | Days in Date Picker that can be selected |
OraCalendarDisabled | Days in Date Picker that are invalid for the current context |
OraCalendarSelected | Selected days(s) in the in Date Picker |
OraShuttleLinkText | Link text placed below each arrow button in the middle of the shuttle |
TAB/NAVIGATION/LOCATOR CSS DEFINITIONS | |
OraNav1Selected | Tab [level 1] selected |
OraNav1Enabled | Tab [level 1] enabled |
OraNav1Disabled | Tab [level 1] disabled |
OraNav2Selected | Horizontal Navigation [level 2] selected |
OraNav2Enabled | Horizontal Navigation [level 2] enabled |
OraNav2Disabled | Horizontal Navigation [level 2] disabled |
OraNav3Selected | Side Navigation [level 3] selected |
OraNav3Enabled | Side Navigation [level 3] enabled |
OraNav3Disabled | Side Navigation [level 3] disabled |
OraNavBarActiveLink | used for enabled NavigationBarBean links (a "next" link when there are more items to view.) |
OraNavBarInactiveLink | used for NavigationBarBean Next/Previous links when there are no more Next/Previous contents to be viewed |
OraNavBarViewOnly | used for the step text (such as "Step 1 of 5") in a single-item NavigationBarBean |
OraTrainActive | current page in step-by-step locator a.k.a. "train" |
OraTrainVisited | visited page(s) in step by step locator a.k.a. "train" |
OraTrainUnvisited | page(s) not yet visited page in step-by-step locator a.k.a. "train" |
OraCrumbsSelected | current page (without link) in breadcrumbs |
OraCrumbsEnabled | Pages higher in the hierarchy (with links enabled) in breadcrumbs |
HEADER CSS DEFINITIONS | |
OraHeader | Standard dark blue header on white background |
OraHeaderSub | Standard dark blue subheader on white background |
OraHeaderSubSub | Standard dark blue subsubheader on white background |
OraDarkHeader | Dark Header on dark beige in Side Navigation of Home page - usually subheader and subsubheader are used instead |
OraDarkHeaderSub | Dark Subheader on dark beige in Side Navigation of Home page |
OraDarkHeaderSubSub | Dark Subsubheader on dark beige in Side Navigation of Home page |
OraLightHeader | Light blue header on light or medium beige background for content containers - usually subheader and subsubheader are used instead |
OraLightHeaderSub | Light blue subheader on light or medium beige background - typically in content containers |
OraLightHeaderSubSub | Light blue subsubheader on light background - typically in content containers |
OraColorHeader | Header on Blue for content containers - usually subheader and subsubheader are used instead |
OraColorHeaderSub | Subheader on Blue - typically in content containers |
OraColorHeaderSubSub | SubsubHeader on Blue - typically in content containers |
OraPortletHeader | Portlet Content Header on White - currently only used for a Portal demo |
OraDarkPortletHeader | Portlet Content Header on Beige - currently only used for a Portal demo |
OraGlobalPageTitle | Global header when there are no Tab links |
TABLE CSS DEFINITIONS | |
OraTableTitle | Table Title - used instead of Subheader when other elements separate the subheader from the table AND no control bar is present |
OraTable | Background color for table gridlines |
OraTableControlBarText | text in table Control Bar (band appearing at top of some tables that contains controls) |
OraTableColumnHeader | Table Column Header |
OraTableColumnHeaderNumber | same as Table Column Header but with right aligned numeric header |
OraTableColumnHeaderIconButton | Table Column Header with centered action button |
OraTableSortableColumnHeader | Sortable Table Column Header -- cursor turns to hand over header cell |
OraTableSortableColumnHeaderNumber | sortable form of numeric Table Column Header |
OraTableSortableColumnHeaderIconButton | sortable form of Table Column Header with centered action button |
OraTableRowHeader | Table Row Header |
OraTableColumnFooter | for left-aligned text in table column footer, except for totals |
OraTableTotal | right-aligned "Total" label that appears in footer cell to left of numeric total |
OraTableAddTotal | left-aligned "Total" label that appears in column header cell |
OraTableTotalNumber | right-aligned total value that appears in footer cell below the totalled column |
OraTableTotalText | left-aligned total value -- useful in updateable tables with more than one totaled column |
OraTableCellText | Table Cell Text |
OraTableCellTextBand | Table Cell Text in row with band of color |
OraTableCellNumber | numeric Table Cell Text - only required if column features calculations |
OraTableCellNumberBand | numeric Table Cell Text in row with band of color - only required if column features calculations |
OraTableCellIconButton | Table Cell containing an action/navigation button |
OraTableCellIconButtonBand | numeric band color table cell containing an action/navigation button |
OraTableCellSelect | select column with check box or radio button |
OraTableCellSelectBand | select column with check box or radio button in row with band of color |
OraTableVerticalGrid | Table Background Vertical Grid Color |
OraTableVerticalHeaderGrid | Table Background Vertical Grid Color in Column Header |
OraTableHorizontalGrid | Table Background Horizontal Grid Color |
OraTableHorizontalHeaderGrid | Table Background Horizontal Grid Color in Row Header |
OraTableShadowHeaderGrid | renders shadow for sortable table headers??? |
OraTableHeaderLink | Used for column headers rendered by SortableHeaderBean for headers which aren't sortable |
OraTableSortableHeaderLink | Link in Header of Sortable Column |
OraTableDetail | Used for details child in conjunction with Hide/Show in a table row |
SPACING AND LAYOUT CSS DEFINITIONS | |
OraIndentHeader | Indents second and later occurrences of subheaders 20 pixels relative to page header |
OraSpacingHeader | Spacing for Page Title Header: 7 pixels above and 2 below |
OraSpacingHeaderSub | Spacing for first SubHeader on page: 10 pixels above and 2 below |
OraSpacingHeaderLarge | Spacing for second and later occurrences of subheaders: 20 pixels above and 2 below |
Monday, February 28, 2011
JavaScript Confirm Implementation in OAF
lolz XD I know it's not recommended, but I find redirecting the context to a dialog page not justifiable for a simple removal of a record in an advanced table ..
this snippet will append an OnClick event handler to a component (specifically an Image for this one). When a JavaScript call returns a false value, it will stop the page from submitting a request to the server.
TBC
this snippet will append an OnClick event handler to a component (specifically an Image for this one). When a JavaScript call returns a false value, it will stop the page from submitting a request to the server.
TBC
Image Partial Page Rendering PPR
you could not declaratively attach a fire partial action on an image component, but you can programmatically do it ..
things to take note is the PRIMARY_CLIENT_ACTION_ATTR attribute object and FirePartialAction class.
PRIMARY_CLIENT_ACTION_ATTR represents the Action Type attribute of the (image) component.
OADataBoundValueViewObject allows you to use SPEL binding
things to take note is the PRIMARY_CLIENT_ACTION_ATTR attribute object and FirePartialAction class.
PRIMARY_CLIENT_ACTION_ATTR represents the Action Type attribute of the (image) component.
OADataBoundValueViewObject allows you to use SPEL binding
Sunday, February 27, 2011
PER_CONTACT_RELATIONSHIPS
this table contains information on the employee's spouse, children, etc.
TBC
TBC
Wednesday, February 16, 2011
OAF Formatting Dialog Pages
by default, dialog page messages are formatted using only bold tags. However if you want to format it using other (combination of) tags ..
in Oracle Apps, first you need to wrap the message in html tags
this will tell UIX to use OAFormattedTextBean which will enable you to use the following tags
tags not on this list will be ignored @w@;;
sample usage:
in Oracle Apps, first you need to wrap the message in html tags
this will tell UIX to use OAFormattedTextBean which will enable you to use the following tags
tags not on this list will be ignored @w@;;
sample usage:
ResultSetMetaData
I was looking for a way to determine the number of columns in a ResultSet object when I encountered ResultSetMetaData. With this class I only need to call on the getColumnCount() method
String | getCatalogName(int column) | Gets the designated column's table's catalog name. |
String | getColumnClassName(int column) | Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. |
int | getColumnCount() | Returns the number of columns in this ResultSet object. |
int | getColumnDisplaySize(int column) | Indicates the designated column's normal maximum width in characters. |
String | getColumnLabel(int column) | Gets the designated column's suggested title for use in printouts and displays. |
String | getColumnName(int column) | Get the designated column's name. |
int | getColumnType(int column) | Retrieves the designated column's SQL type. |
String | getColumnTypeName(int column) | Retrieves the designated column's database-specific type name. |
int | getPrecision(int column) | Get the designated column's number of decimal digits. |
int | getScale(int column) | Gets the designated column's number of digits to right of the decimal point. |
String | getSchemaName(int column) | Get the designated column's table's schema. |
String | getTableName(int column) | Gets the designated column's table name. |
boolean | isAutoIncrement(int column) | Indicates whether the designated column is automatically numbered, thus read-only. |
boolean | isCaseSensitive(int column) | Indicates whether a column's case matters. |
boolean | isCurrency(int column) | Indicates whether the designated column is a cash value. |
boolean | isDefinitelyWritable(int column) | Indicates whether a write on the designated column will definitely succeed. |
int | isNullable(int column) | Indicates the nullability of values in the designated column. |
boolean | isReadOnly(int column) | Indicates whether the designated column is definitely not writable. |
boolean | isSearchable(int column) | Indicates whether the designated column can be used in a where clause. |
boolean | isSigned(int column) | Indicates whether values in the designated column are signed numbers. |
boolean | isWritable(int column) | Indicates whether it is possible for a write on the designated column to succeed. |
Tuesday, February 15, 2011
Mapping FND_USER to PER_PEOPLE_F
I would just like to note myself, EMPLOYEE_ID in FND_USER is the PERSON_ID in PER_PEOPLE_F
Wednesday, February 9, 2011
View Object Data Management Configuration
normally this is how I configure my ViewObjects
- updatable access through entity objects
- for maintenance screens. This is good enough for simple CRUD operations.
- requires you to create EntityObjects which acts as an interface to the DB. When an EntityObject is configured to a ViewObject, changes you make in the VO data/attributes would be reflected in the database.
- via SQL query with read only access
- used when an SQL call can completely represent the data you need. One good thing about the ViewObject wizard is that when you configure the SQL query - it automatically maps the result set columns to the corresponding Java class/object attributes. (though I'm not sure with queries that have *)
- note that you can have multiple subqueries and even call PLSQL functions
- programmatic data population
- I use this with modules that need complex data manipulation and requires me to use PLSQL procedures and functions. (Prolly my favorite type @w@;;) A Cursor/ResultSet to ViewObject mapper method would be handy in this case (a sample source code is given in the OAF documentation)
- even Java alone can utilize this type of ViewObject
Using Bound Values for Screen Rendering
this method is an alternative to SPEL. moreover it doesn't require you to use a PVO
RENDERED_ATTR is part of UIConstants which is extended by OAWebConstants implemented by OAControllerImpl. So just browse UIConstants to know what attributes can you further control via setAttributeValue().
10022011 update
I made a file reader program to extract the ATTR attributes - sorted via MSExcel (will be useful as reference in the future)
RENDERED_ATTR is part of UIConstants which is extended by OAWebConstants implemented by OAControllerImpl. So just browse UIConstants to know what attributes can you further control via setAttributeValue().
10022011 update
I made a file reader program to extract the ATTR attributes - sorted via MSExcel (will be useful as reference in the future)
OAWebBeanConstants | UIConstants |
ADD_AUTOFOOTER_ATTR | ABBREVIATION_ATTR |
ADVANCED_SEARCH_CONDITION_DISPLAY_ATTR | ACCESS_KEY_ATTR |
ADVANCED_SEARCH_CONDITION_VALUE_ATTR | ALIGNMENT_GROUP_ATTR |
ADVANCED_SEARCH_LIST_DISPLAY_ATTR | ALL_DETAILS_ENABLED_ATTR |
ADVANCED_SEARCH_LIST_VALUE_ATTR | ALLOWS_TRANSPARENT_ATTR |
AGGREGATE_FUNCTION_ATTR | ALTERNATE_TEXT_ATTR |
ALLOW_BLANK_VALUE_ATTR | ANCESTOR_ATTRIBUTE_NAME |
ANCESTOR_NODE_ATTR | ANCESTOR_ID_ATTR |
ATTACH_APPROVAL_REQUIRED_VIEWATTRIBUTE | ANCESTOR_PATH_ATTR |
ATTACH_ENTITY_NAME_DISPLAY_ATTRIBUTE | ANCHOR_ATTR |
ATTRIBUTE_APPLICATION_ID | ANNOTATION_ATTR |
ATTRIBUTE_APPLICATION_ID_ATTR | ATTRIBUTE_MAP_NAME |
ATTRIBUTE_CODE | AUTOFLIP_ATTR |
ATTRIBUTE_CODE_APPID_ATTR | AUTOMATIC_ATTR |
ATTRIBUTE_CODE_ATTR | AUTOSTART_ATTR |
ATTRIBUTE_CODE_KEY_ATTR | BACKGROUND_ATTR |
ATTRIBUTE_LABEL_LONG | BETWEEN_TEXT_ATTR |
AUTO_FOOTER_ATTR | BLOCK_ON_EVERY_SUBMIT_ATTR |
BLOCK_SIZE_ATTR | BLOCK_SIZE_ATTR |
CALLED_FROM_QUERY_ATTR | BORDER_WIDTH_ATTR |
CATEGORY_ID_ATTR | BOUND_ATTRIBUTE_NAME |
CATEGORY_MAPPINGS_ATTR | BREAD_CRUMB_TEXT_ATTR |
CATEGORY_NAME_ATTR | BULLETS_GROUP_ATTR |
CELL_NO_WRAP_FORMAT_ATTR | CALENDAR_ID_ATTR |
CHILD_VIEW_ATTRIBUTE_NAME | CATEGORY_TITLE_ATTR |
CHILD_VIEW_AUTO_QUERY_ATTR | CELL_PADDING_ATTR |
CLEAR_CACHE_ATTR | CELL_SPACING_ATTR |
COLUMN_HEADER_CHILD_ATTR | CHECKED_ATTR |
COLUMNS_ATTR | CHILD_BLOCK_SIZE_ATTR |
CONTENT_VIEW_ATTR_NAME | CHILD_DATA_ATTR |
CONTENTS_GROUPING_ATTR | CHILD_NAME_ATTR |
CRITERIA_FROM_ATTR | CHILD_TYPE_TEXT_ATTR |
CRITERIA_ITEM_ID_ATTR | CHROME_TYPE_ATTR |
CRITERIA_ROW_ATTR | CLICK_THRU_DESTINATION_URI_ATTR |
Thursday, February 3, 2011
OAF Callable Statement Parameter Binding
unfortunately ..
- when you set parameters using Ordinal binding, you must get OUT parameters via index
- you could only get OUT cursor parameter via index which forces you to use Ordinal binding - because CallableStatement only have getCursor(int index) method.
Advanced Table Single Selection
This component is used when you have a requirement that enables the user to select only one record (row) from a table. The idea is to "flag" the row attribute with a non-null value, in order to identify the selected row.
right click the advanced table then select New > Single Selection. It will appear as one of the advanced table components named tableSelection. Afterwards you need to configure an attribute that would act as a flag on the ViewObject you are using.
In this case, I have created a transient attribute named Selected
to determine the selected record, you must iterate the ViewObject and evaluate the "flag" transient attribute you created above. Or it might be possible to attach a firePartialAction on the single selection component then set a form value in the page so you can pass the value via parameters (theoretically it could be done - but I still have to verify this)
TBC ..
right click the advanced table then select New > Single Selection. It will appear as one of the advanced table components named tableSelection. Afterwards you need to configure an attribute that would act as a flag on the ViewObject you are using.
In this case, I have created a transient attribute named Selected
to determine the selected record, you must iterate the ViewObject and evaluate the "flag" transient attribute you created above. Or it might be possible to attach a firePartialAction on the single selection component then set a form value in the page so you can pass the value via parameters (theoretically it could be done - but I still have to verify this)
TBC ..
Tuesday, February 1, 2011
Looping through REF CURSOR
inside a LOOP you need to FETCH from the REF CURSOR to a RECORD (with matching field declarations). Then from the RECORD you could access the field values. Terminate the LOOP via EXIT command (syntax: EXIT WHEN [condition])
- RECORD must match the REF CURSOR's order/number of attributes
- in case the REF CURSOR is opened to a [SELECT *] on a table, use the table's %ROWTYPE (e.g. syntax PAYMENTS%ROWTYPE)
Tuesday, January 25, 2011
Monday, January 24, 2011
VARCHAR parameter input for SPEL
I have this PLSQL function that determines if an attribute will be readonly or not. It returns a VARCHAR2 type with value that is either TRUE or FALSE.
cursor builder
Apparently when you set 'TRUE' or 'FALSE' on a Boolean attribute type inside a ViewObject, OAF will automatically convert the String value to the corresponding Boolean object (hmm autoboxing? not quite =w=;;)
SPEL configuration for read only attribute
still working @w@;;
cursor builder
Apparently when you set 'TRUE' or 'FALSE' on a Boolean attribute type inside a ViewObject, OAF will automatically convert the String value to the corresponding Boolean object (hmm autoboxing? not quite =w=;;)
SPEL configuration for read only attribute
still working @w@;;
Getting the Alias of a View Object Attribute
there was a time that I needed to map View Object attributes' DB column names with attribute names. However when you define a transient attribute, there will be no column name defined for it - so I resorted using the alias. Even if an attribute is not mapped to SQL the alias attribute will always be accessible.
the critical thing to note is that when you use the OAViewObject.getAttributeDefs() method, you will get an AttributeDef array which doesn't outright define the alias attribute. You need to cast it back to a ViewAttributeDefImpl object in order to make the method getAliasName() available.
the critical thing to note is that when you use the OAViewObject.getAttributeDefs() method, you will get an AttributeDef array which doesn't outright define the alias attribute. You need to cast it back to a ViewAttributeDefImpl object in order to make the method getAliasName() available.
Subscribe to:
Posts (Atom)