Please disable your adblock and script blockers to view this page

Search this blog

Showing posts with label jsf. Show all posts
Showing posts with label jsf. Show all posts

Monday, 10 April 2017

ADF Basics| Tip to Hide af:inputListOfValues search popup at runtime

Hello All

Previously I have posted about a requiremnt of  hiding af:inputListOfValues search icon using CSS
ADF Skinning | Hiding search icon of af:inputListOfValues using CSS & StyleClass

In that solution search icon doesn't appear on page but it is a part of JSF component tree so when user press TAB+SPACE after entering a value in lov component then search popup appears on screen as this action invokes search icon click event

Recently a Friend of mine came across another requirement that was not showing lov popup at all as only autoSuggest behavior was required , so for this first way is to use autoSuggest behavior in an af:inputText compoent using Lov bindings and second way is to short circuit component life cycle

Thursday, 28 August 2014

Create taskFlow and region binding at run-time , show n numbers of regions using multiTaskFlow- Oracle ADF

This is very specific development requirement to create taskFlow and region binding at run-time to show n numbers of region in page
In this case initially you don't know how much regions required in page as it depends on user activity .

you can see in http://irctc.co.in/ (Indian Railways) site
when user search for a train and check berth availability then a tab is generated at run-time with berth and fare details and it continues for each action , every time a new tab with new information is generated (n- number of tab and taskFlow)

A very good article is published in Oracle Magazine (July – August 2014) by Frank Nimphius on this requirement , article contains very good description of each and every step and a sample application with whole functionality
I found it very interesting and good so giving a quick overview of TaskFlow on Fly

this functionality is implemented using multiTaskFlow element that uses taskFlow binding from managed bean , taskFlow bindings in managed bean created using TaskFlowBindingAttributes
this class is used to set all properties of taskFlow binding at runtime



See Oracle docs (TaskFlowBindingAttributes)-
Set of attributes that define a TaskFlowBinding object. The taskFlowList attribute of the multiTaskFlow element of the page definition uses a list of object of this type to describe each taskflowBinding that the multiTaskflow binding contains. The order of this list defines the order of the region objects in the multiTaskflow binding. 

So in this post i am using Departments and Employees table of HR Schema(Oracle) to create business components for Model part


Create viewCriteria in both viewObjects (Departments and Employees) to filter data using DepartmentId




Applied viewCriteria to viewObject at AM level (Edit Vo instance and shuttle viewCriteria to selected side)
After this created methods in AMImpl class to set value in both viewCriteria's bind variables


    /**Method to filter Department ViewObject
     * @param deptId
     */
    public void filterDepartmentData(Integer deptId) {
        this.getDepartments1().setNamedWhereClauseParam("BindDeptId", deptId);
        this.getDepartments1().executeQuery();

    }

    /**Method to filter Employees Data
     * @param deptId
     */
    public void filterEmployeesData(Integer deptId) {
        this.getEmployees1().setNamedWhereClauseParam("BindDeptId", deptId);
        this.getEmployees1().executeQuery();

    }

Expose both methods to use in clientInterface

Now viewController part-

Created two bounded taskFlow with one input parameter for DepartmentId (this id will be used to filter Departments and Employess viewObject)
One for Departments and Second for Employees-

First taskFlow has a .jsff (facelets) page that has Departments viewObject as a form , just to show date with navigation buttons
filterDepartmentData method of AMImpl is used as Default Activity of this taskFlow
to filter data before entering in page
 
 
 

Second taskFlow has a .jsff (facelets) page that has Employees viewObject as a table
filterEmployeesData method of AMImpl is used as Default Activity of this taskFlow
to filter data before entering in page



Now basic configuration is complete, model is ready and bounded taskFlows are ready
then create a jsf page and manged bean (pageFlowScope) in adfc-config.xml, this page will make use of these two bounded taskFlows  and managed bean is responsible to generate taskFlow binding at runtime

Next Step is to prepare manged bean to hold taskFlowBinding-
Create a List of type TaskFlowBindingAttributes and it's accessors


