Wednesday, August 22, 2012

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.

Tuesday, August 21, 2012

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.

Friday, August 17, 2012

Exception: NullPointerException java.util.ResourceBundle$CacheKey.calculateHashCode

I was missing the <message-bundle>com.test.view.props.test</message-bundle> entry in my faces-config.xml for some code that looked up a default message bundle in my faces application.


And I got a NullPointerException java.util.ResourceBundle$CacheKey.calculateHashCode
not really explanatory but hey well.
.

Monday, August 6, 2012

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.