Please disable your adblock and script blockers to view this page

Search this blog

Wednesday 5 March 2014

Igonre null values in viewCriteria -Jdeveloper 12c (Not a bug but a change)

Hello All,
In jdev 12c there is some change in viewCriteria design window, there is a checkbox to ignore null values in criteria , in 11g release it was enabled for all values in criteria item

but in 12c it is disabled for all values of ViewCriteria bind variable


there is two different section for creating bind variable in 12c
1. ViewCriteria Bind Variable
2. Query Bind Variable(Required)
So when you create a bind var of string type in query variables.




and use it in viewCriteria , only then this 'ignore null values' checkbox will be enabled


and when you use viewCriteria bind varibles it is disabled  but sometimes you need to change it, so can change it using ViewObject xml source

  • Select ViewCriteria and go to source
  • Now change GenerateIsNullClauseForBindVars="false"  to true

 Cheers :-)

Tuesday 4 March 2014

Showing white-spaces properly in ADF table column- 11g & 12c

Hello All,
This posts talks about a requirement of showing white-spaces before any text/number in an af:table
Suppose i have , form and table of a ViewObject on page

Case 1- both table and form are editable , in this case you can see that white spaces are properly visible in both form and table

but normally in applications we have a read-only table and editable form so in this case you can see that white-spaces are not visible in table

But sometimes we need to show spaces in table same as in form so to do this select that field and go to property inspector and select component




Now set it's contentStyle (for input component as- af:inputText) or inlineStyle (for display component as- af:outputText)- white-space:pre;




now run your page and see-

 Cheers :-)


Tuesday 28 January 2014

Disabling keyboard input in af:inputDate, restrict user to use calendar only - Oracle ADF

hello all,
this tutorial is about a requirement of restricting user to enter date through calendar only in ADF application
this trick was posted by Frank Nimphius (ADF Code Corner)

  • Drop a af:inputDate component on page from component pallete



  • Now set its background color so that it looks like disabled field

  • Now to make it's input field disable, we have to write a small javascript function, copy this function and paste in your page source (XML)

  • <af:resource type="javascript">
              function enableCalendarOnly(evt) {
                  evt.cancel();
              }
            </af:resource>
    

  • Now drop a af:clientListener under af:inputDate component to invoke javascript



  • Now set properties in af:clientListener as Method & Type



  •  Now run your page and see that input field is disabled for date component , now value can be selected using calendar only

 Cheers - Happy Learning :-)