Skip to main content

Posts

Showing posts from April, 2013

El expression in ADF for substring

El Expression for getting the substring example :  rendered="#{fn:substring(pageFlowScope.Id,0,2) eq '01'}"    following expression gives you the substring of variable Id(which is in pageflowscope) "#{ fn:substring(pageFlowScope.Id,0,2) eq '01'}" for this you need to import the following file in your .jsff page  xmlns:fn=" http://java.sun.com/jsp/jstl/functions "

Accessing Data Controls and Bindings

1.To Get Attributre Value from iteraor binding         DCBindingContainer dcBindings = (DCBindingContainer)                                                                   BindingContext.getCurrent().getCurrentBindingsEntry();            DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("yourVOIteratorName");            Number Id = (Number)iterBind.getCurrentRow().getAttribute("ItemId");   2.Accessing Data Controls and Bindings Access AM DCBindingContainer bc = getBindingContainer(); SomeAppModule test...

Setting a bind variable value programmatically

  To set the value of a bind variable programmatically, 1. first get the   View Object  where the bind variable is defined. 2.Then from the   View Object  you need to get access to the  VariableValueManager   via the call  ensureVariableManager().   3. F inally you need to call  setVariableValue()   on the  VariableValueManager  to set the bind variable to a specific value . 4.Once all these are done, execute the View Object query with the new bind variable value by calling  executeQuery()    on the view  as shown below. Example:          ViewObjectImpl view = this.getYourView();         VariableValueManager vm = view. ensureVariableManager() ;         vm. setVariableValue ("bindVariableName", valuetoSet);         view.executeQuery();

Gettign AM connection in Managed Bean and accessing VO's

 public String genBillLine(ArrayList finalArray,String caseId){           CaseMgtAMImpl caseAM = null;      FinanceAMImpl finAM=null;      String result=null;      try{           testAM = (testAMImpl)Configuration.createRootApplicationModule("og.dr.sm.mgt.model.am.testAMImpl","testAMLocal");    // getting AM            finAM = (FinanceAMImpl)Configuration.createRootApplicationModule("og.dr.finmgt.model.am.FinanceAMImpl","FinanceAMLocal");          ArrayList partyIds=getPartyIds(caseId);          ViewObject billVo=finAM.getFinBillLinesVO();          Iterator it=finalArray.iterator();               ...

Integrating servlet in ADF application

Follow the following steps : 1. Create servlet in your viewcontroller(i.e required package). 2.When you create the servlet it gives you the url of your servlet.   ex. if name of your servlet is TempServlet.java then the url would be /tempServlet. 3.You can use this url wherever you want.That will be required in jsff inside the inlineframe 4.If you want to use it on popup then use inflineframe component .   ex. <af:inlineFrame id="if1" source="/tempServlet"/> 5. Use the doGet method of servlet to show the values from the servlet to the page or do the functionality what you want.        ex.      public void doGet(HttpServletRequest request,HttpServletResponse response)                                 throws  ServletException,IOException {  ...