Ajax access to task portlet data

I have a news to style tasks the same as the web application they are embedded in. To do this I need to use Dojo. I have managed to get the dojo framework to load in the task, however especially for tables I need to point the data source at a URL that is going to return XML or json for the table to work.

Is there any URL or method to access either a function within the task java to return just the data or to access the business data?

I do not want to return a HTML page but return the data as XML or json encoded response.

Integration Server is pretty good about building different types of web services (SOAP, Rest, etc…)
Maybe it would be easiest to create a Restful IS Service that uses the TaskClient API and returns the data in your preferred format (in this case JSON).

What do you think?

I did think about that, however, my concern will come when we have tasks that need to update data yet we want to use the actions from the task portlet and the issues with keeping the data between the portlet and the task engine in sync.

I know with Websphere Portlets you can generate a backchannel url to a page or an action that will return the content that you need and you can just supply this to the component that requires the URL. I was hoping that that was some sort of JSR168 behaviour.

The advantage of doing it this way is that you are able to keep all task UI, code, data and interactions in the task portlet which would be elegant.

I tried this morning to create a view in the task portlet with a content type of application/json and then trying some way to return data through that, however, I am having some problems trying to navigate to that view.

The other way that it could be done is by taking over the response, but I’m not sure how CAF is going to react if i do that.

The other thing that I noticed is that in the Noodle javascript API there is a method to get the portlet ajax uri, but noodle doesn’t seem to be loaded with tasks.

Any thoughts would be a huge help.