Saturday, August 28, 2010
Static Imports
We use "imports" in java so that in order to refer classes we don't have to use fully qualified name. Similar, static imports are used so that we don't have to use classname to call a static method. e.g. java.lang.String class contains a lot of static methods, so you can import this class statically and later on in the code just use method name to use it without mentioning "String" class name. Static imports are usually used when you are using a class's static methods repeatedly.
Wednesday, August 18, 2010
In order get application's context path in JSF, do the following:
FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
Friday, August 6, 2010
Programmatically Setting Filter for ADF Table
You can set the criteria programmatically to filter data in ADF table by:
DCBindingContainer bc = (DCBindingContainer)context.getApplication().evaluateExpressionGet(facesContext, "#{bindings}", DCBindingContainer.class); if (bc != null){ DCIteratorBinding ib = (DCIteratorBinding)bc.getIterBindings().get(p_binding); if (ib != null) ViewObject vo = ib.getViewObject(); if (vo != null) vo.setWhereClause('your clause'); }
Labels:
adf,
filter,
IteratorBinding,
prorammatically,
Table,
whereClause
Subscribe to:
Posts (Atom)