Skip to main content

Posts

Showing posts from September, 2006

Search functionallity (like in oracle forms)

If you tried using the find funcionallity, then you might have noticed that it doesn't work the way it is supposed to. However, we managed to let it work in the same way that it does in Oracle-forms. From scratch works more or less like this. Drop your view object as ADF table on the form. Add the find and execute operations. Drop the same view object on your form but now as ADF search form. Place the fields form the search form in the corresponding columns. For each #{row} field ,and the find button, set the rendered property #{bindings.testUserIterator.findMode ==false}. For each inputfield, and the execute, set the rendered property #{bindings.testUserIterator.findMode ==true}. Now it will work.

Select the current row by just clicking on it (and little coding)

It took us some time to figure out how to select the current row in an ADF table by clicking on it, but in the end the solution is very simple. Give your "af:tableSelectOne" an id property for instance “select_id”. Give all the columns in your table an onClick property for instance: onclick="makeCurrent(this); " Ad javascript to your page with yhe following code: document.getElementById(tr.id.substring(0,tr.id.lastIndexOf(":")+1)+"select_id").checked=true; Try out your page and you'll see it works. Every click on a column in your table will make the current row indead current. What this code does is working around the ADF coding for your table columns; Adf will generate the following id for an item(inputtext1) residing in the second row in your table("tab_1") on your form ("form_1") ..............(notice: zero based index) id="form_1:tab_1:1:inputText1" where ":1:" stands for the current row. You canno