import oracle.adf.controller.binding.TaskFlowBindingAttributes;    
private List<TaskFlowBindingAttributes> taskFlowBinding = new ArrayList<TaskFlowBindingAttributes>(5);

    public void setTaskFlowBinding(List<TaskFlowBindingAttributes> taskFlowBinding) {
        this.taskFlowBinding = taskFlowBinding;
    }

    public List<TaskFlowBindingAttributes> getTaskFlowBinding() {
        return taskFlowBinding;
    }

Create multiTaskFlow binding in executables of pgae-

  • Open jsf page, click on bindings tab of page editor
  • click on green plus icon of executables section
  • Select ADF TaskFlow Bindings in category and select multiTaskFlow


  • click on ok and provide an unique value for id attribute and reference of List created in managed bean as value for taskFlowList attribute


  • Configuration of  multiTaskFlow for this page is complete and now time to design page to render multiple regions. For this purpose add af:ForEach and a region inside it, forEach is responsible to add regions at run-time. here a little change i am using panelTabbed  to create tab at runtime and inside tab there will be region 
  • See this xml code- here nothing simple panelTabbed and forEach iterates over to list to identify number of items and varStatus of forEach is used to create id of showDetailItem at runtime as id must be unique. regionModel is referenced from var attributes of forEach as part of taskFlowBinding 

  •  <af:panelTabbed position="above" id="pt1" partialTriggers="b1">
                <af:forEach items="#{bindings.mtf1.taskFlowBindingList}" var="multiTF" varStatus="vs">
                   <af:showDetailItem id="Tab#{vs.index+1}" text="#{multiTF.name}" partialTriggers="b1">
                      <af:region value="#{multiTF.regionModel}" id="r1#{vs.index}" partialTriggers="::b1"/>
                   </af:showDetailItem>
                </af:forEach>
             </af:panelTabbed>
    

  • Now page is ready to show unknown (n) number of regions, here i am using two list and a button on page First List is of all departments and second one is static list to select information type (if user want to see Only Departments or Departments Wise Employees) and button to execute and add taskFlow from managed bean as per selected Department and 
  • Again a map is created in managed bean to store input parameters for taskFlow and it will used while setting and creating taskFlowBinding

  •     HashMap<String, Object> tfParam = new HashMap<String, Object>();
        public void setTfParam(HashMap<String, Object> tfParam) {
            this.tfParam = tfParam;
        }
    
        public HashMap<String, Object> getTfParam() {
            return tfParam;
        }
    

  • finally we will create taskFlow binding and set properties on button click (actionEvent of button), See this code-

  •     /**Method to create and set properties in TaskFlowBinding
         * @param actionEvent
         */
        public void displayDepartmentAction(ActionEvent actionEvent) {
            //Clear List to show newly created regions only
            taskFlowBinding.clear();
            System.out.println("List Cleared -Size>" + taskFlowBinding.size());
            //Check that user selects value in both List (Uses component binding to check)
            if (deptIdBindVal.getValue() != null && showTypeBind.getValue() != null) {
                //Put value in TaskFLow Parameter map, deptIdBindVal is binding of list of departments on page
                tfParam.put("DeptIdParam", deptIdBindVal.getValue());
    
                //Only Shows Departments taskFlow, if user selectes "Only Departments"
                if ("Only Departments".equalsIgnoreCase(showTypeBind.getValue().toString())) {
                    //Setting taskFlow properties
                    TaskFlowBindingAttributes tfAttr = new TaskFlowBindingAttributes();
                    //Creating Unique Id
                    tfAttr.setId("Department_" + deptIdBindVal.getValue());
                    //See bounded taskFlow name in WEB-INF and use here
                    tfAttr.setTaskFlowId(new TaskFlowId("/WEB-INF/DepartmentsBTF.xml", "DepartmentsBTF"));
                    //This EL refers parameter map created in this managedBean
                    tfAttr.setParametersMap("#{pageFlowScope.MultiTaskFlowBean.tfParam}");
                    //Finally add taskFlow to List
                    taskFlowBinding.add(tfAttr);
                } else { // Show both Departments and Employees
                    //Creating Departments TaskFlow binding
                    TaskFlowBindingAttributes tfAttr = new TaskFlowBindingAttributes();
                    tfAttr.setId("Department_" + deptIdBindVal.getValue());
                    tfAttr.setTaskFlowId(new TaskFlowId("/WEB-INF/DepartmentsBTF.xml", "DepartmentsBTF"));
                    tfAttr.setParametersMap("#{pageFlowScope.MultiTaskFlowBean.tfParam}");
                    taskFlowBinding.add(tfAttr);
                    //Creating Employee TaskFlow biniding
                    tfAttr = new TaskFlowBindingAttributes();
                    tfAttr.setId("Employees_" + deptIdBindVal.getValue());
                    tfAttr.setTaskFlowId(new TaskFlowId("/WEB-INF/EmployeesBTF.xml", "EmployeesBTF"));
                    tfAttr.setParametersMap("#{pageFlowScope.MultiTaskFlowBean.tfParam}");
                    taskFlowBinding.add(tfAttr);
                }
            }
        }
    

  • So Application with multiTaskFlow is ready , in this post i have used these two bounded taskFlow to show in two tabs at run-time, in same way you can call multiple TFs or a single taskFlow multiple time. Now runt application and see how it works

