Monday, April 18, 2016

VO Iterator refresh condition - For example data appears only if input text box has some value (search area ) ADF

https://blogs.oracle.com/shay/entry/delay_method_execution_when_us

Thursday, April 14, 2016

Get Search Criteria value entered by the user (af:query search value on a page) ADF

        String searchField = null;
        RichQuery queryComp = theQueryComp; //qryId1 is the Id of af:query; (theQueryComp is binded to the bean)     QueryDescriptor queryDescriptor = queryComp.getValue();
        List criterionList = queryDescriptor.getConjunctionCriterion().getCriterionList();
        for (Criterion criterion : criterionList) {
            AttributeDescriptor attrDescriptor = ((AttributeCriterion) criterion).getAttribute();

            if (attrDescriptor.getName().equalsIgnoreCase("SearchFieldAttribute_from_VO ")) { // EmployeeId is one of the query items in the search pane
                searchField = (String) ((AttributeCriterion) criterion).getValues().get(0);

                //This is how we will access the query field
                System.out.println("searchField :" + searchField );//output should be 5000 with repect to the image shown below

            }
        }

Tuesday, April 5, 2016

ADF 12c Groovy Expression to get Primary Key from Sequence to EO

<Attribute
    Name="LnId"
    ColumnName="LN_ID"
    SQLType="NUMERIC"
    Type="java.math.BigDecimal"
    ColumnType="NUMBER"
    TableName="ABC_TABLE"
    PrimaryKey="true"
    IsEffectiveDateSequenceFlag="true">
    <TransientExpression
      trustMode="trusted"><![CDATA[(new oracle.jbo.server.SequenceImpl("SEQ_NAME", object.getDBTransaction())).
getSequenceNumber()]]></TransientExpression>
  </Attribute>