Skip to main content

Posts

ADF: How to pass parameters between taskflows?

Simple stuff actually for most ADF users but this post is for the absolute beginners. Here is the sample Taskflow design and we need to pass parameters from Caller TF to Callee TF. Go to the definition of Callee TF and goto Parameters tab and define the Input Parameter Definitions. Now go to the taskflow design and click on the Callee TF and go to the properties tab. In the 'Parameters' section you will see the parameters that you defined earlier. Here you should fill in the values that you want to pass. On the event of which the Callee TF is called, you should set the values in the pageFlowScope.param1 and param2. <af:commandToolbarButton id="ctbCreate" action="dialog:showWizard" > <af:setPropertyListener from="0" to="#{pageFlowScope.dpDimensionId}" type="action" /> ...

[Deployer:149164]The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed.

If ever you see this error while starting an application in Jdev, you can perform following steps: 1. Go to admin console of the integrated weblogic: http://127.0.0.1:7101/console 2. Login to server console by using default username/password which would be weblogic/weblogic1. 3. On successful login just click the button on the upper left corner where you can activate pending changes or discard pending changes. This would resolve the issue. If however you are not able to logon to the weblogic console do either of these steps: a) Go to Jdeveloper installation directory. Search for *.lok files and delete them. b) If you find nothing in the above directory goto C:\Documents and Settings\ \Application Data\JDeveloper directory and delete edit.lok file. This will definitely resolve your issue.

How to create ADF components on runtime?

Quite easy actually! There are two methods by which we can do it. Either we can create the component in the managed bean and add it to the children of an existing component, or we can create it in our .jspx or .jsff page directly. 1) Creating component in the Managed Bean. In the below code we are creating a new ShowDetailItem which we will add to an existing panelTabbed item. private UIComponent createComponent() { UIComponent componentToAdd = null; //Create new object of ShowDetailItem and set its properties. RichShowDetailItem item = new RichShowDetailItem(); item.setDisclosed(true); item.setText("new tab"); componentToAdd = item; //Now that we are at it, I am creating a new iFrame which will be set inside the ShowDetailItem RichInlineFrame frame = new RichInlineFrame(); frame.setSource("http://oracle.com"); //add the iFrame to the children of the ShowDetailItem componentToAdd.getChildr...

Easiest way to print Timestamp in Java

Rather than using Calendar.getTime() we can use java.sql.Timestamp class to get the time stamp which gives date and time till millisecond precision. System.out.println(new Timestamp(System.currentTimeMillis())); Above will give you current timestamp in this format: 2010-07-27 16:37:45.39

File upload problem: UTF-8 encoding not honored when form has multipart/form-data

The problem that I was facing was something like this. I was using Apache Commons File Upload library to upload and download some file. I had a form in which user can upload a file and another field 'name' in which she can give any name to the file being loaded. When I submitted the form, the file was uploaded fine but the value in name field was garbled. I followed all the possible suggestions I found: <%@page pageEncoding="UTF-8"%> set. < %@page contentType="text/html;charset=UTF-8"% gt; set after the first directive. <meta equiv="Content-Type" content="text/html;charset=UTF-8"> in the head. enctype="multipart/form-data" attribute in the form. accept-charset="UTF-8" attribute in the form. in the Servlet: before doing any operations on request object: request.setCharacterEncoding("UTF-8"); For accessing the value FileItem item = (FileItem) iter.next(); if (item.isFormField()) { //Fo...

Version number is a rocket science for Chrome users?

At least Google seems to think so. Take a look at any of the Chrome download pages here or the Beta download page here . Nowhere we see the version numbers. So unless you download a version and install it you won't know which version are you going to use! Neat huh? Considering the fact that most of the Chrome users are early technology adopters and have switched from Firefox (which seems to give an overdose of versions!) this is moronic in my opinion. There are other and better ways to keep your homepage clean but not specifying version numbers? I am not sure!