Sunday, September 21, 2008

Web Service: Using Web Service Proxy

A tutorial on how to invoke a Web Service using Web Service Proxy in Jdeveloper 11g Technology Preview 4.



The application can be downloaded here.

Web Service: Creating a simple Java Web Service

Tutorial on how to expose a simple Java class as a Web Service in Jdeveloper 11g Technology Preview 4.



The application can be downloaded here.

Wednesday, September 17, 2008

ADF: Calling JavaScript from a Managed Bean

I had a requirement of calling java script from a managed bean in ADF and this is how it can be implemented.


1 import javax.faces.context.FacesContext;
2 import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
3 import org.apache.myfaces.trinidad.util.Service;
4
5 public class InvokeRefresh {
6 public InvokeRefresh() {
7 }
8
9 public void invokeJS(){
10 FacesContext facesCtx = FacesContext.getCurrentInstance();
11 ExtendedRenderKitService service = Service.getRenderKitService(facesCtx,ExtendedRenderKitService.class);
12 service.addScript(facesCtx,"alert('Invoking JS from Managed Bean');");
13
14 }
15 }