Wednesday, September 25, 2013

Check if application module is dirty or not ADF

       
public Boolean getAmChangesExist() {
BindingContext bc = BindingContext.getCurrent();
ApplicationModule am = bc.getDefaultDataControl().getApplicationModule();
return am.getTransaction().isDirty();
}

public Boolean getDcFramechangesExist() {
BindingContext bc = BindingContext.getCurrent();
String currentDataControlFrame = bc.getCurrentDataControlFrame();
return bc.findDataControlFrame(currentDataControlFrame).isTransactionDirty();
}
http://adfbugs.blogspot.com/2009/12/pending-changes-in-adf-application.html

Validating Input Text fields ADF

 <af:convertNumber integerOnly="true" groupingUsed="false"
                          type="number" maxIntegerDigits="3"
                          maxFractionDigits="0" minFractionDigits="0"/>
        <af:validateLongRange minimum="0" maximum="500"/>

http://technology.amis.nl/2007/06/19/rich-validation-functionality-in-oracle-adf-faces-11g-rich-components/

Disable future Date on ADF “inputDate” Component

Tuesday, September 24, 2013

Using sql functions to validate input fields ADF

Table filter not working

In an application module out of the box feature of filtering tables doesn't work for all the view objects for some reason

For the same view object filter works fine in another application module..should check why this happens 

Timestamp datatype in View Object gets the date and timestamp ADF

Normal Date type for an attribute in View Object always shows hours as 00:00:00 though you have mentioned yyyy-MM-dd 'at' hh:mm:ss a in the control hints of the Attribute in VO

a is for AM/PM
hh is for 12 hours / HH is for 24 hours time








Saturday, September 21, 2013

ViewExpired Exception ADF

By default the value of org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS in web.xml is set   to 3, try to set the value to 20 and try                                                                                                                                                        




Wednesday, September 18, 2013

Compare 2 groovy expressions ADF using && operator to render a button

#{securityContext.userInRole['Officer'] && row.bindings.InspectionStatus.inputValue == 'APPROVED'}

Get username from security context in backing bean ADF

ADFContext.getCurrent().getSecurityContext().getUserName()

Resolve Expression in backing bean ADF

 BigDecimal getValue=(BigDecimal)JSFUtils.resolveExpression(expression);

Tuesday, September 17, 2013

refresh page after taskflow return ADF

http://www.jobinesh.com/2010/08/refresh-parent-view-when-in-line-popup.html

Use returnListener for the action button/link to do some functionality on the parent page on return from TaskFlow

Use Run As Dialog on the TaskFlowCall to open the TaskFlow as a dialog window instead of overwriting the parent window

Thursday, September 12, 2013

Groovy Expression to render a button based on the inspection status

#{row.bindings.InspectionStatus.inputValue == 'Pending' || 'Reject' || 'Approve'}