Re: [xwiki-users] Display external data using LiveTable Macro

2010-05-12 Thread Jerome Velociter
Hi Ryszard,

If you want to query external URLs you will need to proxy the requests. The 
url parameter is limited by browsers same origin policy. To proxy the request 
you can have a result page with a groovy script that makes the HTTP requests to 
the external URL and outputs it. It has a performance cost, though, since it 
means 2 requests where you would do only one with an internal URL. 
Another alternative is to make the livetable support JSON with padding 
technique (http://en.wikipedia.org/wiki/JSON#JSONP) ; it's not very complex, it 
just needs an alternative method to fetch the data (instead of AJAX request) + 
an option to activate this method. Though it's a bit touchy security-wise, not 
sure we would want to have this available by default (but could be discussed).

Jerome.


- Ryszard Łach ryl...@gmail.com wrote:

 Hi!
 Does anybody know how to display some external data using LiveTable
 macro? I
 can see in doc, that there is an 'url' alternative datasource
 (alternative
 to className and resultsPage), but I cannot find any examples using
 it.
 
 I've tried to write to the text file the JSON output used by the
 macro, then
 I put the file on some http server and try to use its url in macro
 invocation, but it does not work.
 
 TIA,
 
 R.
 
 -- 
 First they ignore you. Then they laugh at you. Then they
 fight you. Then you win. - Mohandas Gandhi.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Display external data using LiveTable Macro

2010-05-11 Thread Ryszard Łach
Hi!
Does anybody know how to display some external data using LiveTable macro? I
can see in doc, that there is an 'url' alternative datasource (alternative
to className and resultsPage), but I cannot find any examples using it.

I've tried to write to the text file the JSON output used by the macro, then
I put the file on some http server and try to use its url in macro
invocation, but it does not work.

TIA,

R.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Display external data using LiveTable Macro

2010-05-11 Thread Guillaume Lerouge
Hi Ryszard,

On Tue, May 11, 2010 at 13:31, Ryszard Łach ryl...@gmail.com wrote:

 Hi!
 Does anybody know how to display some external data using LiveTable macro?
 I
 can see in doc, that there is an 'url' alternative datasource (alternative
 to className and resultsPage), but I cannot find any examples using it.

 I've tried to write to the text file the JSON output used by the macro,
 then
 I put the file on some http server and try to use its url in macro
 invocation, but it does not work.


Have you looked at
http://platform.xwiki.org/xwiki/bin/view/DevGuide/LiveTable too?

Guillaume


 TIA,

 R.

 --
 First they ignore you. Then they laugh at you. Then they
 fight you. Then you win. - Mohandas Gandhi.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Guillaume Lerouge
Product Manager - XWiki SAS
Skype: wikibc
Twitter: glerouge
http://guillaumelerouge.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Display external data using LiveTable Macro

2010-05-11 Thread Ryszard Łach
2010/5/11 Guillaume Lerouge guilla...@xwiki.com


 Have you looked at
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/LiveTable too?


Yes, it wasn't very helpful for me.

I expected, that it would be easy possible to write a small piece of code to
fetch some rows from an external table and use LiveTable macro. After some
tests I realized, that the logic of paging, fetching next result sets etc.
won't work, If I simply generate JSON output from some CGI script - it is at
the LiveResults' side.

Finally we will use XLM-RPC api to create pages with objects of our xwiki
class and use this class with LiveTable macro.

Thanks,

R.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users