Initial page with two lists


Select Department and show type -click on button


Select Department and show type -click on button


  • Refer this post Region Extreme: Multi-Task-Flow Binding to learn more about multiTaskFlow binding. In this Frank also told about how to use dynamic viewObject instance to show different data at run-time, because if we use same instance of viewObject in multiple taskFlow at same time then it will not maintain state for each region to it is necessary to use dynamic instance and it's binding in pageDef
  • Read more about regions and taskFlows- Using Task Flows as Regions
Thanks - Happy Learning :) Sample ADF Application

Tuesday, 4 June 2013

Fun - Develop Tic Tac Toe game in Oracle ADF/Java

Tic Tac Toe or Naughty Cross is a paper-pencil game for two players and simple in  concept.
I have developed a application on ADF, using JSF page and unbounded adfc-config.xml .
There is nothing to explain, see the sample application at bottom of this post
  • Tic Tac Toe game has 9 square to enter values 0 or X, so for that i have used 9 buttons and images of 0 and X



  • And create a managed bean for all nine buttons, to execute proper conditions for each move
     
  • See managed bean code and conditions for player's move(only Java Code is needed to do this)



  • package ticTacToeADF.view;
    
    import javax.faces.event.ActionEvent;
    
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    
    public class TictactoeBean {
    
        public TictactoeBean() {
        }
        private static String one = "     ";
        private static String two = "     ";
        private static String three = "     ";
        private static String four = "     ";
        private static String five = "     ";
        private static String six = "     ";
        private static String seven = "     ";
        private static String eight = "     ";
        private static String nine = "     ";
        private static boolean check = false;
        private String Result = "";
        private static boolean oneDis = false;
        private static boolean twoDis = false;
        private static boolean threeDis = false;
        private static boolean fourDis = false;
        private static boolean fiveDis = false;
        private static boolean sixDis = false;
        private static boolean sevenDis = false;
        private static boolean eightDis = false;
        private static boolean nineDis = false;
    
    
        public void Button1(ActionEvent actionEvent) {
            if (check == false) {
                this.setOne("X");
    
                check = true;
                this.setOneDis(true);
                System.out.println("Check is--------->" + check);
                if (one.equalsIgnoreCase(two) && two.equalsIgnoreCase(three)) {
                    this.setResult(one + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (one.equalsIgnoreCase(five) && five.equalsIgnoreCase(nine)) {
                    this.setResult(one + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (one.equalsIgnoreCase(four) && four.equalsIgnoreCase(seven)) {
                    this.setResult(one + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
    
            } else {
                this.setOne("0");
    
                check = false;
                this.setOneDis(true);
                System.out.println("Check is--------->" + check);
                if (one.equalsIgnoreCase(two) && two.equalsIgnoreCase(three)) {
                    this.setResult(one + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (one.equalsIgnoreCase(five) && five.equalsIgnoreCase(nine)) {
                    this.setResult(one + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (one.equalsIgnoreCase(four) && four.equalsIgnoreCase(seven)) {
                    this.setResult(one + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
            }
    
        }
    
        public void Button2(ActionEvent actionEvent) {
            if (check == false) {
                this.setTwo("X");
                check = true;
                this.setTwoDis(true);
                System.out.println("Check is--------->" + check);
                if (two.equalsIgnoreCase(five) && five.equalsIgnoreCase(eight)) {
                    this.setResult(two + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (two.equalsIgnoreCase(one) && one.equalsIgnoreCase(three)) {
                    this.setResult(two + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            } else {
                this.setTwo("0");
                check = false;
                this.setTwoDis(true);
                System.out.println("Check is--------->" + check);
                if (two.equalsIgnoreCase(five) && five.equalsIgnoreCase(eight)) {
                    this.setResult(two + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (two.equalsIgnoreCase(one) && one.equalsIgnoreCase(three)) {
                    this.setResult(two + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            }
        }
    
        public void Button3(ActionEvent actionEvent) {
            if (check == false) {
                this.setThree("X");
                check = true;
                this.setThreeDis(true);
                System.out.println("Check is--------->" + check);
    
                if (three.equalsIgnoreCase(six) && six.equalsIgnoreCase(nine)) {
                    this.setResult(three + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(five) && five.equalsIgnoreCase(seven)) {
                    this.setResult(three + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(one) && one.equalsIgnoreCase(two)) {
                    this.setResult(three + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
            } else {
                this.setThree("0");
                check = false;
                this.setThreeDis(true);
                System.out.println("Check is--------->" + check);
    
                if (three.equalsIgnoreCase(six) && six.equalsIgnoreCase(nine)) {
                    this.setResult(three + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(five) && five.equalsIgnoreCase(seven)) {
                    this.setResult(three + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(one) && one.equalsIgnoreCase(two)) {
                    this.setResult(three + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            }
        }
    
        public void Button4(ActionEvent actionEvent) {
            if (check == false) {
                this.setFour("X");
                check = true;
                this.setFourDis(true);
                System.out.println("Check is--------->" + check);
    
                if (four.equalsIgnoreCase(one) && one.equalsIgnoreCase(seven)) {
                    this.setResult(four + " wins");
                    finishgame();
                    System.out.println("four wins");
                } else if (four.equalsIgnoreCase(five) && five.equalsIgnoreCase(six)) {
                    this.setResult(four + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
            } else {
                this.setFour("0");
                check = false;
                this.setFourDis(true);
                System.out.println("Check is--------->" + check);
    
                if (four.equalsIgnoreCase(one) && one.equalsIgnoreCase(seven)) {
                    this.setResult(four + " wins");
                    finishgame();
                    System.out.println("four wins");
                } else if (four.equalsIgnoreCase(five) && five.equalsIgnoreCase(six)) {
                    this.setResult(four + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            }
        }
    
        public void Button5(ActionEvent actionEvent) {
            if (check == false) {
                this.setFive("X");
                check = true;
                this.setFiveDis(true);
                System.out.println("Check is--------->" + check);
    
                if (one.equalsIgnoreCase(five) && five.equalsIgnoreCase(nine)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
    
                } else if (two.equalsIgnoreCase(five) && five.equalsIgnoreCase(eight)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
                else if (four.equalsIgnoreCase(five) && five.equalsIgnoreCase(six)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (five.equalsIgnoreCase(three) && three.equalsIgnoreCase(seven)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            } else {
                this.setFive("0");
                check = false;
                this.setFiveDis(true);
                System.out.println("Check is--------->" + check);
    
                if (one.equalsIgnoreCase(five) && five.equalsIgnoreCase(nine)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
    
                } else if (two.equalsIgnoreCase(five) && five.equalsIgnoreCase(eight)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
                else if (four.equalsIgnoreCase(five) && five.equalsIgnoreCase(six)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (five.equalsIgnoreCase(three) && three.equalsIgnoreCase(seven)) {
                    this.setResult(five + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
    
            }
        }
    
        public void Button6(ActionEvent actionEvent) {
            if (check == false) {
                this.setSix("X");
                check = true;
                this.setSixDis(true);
                System.out.println("Check is--------->" + check);
    
                if (four.equalsIgnoreCase(five) && five.equalsIgnoreCase(six)) {
                    this.setResult(six + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(six) && six.equalsIgnoreCase(nine)) {
                    this.setResult(six + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            } else {
                this.setSix("0");
                check = false;
                this.setSixDis(true);
                System.out.println("Check is--------->" + check);
    
                if (four.equalsIgnoreCase(five) && five.equalsIgnoreCase(six)) {
                    this.setResult(six + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(six) && six.equalsIgnoreCase(nine)) {
                    this.setResult(six + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            }
        }
    
        public void Button7(ActionEvent actionEvent) {
            if (check == false) {
                this.setSeven("X");
                check = true;
                this.setSevenDis(true);
                System.out.println("Check is--------->" + check);
    
                if (four.equalsIgnoreCase(one) && one.equalsIgnoreCase(seven)) {
                    this.setResult(four + " wins");
                    finishgame();
                    System.out.println("four wins");
                } else if (five.equalsIgnoreCase(three) && three.equalsIgnoreCase(seven)) {
                    this.setResult(seven + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (seven.equalsIgnoreCase(eight) && eight.equalsIgnoreCase(nine)) {
                    this.setResult(seven + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            } else {
                this.setSeven("0");
                check = false;
                this.setSevenDis(true);
                System.out.println("Check is--------->" + check);
                if (four.equalsIgnoreCase(one) && one.equalsIgnoreCase(seven)) {
                    this.setResult(four + " wins");
                    finishgame();
                    System.out.println("four wins");
                } else if (five.equalsIgnoreCase(three) && three.equalsIgnoreCase(seven)) {
                    this.setResult(seven + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (seven.equalsIgnoreCase(eight) && eight.equalsIgnoreCase(nine)) {
                    this.setResult(seven + " wins");
                    finishgame();
                    System.out.println("One wins");
                }
            }
        }
    
        public void Button8(ActionEvent actionEvent) {
            if (check == false) {
                this.setEight("X");
                check = true;
                this.setEightDis(true);
                System.out.println("Check is--------->" + check);
                if (eight.equalsIgnoreCase(two) && two.equalsIgnoreCase(five)) {
                    this.setResult(eight + " wins");
                    finishgame();
                    System.out.println("four wins");
                } else if (eight.equalsIgnoreCase(seven) && seven.equalsIgnoreCase(nine)) {
                    this.setResult(eight + " wins");
                    finishgame();
                    System.out.println("One wins");
    
                }
            } else {
                this.setEight("0");
                check = false;
                this.setEightDis(true);
                System.out.println("Check is--------->" + check);
                if (eight.equalsIgnoreCase(two) && two.equalsIgnoreCase(five)) {
                    this.setResult(eight + " wins");
                    finishgame();
                    System.out.println("four wins");
                } else if (eight.equalsIgnoreCase(seven) && seven.equalsIgnoreCase(nine)) {
                    this.setResult(eight + " wins");
                    finishgame();
                    System.out.println("One wins");
    
                }
            }
        }
    
        public void Button9(ActionEvent actionEvent) {
            if (check == false) {
                this.setNine("X");
                check = true;
                this.setNineDis(true);
                System.out.println("Check is--------->" + check);
                if (nine.equalsIgnoreCase(one) && one.equalsIgnoreCase(five)) {
                    this.setResult(nine + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(six) && six.equalsIgnoreCase(nine)) {
                    this.setResult(six + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (eight.equalsIgnoreCase(seven) && seven.equalsIgnoreCase(nine)) {
                    this.setResult(eight + " wins");
                    finishgame();
                    System.out.println("One wins");
    
                }
            } else {
                this.setNine("0");
                check = false;
                this.setNineDis(true);
                System.out.println("Check is--------->" + check);
    
                if (nine.equalsIgnoreCase(one) && one.equalsIgnoreCase(five)) {
                    this.setResult(nine + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (three.equalsIgnoreCase(six) && six.equalsIgnoreCase(nine)) {
                    this.setResult(six + " wins");
                    finishgame();
                    System.out.println("One wins");
                } else if (eight.equalsIgnoreCase(seven) && seven.equalsIgnoreCase(nine)) {
                    this.setResult(eight + " wins");
                    finishgame();
                    System.out.println("One wins");
    
                }
            }
        }
    
        public void setOne(String one) {
            this.one = one;
        }
    
        public String getOne() {
            return one;
        }
    
        public void setTwo(String two) {
            this.two = two;
        }
    
        public String getTwo() {
            return two;
        }
    
        public void setThree(String three) {
            this.three = three;
        }
    
        public String getThree() {
            return three;
        }
    
        public void setFour(String four) {
            this.four = four;
        }
    
        public String getFour() {
            return four;
        }
    
        public void setFive(String five) {
            this.five = five;
        }
    
        public String getFive() {
            return five;
        }
    
        public void setSix(String six) {
            this.six = six;
        }
    
        public String getSix() {
            return six;
        }
    
        public void setSeven(String seven) {
            this.seven = seven;
        }
    
        public String getSeven() {
            return seven;
        }
    
        public void setEight(String eight) {
            this.eight = eight;
        }
    
        public String getEight() {
            return eight;
        }
    
        public void setNine(String nine) {
            this.nine = nine;
        }
    
        public String getNine() {
            return nine;
        }
    
        public void setResult(String Result) {
            this.Result = Result;
        }
    
        public String getResult() {
            return Result;
        }
    
        public void ResetButton(ActionEvent actionEvent) {
            this.one = "     ";
            this.two = "     ";
            this.three = "     ";
            this.four = "     ";
            this.five = "     ";
            this.six = "     ";
            this.seven = "     ";
            this.eight = "     ";
            this.nine = "     ";
            this.check = false;
            this.oneDis = false;
            this.twoDis = false;
            this.threeDis = false;
            this.fourDis = false;
            this.fiveDis = false;
            this.sixDis = false;
            this.sevenDis = false;
            this.eightDis = false;
            this.nineDis = false;
    
        }
    
        public void finishgame() {
            this.oneDis = true;
            this.twoDis = true;
            this.threeDis = true;
            this.fourDis = true;
            this.fiveDis = true;
            this.sixDis = true;
            this.sevenDis = true;
            this.eightDis = true;
            this.nineDis = true;
        }
    
        public void setOneDis(boolean oneDis) {
            this.oneDis = oneDis;
        }
    
        public boolean isOneDis() {
            return oneDis;
        }
    
        public void setTwoDis(boolean twoDis) {
            this.twoDis = twoDis;
        }
    
        public boolean isTwoDis() {
            return twoDis;
        }
    
        public void setThreeDis(boolean threeDis) {
            this.threeDis = threeDis;
        }
    
        public boolean isThreeDis() {
            return threeDis;
        }
    
        public void setFourDis(boolean fourDis) {
            this.fourDis = fourDis;
        }
    
        public boolean isFourDis() {
            return fourDis;
        }
    
        public void setFiveDis(boolean fiveDis) {
            this.fiveDis = fiveDis;
        }
    
        public boolean isFiveDis() {
            return fiveDis;
        }
    
        public void setSixDis(boolean sixDis) {
            this.sixDis = sixDis;
        }
    
        public boolean isSixDis() {
            return sixDis;
        }
    
        public void setSevenDis(boolean sevenDis) {
            this.sevenDis = sevenDis;
        }
    
        public boolean isSevenDis() {
            return sevenDis;
        }
    
        public void setEightDis(boolean eightDis) {
            this.eightDis = eightDis;
        }
    
        public boolean isEightDis() {
            return eightDis;
        }
    
        public void setNineDis(boolean nineDis) {
            this.nineDis = nineDis;
        }
    
        public boolean isNineDis() {
            return nineDis;
        }
    
    
    }
    

  • Download and Run this sample application-Sample ADF Application