Skip to content

Instantly share code, notes, and snippets.

View ramannanda9's full-sized avatar

Ramandeep Singh ramannanda9

View GitHub Profile
@ramannanda9
ramannanda9 / Person.java
Created July 5, 2014 12:56
Person Class
public class Person {
private String firstName;
private String lastName;
public Person() {
super();
}
public void setFirstName(String firstName) {
this.firstName = firstName;
<af:table var="row" rowBandingInterval="0" id="t11"
binding="#{pageFlowScope.tempBean.table}" value="#{pageFlowScope.tempBean.valuesList}"
rowSelection="multiple"
queryListener="#{pageFlowScope.tempBean.onQuery}"
filterModel="#{pageFlowScope.tempBean.qs}"
filterVisible="true" emptyText="no result found">
<af:column sortProperty="firstName" sortable="true" filterable="true"
headerText="FirstName" id="c1">
<af:outputText value="#{row.firstName}" id="ot1"/>
@ramannanda9
ramannanda9 / FilterBeanInJava
Created July 5, 2014 12:52
It is used to filter the content in a managed bean
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ramannanda9
ramannanda9 / gist:8689024
Created January 29, 2014 14:24
programmatic view object example
public class UserTrVOImpl extends ViewObjectImpl {
/**
* This is the default constructor (do not remove).
*/
public UserTrVOImpl() {
}
private int resultSize=0;
protected Iterator<User> userIterator;
private boolean inExecuteEmptyRowSet = false;
@ramannanda9
ramannanda9 / gist:8149182
Created December 27, 2013 16:18
Enabling filtering adf table
//in bindings add
<searchRegion Criteria=""
Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
Binds="IteratorName" id="DummyName"/>
//in fragment use af:table add the following
filterModel="#{bindings.DummyName.queryDescriptor}"
queryListener="#{bindings.DummyName.processQuery}"
@ramannanda9
ramannanda9 / gist:8147672
Last active January 1, 2016 12:58
Recursive delete organization, Its users or permissions, remove inheritance and itself.
/**
* This method recursively deletes and organization and its permission objects/users
* Its descendants if any are there before deleting the organization
* @param orgUnit The orgUnit name
* @param delAdmMgr A delegated Admin Manager instance
* @param revMgr A Delegated review manager instance
* @param rvMgr A review manager instance
* @param admMgr A admin manager instance
* @return
*/
@ramannanda9
ramannanda9 / gist:7344308
Created November 6, 2013 21:21
AMimpl test and OIDOperations class
package model;
import java.util.Map;
import java.util.logging.Level;
import model.common.AppModule;
import oracle.adf.share.logging.ADFLogger;
@ramannanda9
ramannanda9 / 0_reuse_code.js
Created September 28, 2013 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
package sahaj.apps.vleadministration.view.bean;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
import oracle.adf.model.RegionBinding;
@ramannanda9
ramannanda9 / mysql_geoplanet.sql
Last active December 17, 2015 22:09
MySql GeoPlanet data and data loading script
CREATE TABLE `places` (
`woeid` int(15) NOT NULL,
`iso` varchar(6) NOT NULL,
`name` text NOT NULL,
`language` varchar(6) NOT NULL,
`type` varchar(30) NOT NULL,
`parent` int(15) NOT NULL,
PRIMARY KEY (`woeid`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;