Thursday, January 27, 2011

ADF Swing Webstart deployment

If you are having a problem with a null password when deploying your adf swing app via webstart on a weblogic server you can try the below suggestions. The problem occurs because the connections.xml file does not contain a password for security reasons. The password should be stored in your store and configured in your application but I havent had enough time to figure out how this would work.

Suggestion 1) Use a datasource instead of the JDBC in your am configuration. (1st prize solution)

Suggestion 2) Try the (didnt work for me)

Suggestion 3) Untried: Create a secure app and add your db user to the store.

If all else fails give this a go: Enter a custom jdbc url in your database JDBC connection jdbc:oracle:thin:username/password@

Friday, January 21, 2011

Double click call button my way

1) In your jsff page add the following tag:
<f:verbatim><input id="buttonId" type="hidden" /><verbatim>
1.1) Also add the following to the tag you want to double click:
<af:clientListener method="executeButton" type="dblClick"/>

2) Add the following javascript:
function executeButton(event) {
  var tbl = event.getSource();
  if (tbl.getSelectedRowKeys() != null) {
    var btn = 
    if (btn != null) {
      AdfActionEvent.queue(btn, false);

3) Bind your button to a backing bean:

private RichCommandToolbarButton button;
  public void setButton(RichCommandToolbarButton button){
    FacesContext fctx = FacesContext.getCurrentInstance();
      "document.getElementById(\"buttonId\").value = '"
      + editButton.getClientId(FacesContext.getCurrentInstance())
      + "'");
    this.button = button;

  public RichCommandToolbarButton getButton(){
    return button;

Monday, January 3, 2011

ADF SQLException Closed statement again...

After a nice holiday by the coast I return to find the dreaded close statement error has cropped up again when scrolling down in one of our tables.

Here are a couple of things you can try :
1) In the weblogic console (http://localhost:7101/console) your datasource JDBC\Data Sources\Your Datasource on the connection pool tab set Driver Class Name: oracle.jdbc.driver.OracleDriver and save and restart wl. The XA driver does not always work with ADF in all cases better not to use it.

2) If you are using proxying turn off the weblogic statement cache.(same tab Statement Cache Size: 0)