Skip to content

Instantly share code, notes, and snippets.

View ramannanda9's full-sized avatar

Ramandeep Singh ramannanda9

View GitHub Profile
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" djconfig="parseOnLoad:true"></script>
<script type="text/javascript">
dojo.require("dojo.fx");
dojo.require("dojo.fx.easing");
dojo.require("dojox.widget.Toaster");
dojo.require("dojo.parser");
dojo.require("dojo.io.script");
var doAddInfo=true;
var intervalId;
@ramannanda9
ramannanda9 / gist:1151035
Created August 17, 2011 07:34
Opss searchroles
SimpleSearchFilter filter=store.getSimpleSearchFilter(RoleProfile.NAME,SimpleSearchFilter.TYPE_EQUAL,null);
String wildCardChar=filter.getWildCardChar();
filter.setValue(wildCardChar);
SearchParameters parameters=new SearchParameters(filter,SearchParameters.SEARCH_ROLES_ONLY) ;
SearchResponse resp=store.searchRoles(Role.SCOPE_ANY, parameters);
while(resp.hasNext()){
Role role=(Role)resp.next();
}
@ramannanda9
ramannanda9 / gist:1200854
Created September 7, 2011 15:23
adf master detail
<af:panelBox id="pb5" text="#{vleadministrationuiBundle.DEMAND_DRAFT}" rendered="#{pageFlowScope.RecordVleDetailsBacking.isDemandDraftEnabled}"
>
<af:panelGroupLayout id="pgl21" layout="vertical" >
<af:panelCollection id="pc12" inlineStyle="width:630px">
<f:facet name="toolbar">
@ramannanda9
ramannanda9 / OID Operations
Created September 8, 2011 21:30
ADF Security Utility class
import java.security.Principal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
public static void resetAttributes(UIComponent rootComponent,AdfFacesContext adfFacesContext){
List<UIComponent> items = rootComponent.getChildren();
for ( UIComponent item : items ) {
resetAttributes(item,adfFacesContext);
if ( item instanceof RichInputText ) {
RichInputText input = (RichInputText)item;
if ( !input.isDisabled() &&!input.isReadOnly() ) {
@ramannanda9
ramannanda9 / Oracle account unlock utility
Created January 30, 2012 21:16
Account unlock utility
CREATE OR REPLACE PROCEDURE "SYS"."ACCOUNT_UNLOCKER" ( p_user in varchar2 )
is
temp_password varchar2(255);
begin
select password into temp_password from sys.user$ where upper(name)=upper(p_user
);
execute immediate 'alter user '||p_user||' account unlock ' ;
execute immediate 'alter user '||p_user|| ' identified by values '''||temp_passw
ord||'''';
end;
@ramannanda9
ramannanda9 / good wsdl
Created October 15, 2012 18:16
Good WSDL ? Good Schema ?
<wsdl:definitions
name="OMTAutomationService"
targetNamespace="http://ramannanda.blogspot.co.in/OMTAutomationService/"
xmlns:tns="http://ramannanda.blogspot.co.in/OMTAutomationService/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<wsdl:types>
@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;
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 / 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