Posts

Showing posts from October, 2014

Image download servlet

Image
Requirement : In Application we need to show image in image component. I have followed below approach. Created servlet and mapped its url to image source attribute. Please follow below screen shot. and ImageServlet code.. public class ImageServlet extends HttpServlet {     private static final String CONTENT_TYPE = "image/jpeg; charset=UTF-8";     public void init(ServletConfig config) throws ServletException {         super.init(config);     }     public void doGet(HttpServletRequest request,                       HttpServletResponse response) throws ServletException,                                                            IOException {         response.setContentType(CONTENT_TYPE);         String appModuleName = "yash.hr.model.am.AppModule";         String appModuleConfig = "AppModuleLocal";         ApplicationModule am = null;         ViewObject vo = null;         try{             String emp_id=request.getParameter("em

How to track the row changes in ADF

Requirement:  Want to store the old value of attribute in some other table if user change it. Solution : Define EntityImpl Class. Override the doDML() method of the same entity. Define EntityDefImpl Class of another entity though which preserve the changes in some another table. Please see below code     protected void doDML(int operation, TransactionEvent e) {         super.doDML(operation, e);         if(operation==DML_INSERT){           System.out.println("DML INSERT");           }         if(operation==DML_UPDATE){             System.out.println("Update operation");             System.out.println("-1-");             String entityName = "yash.hr.model.eo.EmpAudit";             System.out.println("-2-");             EntityDefImpl deptDef = EntityDefImpl.findDefObject(entityName);             System.out.println("-3-");             EntityImpl newDept = deptDef.createInstance2(getDBTransaction(), null); Sys

How to fix the ADF Security error “JpsAnonymousRoleImpl” in Jdev 11.1.1.6.0

I have created a sample ADF application in Jdev 11.1.1.6.0 and when executed in “Integrated Weblogic server” within Jdev, it did not display any error message in the console and the application web page is loaded in the default browser successfully. Now I added the  ADF Security  for the Application. To do this, From the Menu options select the  Application  –> select  Secure -> Configure ADF Security ADF Authentication and Authorization  –> Form Based Authentication (Generate the default login and error pages. Should be something like “/ login.html “) -> No Automatic Grants -> Finish. Now when I executed my Application in Jdev, I was getting the “ <CodebasePolicyHandler> <migrateDeploymentPolicies> Migration of codebase policy failed. Reason: {0}. oracle.security.jps.JpsException: java.lang.IllegalArgumentException: oracle.security.jps.internal.core.principals.JpsAnonymousRoleImpl ”    error before my web page opens up in the browser. Even after yo

How to call method call activity between train flow in taskflow

Image
Problem : We need to call method call activity in between two view activity in Taskflow. Solution : We need to to following changes in Taskflow, 1) Add wild card flow and point it to method call activity 2) Set the outcome attribute of view activity under the Train stop section to the wild card flow outcome. Please refer below screen shot,