Posts

Showing posts from September, 2013

Get value instead of index for LOV in ADF

Put a value change listner on LOv and autosubmit=true.  Inside the value change listner put the below code.     public void valueChangeDepartments(ValueChangeEvent valueChangeEvent) {         System.out.println("Selected Value is: "+resolveExpression("#{bindings.DepartmentId.attributeValue}"));     } Also put below method in bean.     public Object resolveExpression(String el) {           FacesContext facesContext = FacesContext.getCurrentInstance();         ELContext elContext = facesContext.getELContext();         ExpressionFactory expressionFactory =  facesContext.getApplication().getExpressionFactory();             ValueExpression valueExp = expressionFactory.createValueExpression(elContext,el,Object.class);         return valueExp.getValue(elContext);     }

Showing number of rows or row count on top and bottom of table in ADF.

Image
Hi Friends, We will see today how to show the page count on top and bottom of table in ADF. I am assuming that you all know how to create the table to show data from view object in ADF. Assume you have a table which contains the information of employees from employees table of HR schema. Now surround this table with a panel collection. Now your panel collection has some facet with name "statusbar", "toolbar" etc. Right click on facet "toolbar" and select "insert after f : facet toolbar and then "Facet Secondary Toolbar" as shown below in image. Now on facet "statusbar" and "secondaryToolbar" put toolbar component from component pallet. Then put a output text inside each toolbar as follows:  <f:facet name="secondaryToolbar">             <af:toolbar id="t3" stretchId="s2">               <af:spacer width="10" height="10" id="s2...