Sunday, December 16, 2012

ADF Query Panel with CheckBox (Boolean search attribute)


In database the Boolean values in a column are usally stored as Y and N. This example shows how to search such columns using CheckBox.

      1.       Add a new attribute in view object. Select Mapped to Column or SQL, unselect Selected in Query, provide the alias and SQL expression DECODE(ACTIVE,’Y’,1,’N’,null).




         2.       In the attribute control hints select control type as Check Box



       3.       In query tab create view criteria to use as search panel.


       4.       From data controls, drag and drop the view criteria as ADF Query panel with table.


        5.       Run the page and use the checkbox to search for active and inactive users.


      6.       You can also provide a default value for the checkbox in viewcriteria.
    
      7.       You can download the complete example here.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...