Posts

Showing posts from 2015

Disabling Holidays and weekends days in af:inputDate component

Image
Hello, In this post, I would like to explain the disabling functionality on specific dates in input date component in adf. in the above date component i have disabled the Friday and Saturdays in every month and 1st 2nd 5th dates are the holidays as per my calendar so i disabled this list of dates. In order to achieve this functionality we need a special class that implements the "DateListProvider" interaface with one overriden method is as follows. package com.tata.guru.view; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.List; import javax.faces.context.FacesContext; import org.apache.myfaces.trinidad.model.DateListProvider; public class DatePageBean  implements DateListProvider {     public DatePageBean() {         super();     }     public List...

JDev/ADF -- Programmatically Deleting selected rows in ADF Table

Image
Hi, In this post i would like to explain you, how to delete selected rows from the table programmatically. Using check box selection. Employees Table with select Boolean check box. From the ValueChangeEvent, prepare one ArrayList with the keys of Selected Rows.     public void employeeSelectionListener(ValueChangeEvent valueChangeEvent) {         // Add event code here...         DCIteratorBinding dci = getEmployeeIterator(); // fetches the Employee Iterator Binding         if(valueChangeEvent != null && Boolean.parseBoolean(valueChangeEvent.getNewValue()+"")){         Row row = dci.getCurrentRow();         keyList.add(row.getKey());         }         else{        ...