Skip to main content

Case Insensitive Filter

On the column just set the filterFeatures attribute to caseInsensitive

CODE ALTERNATIVE

1) Map your querylistener and table binding to methods in your backing bean.

2) Implement the above mentioned methods and so what you need to the filter:

public void queryListener(QueryEvent queryEvent){
FilterableQueryDescriptor des = (FilterableQueryDescriptor)getModuleTable().getFilterModel();
Map _criteriaMap = des.getFilterCriteria();
Set featureSet = new HashSet();
featureSet.add(FilterableQueryDescriptor.FilterFeature.CASE_INSENSITIVE);
Iterator criteriaIter = _criteriaMap.keySet().iterator();
Map filterFeatures = new HashMap();
while (criteriaIter != null && criteriaIter.hasNext()){
String keyCr = (String)criteriaIter.next();
((HashMap)filterFeatures).put(keyCr, featureSet);
}
des.setFilterFeatures(filterFeatures);
JSFUtils.invokeMethodExpression("#{bindings.MdsModuleElementsVO2Query.processQuery}", Object.class, QueryEvent.class, queryEvent);
}

private RichTable moduleTable;

public void setModuleTable(RichTable moduleTable){
this.moduleTable = moduleTable;
}

public RichTable getModuleTable(){
return moduleTable;
}

Comments

Popular posts from this blog

OJDeploy: Documentation for the tool

Real DOCS:  http://docs.oracle.com/cd/E26098_01/user.1112/e17455/deploying_apps.htm#OJDUG645 OJDeploy Documentation if you run it from the command line - I keep looking for this so I though I would post it here so I remeber. Oracle JDeveloper Deploy 11.1.2.1.0.6081 Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. Usage:   ojdeploy -profile <name> -workspace <jws> [ -project <name> ] [ <options> ]   ojdeploy -buildfile <ojbuild.xml> [ <options> ]   ojdeploy -buildfileschema Arguments:   -profile               the name of the Profile to deploy   -workspace      full path to the JDeveloper Workspace file(.jws)   -project              name of the JDeveloper Project within the .jws where the Profile can be...

ADF: LOV Description instead of code

I keep on forgetting how to do this so this is a note to self in terms I understand (ie pictures): Add the related entiy object to yours (in the example we are adding RegionEO(list of values) to CountryEO) Now add the RegionName field from the EO and a transient attribute (I named mine RegionNameLOV) Make the transient attribute updateable and base it on the expression RegionName (the description you wish to display) Add a list of values to RegionNameLOV and map BOTH key to parent fk (region id here) AND RegionName to your transient coulmn (RegionNameLOV).  Map the transient as an Input text with List of Values. Then just drag the lov item onto the page (RegionNameLOV)

Util code

public static MethodExpression getMethodExpression( String expr, Class returnType, Class[] argTypes){ FacesContext fc = FacesContext.getCurrentInstance(); ELContext elctx = fc.getELContext(); ExpressionFactory elFactory = fc.getApplication().getExpressionFactory(); return elFactory.createMethodExpression( elctx, expr, returnType, argTypes); } public static javax.faces.el.MethodBinding getMethodBinding( String expr, Class[] argTypes){ FacesContext fc = FacesContext.getCurrentInstance(); ELContext elctx = fc.getELContext(); return fc.getApplication().createMethodBinding(expr, argTypes); } SetPropertyListener listener = new SetPropertyListener( ActionEvent.class.getName()); listener.setFrom(link.getRoute()); listener.setValueExpression("to", JSFUtils.getValueExpression("#{pageFlowScope.route}", String.class)); action.addActionListener(listener); AdfFacesContext.getCurrentInstance().getPageFlowScope() .put("route", lin...