Author Archives: vtkrishn

Unknown's avatar

About vtkrishn

Vinod Krishnan has over 12 years experience in the Information Technology industry and a multifaceted career in positions such as Senior Consultant, Senior Applications Engineer, Software Engineer and Solution Architect for MNC’s like (Oracle, Capgemini, Keane). His many years of experience have exposed him to a wide range of Oracle Technologies that includes java, J2EE, Weblogic, Fusion Middleware, SOA and Webcenter. For the last five years, Vinod is actively involved in large implementations of next generation enterprise applications utilizing Oracle’s JDeveloper, Application Development Framework (ADF) technologies. He holds a B.Tech. in Information Technology from Anna University of Chennai, India.

Achieved!!


At last made an entry in Jdeveloper and ADF forum’s Top users list.. 10th now.. will soon climb up..

http://forums.oracle.com/forums/forum.jspa?forumID=83&start=0

jdevloper not taking the latest changes – what to do?


Sometime when you do the changes and run the application the latest changes are not updated while running the application.

The culprit is the system folder.

{user_home}\system11.1.1.4.37.57.75\o.j2ee\drs\

has the exploded war file which will have the classes that is old. deleting the classes from the exploded directory would definitely fix the issue.

How to select entire row using checkbox


To select all the rows in a table design a page like

 

 

 

 

 

 

create a binding to the table, the valuechangelistener of the checkbox will have the following code


 

 

 

 

 

working example can be downloaded from

http://adfproject.googlecode.com/files/SelectAllRowsInATable.zip

af:selectonechoice not getting updated


Today i had an interesting problem at work. The issue is that the user selects the value from a selectonechoice and moves to the next page and when he returns back to the same old page the selectonechoice is not updated with the value that is selected previously.

the selectonechoice is not bounded to any of the bindings and we manually create the list using the managed bean. here is the base snippet which resembles the problem


selectOneChoice simple="true" value="#{Bean.list.itemNo}" id="soc1" unselectedLabel="Please Select">
 selectItems value="#{Bean.listItems}"/>
 </af:selectOneChoice>

while debugging the value the value is all available but somehow the value is not shown in the selectonechoice. The value is again moves to the “Please Select” option specified in the unselectedLabel when the user moves back to the original page.

couple of things i tried which failed
1)binding to the bean and getting the value

2) having the value as “#{Bean.list[‘itemNo’]}”

finally I got to see the following warning in the log saying

13-Jul-2011 20:27:54 oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer _getSelectedIndex
WARNING: Could not find selected item matching value "1" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=soc1]

This warning gave me a hint to think the problem in a different way and leads to the solution

Actually the list that we are manipulating assigns the value on the fly like


....

List<SelectItem> items = new Arraylist();

...

//inside the method

items.add(new SelectItem(code.getItemlabel(), code.getItemValue()));

....
 

the above code has to rewritten as shown to solve the above mentioned issue


//inside the method

SelectItem item = new SelectIem();

item.setLabel(code.getItemlabel());

item.setValue(code.getItemValue()); //here the value should be an Integer value
//if the value is a String then this has to be like
//item.setValue(Integer.parseInt(code.getItemValue()));
items.add(item);

....
 

system folder not getting deleted… uffff


I am fed of this Jdeveloper.. Its behaving weird sometimes and will no listen to what I say..

quite many of us would feel the same way and there is only one way to fix this..

Deleting the system folder… 🙂

this post will tell the exact location where you can find the system folder in windows..

One issue that we face is that how much ever you try to delete sometime you will get

so what’s the reason:

This issue is because of the limitation in windows machine that the maximum length of the folder hierarchy is 255 to 260.. not sure about that but its less than 260 characters.. [path+filename]

and to identify in our system folder.. the following path violates the above max limits.

C:\Documents and Settings\{user_id}\Application Data\JDeveloper\system11.1.1.4.37.59.23\DefaultDomain\servers\DefaultServer\tmp\_WL_user\oracle.webcenter.framework.view

(all folders [3 mostly] that starts with oracle.webcenter.framework under _WL_user)

workaround:

move all the three folders that starts with oracle.webcenter.framework to much higher level .. say.. outside the actual system folder itelf.. [C:\Documents and Settings\{user_id}\Application Data\JDeveloper\].. and delete it..

now your system folder will get deleted easily.. 🙂

weblogic hangs – whats the solution??


If sometimes the weblogic server hangs without leaving any clue behind for debugging just try this out and it might solve the problem.

rename the ldap directory inside

“<Domain_home>\servers\<server_name>\data” 

and you are saved for the day..

one clue for doing the above change is to check for the log and if you see this line then the workaround will solve your problem

“<IIOP>”

usually after enabling iiop the server will start with the security. So the corrupted ldap causes the problem of server getting hanged.

snippets – to collapse a tree which is expanded



public void rowDisclosureListener(RowDisclosureEvent rowDisclosureEvent) {
System.out.println(":::: RowDisclosureListener Invoked");
int depth = tree.getDepth();
if (depth > 0) {
return;
}
RowKeySet discloseRowKeySet = tree.getDisclosedRowKeys();
RowKeySet addedRowKeySet = rowDisclosureEvent.getAddedSet();
Iterator addedRowKeySetIter = addedRowKeySet.iterator();
if (addedRowKeySetIter.hasNext()) {
discloseRowKeySet.clear();
Object firstKey = addedRowKeySetIter.next();
discloseRowKeySet.add(firstKey);
tree.setSelectedRowKeys(addedRowKeySet);
tree.setRowKey(firstKey);
AdfFacesContext adfFacesContext = null;
adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(tree.getParent());
}
}
}

Sherman release notes


http://jdevadf.oracle.com/adf-richclient-demo/docs/release.html

create pdf from VO


useful link that i found to create a pdf from a view object

http://technology.amis.nl/blog/1182/generating-pdfs-from-adf-business-components-view-object-datasets-using-xsql

http://kohlivikram.blogspot.com/2009/04/generate-pdf-report-in-adf.html

Ojdeploy – how to include taskflow related files to include


When you build trough ojdeploy the task flow related files like page-template.xml, task-flow-registry.xml are not added in the deployed adf library.

to include that we have remove the entry in the ojdeploy snippet

<ora:parameter name="nocompile" value="true"/>

more information is here

http://one-size-doesnt-fit-all.blogspot.com/2010/11/using-ojdeploy-and-ant-for-creating-adf.html