Skip to main content

Posts

ADF : task flow replace whole page not current region

Ok so this is one way to break out of the region you are in and replace a parent or root region. So in your child task flow instead of calling a task flow directly using a control flow case just point your control flow case to a Parent Action (get it from the component panel). There you can specify an outcome in a parent task flow. Job done.

Web Center ADF : What a dirty little problem MDS override customizations

I have a customizable table where you can save sort orders to the database (custom not mds driven - don't ask why - you don't want to know). So everything works for me locally but upon deployment to Web Center once you have moved one column everything has that column order in the table no matter what until you close the browser and re login. Not I have no MDS configured on my local box. Turns out someone turned mds config on in my project properties thus rendering my custom ordering view useless because MDS would override my changes - so I turned MDS off in this project because I dont need it. I am not sure what you would do if you needed it on would need to customize it a bit I guess - not easy. PAIN in the arse to figure this one out. O yhea and dont think just clicking the MDS to off will remove your problem check the adf-config.xml to check if any elements have been hard set to persist.

Java: On login trigger code run after login

Ok so from the title you can see I am hanging around the database for way to long. I needed to have some code executed when I logged on so this is what I did: I threw together a quick HttpSessionListener like such: package za.co.test.web.faces.listener; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class LoginSessionListener implements HttpSessionListener {  @Override  public void sessionCreated(HttpSessionEvent event) {  doSomeStuff();  } @Override public void sessionDestroyed(HttpSessionEvent event) { // do nothing } } Then added the listener to my web.xml. <listener> <listener-class>za.co.test.web.faces.listener.LoginSessionListener</listener-class> </listener> All working and sorted.

XSLT : Fun with xslt and xpath with fop

So I wanted a generic, all things to all men style sheet transformation on my service call to generate a PDF report for any xml message. I had to do this using XSLT 1.0 booo hiss. This really make things harder. So here is what I learned: So the first thing I needed was a JAXB transform from incoming object to xml.         JAXBContext context = JAXBContext.newInstance(xmlObject.getClass());         Marshaller marshaller = context.createMarshaller();         StringWriter sw = new StringWriter();         marshaller.marshal(xmlObject, sw);         IOUtils.closeQuietly(sw);         return sw.toString(); The next thing was passing parameters (a report title)             Transformer transformer = tFactory.newTransformer(xsltSrc);             transformer.setParameter("ReportTitle", "Report Title"...

My Pentaho experience

I was playing with pentaho over the weekend and must say I am impressed with what I have seen. The report designer is now very functional. I am going to have to play with it a bit more to be understand what can be done fully but producing a report with parameters is really easy once you get a hang of the tool. (I click on the query you want to modify and modify the sql instead of using the edit button) I replaced the pentaho security implementation with my own implementation and was surprised to find out how easy the spring security implementation was (one thing I wrote my own  GrantedAuthority implementation  which was a bad idea the default one org.springframework.security.GrantedAuthorityImpl works well and includes an equals, hashcode and compareto which mine did not and didnt work and implementation) 

ADF: Testing iterator settings Pojo Data Controls

Jdev 11.1.1.5 I was doing some investigation into the inner workings and some of the more useful properties on the iterator bindings in the page definition xml files to to satisfy my curiosity. So here are some findings I have to go into much more details than this but this should help someone. I had a basic page with one iterator (driving a select one choice) two buttons one with an action one with an action listener and a child iterator driving a table. I use any number of Refresh parameters on my page (always, deferred, ifNeeded) etc and the method bound was only called once on pressing any button or autoSubmit - all good. I the set the CacheResults parameter to false this lead to my method being called a number of times and some weird but expected behaviour still good. Now I changed to a methodIterator from a accessorIterator with one parameter and returned null  from the data control. The method was now called a number of times with a null parameter not g...