cancel
Showing results for 
Search instead for 
Did you mean: 

Prototype: Alfresco Web Scripts + extjs ajax lib

jpfi
Champ in-the-making
Champ in-the-making
Hi,

Along with a colleague I played around with Web Scripts and extjs (a fabulous ajax lib).
After a couple of days we've finished a first prototype of a ajax-based Alfresco repository browser - we named it opsoro.

    feature overview:
    - ria-feeling (sortable & movable columns, view/hide components, async loading…)
    - live Search (search as you type)
    - folder browser
    - category browser
    - tag cloud browser
    - My Alfresco portal (draggable portlets)
    - document tagging
    - embedded preview (crop content & image preview)
    - inline view (text, pdf, images … IE only: ms office et. al.)
You find a flash screemcam here: http://opensource-ecm.com/opsoro/opsoro.html

This Web Script API is truly first-rate! It is impressive to find out how easy  and rapid to develop things can be;-)
71 REPLIES 71

davtrasher
Champ in-the-making
Champ in-the-making
Hi Jan,
I use your opsoro search webscript but with Web Client Authenticator like:
http://localhost:8082/alfresco/wcservice/sample/
search?query=tuto?ticket=TICKET_11c6234c45ea3e58531a209283695adba833cb04

it works great for other webscripts(myFiles, upload…) but not for the search one.
Do you understand what happens?
I use alfresco 2.9c .

Thanks

jpfi
Champ in-the-making
Champ in-the-making
Hi,
could you please provide some more infos. have you changed the webscript desc-file, the default path of the opsoro search webscript would be /wcservice/opsoro/search

what is your log saying? Try to enable detailed webScript-logging: log4j.logger.org.alfresco.web.scripts=debug in your /webapps/alfresco/WEB-INF/classes dir.
Cheers, Jan

mikeh
Star Contributor
Star Contributor
I'd suggest the fact that you've got two "?"s in your URL is causing the problem.

Thanks,
Mike

davtrasher
Champ in-the-making
Champ in-the-making

jpfi
Champ in-the-making
Champ in-the-making
ah, sorry, I see your failure now:
if you'd like to pass more then one argument in a GET-Request the syntax is as following:
http://hostSmiley Tongueort/path?param1=value1&param2=value2
so, in your case:
http://localhost:8082/alfresco/wcservice/sample/search?query=tuto&ticket=TICKET_11c6234c45ea3e58531a209283695adba833cb04

Cheers, Jan

davtrasher
Champ in-the-making
Champ in-the-making
Thanks to both of you!  :wink:

myj
Champ in-the-making
Champ in-the-making
Jan,  thanks for the reply.

I realized the futility of trying to implement a logout function on basic authentication.  But I still have one more question.
In a regular web page served by apache,  if you have a .htaccess file in a folder,  then the webserver will challenge the end user for authentication.
In opsoro,  what is the mechanism ?  Is there a piece of code that captures the challenge from alfresco and pass it to the end user ?

Thanks.

jpfi
Champ in-the-making
Champ in-the-making
Hi,
behind the scenes this is done by the WebScript Infrastructure of Alfresco. I'm not very familar with all the details of this framework implementation, but there is a central WebScriptDispatcher-Servlet, which reads all webscript definitions (the desc.xml files) and it ckecks via standard alfresco & spring authentication functions if the current user (credentials passed to server via HTTP-Header) has sufficent privileges.
It is not as similar (there are some spring classes involved etc.)…but hopefullyit is enough to answer your question.
Opsoro simply uses this webscript framework and passes the users credentials via HttpBasicAuthentication. A better way would be:
  • create a opsoro login component which includes a login form

  • submit the user credentials to a getTicket-login WebScript

  • this webscript returns a login ticket –> store the ticket in an javascript variable in opsoro

  • reuse this ticket for every webscript-call

  • (implement a logout component which resets the ticket)
Cheers, Jan

davtrasher
Champ in-the-making
Champ in-the-making
I am trying to use the trees of gxt beta4 (async tree or basic tree) to display the alfresco tree like in opsoro but I can not, I don't know if it is adaptable. Maybe that anybody has already try that?

norgan
Champ in-the-making
Champ in-the-making
Hi Jan, hi Steve,
first of all a big HAND for your great jobs. I just tried out both opsoro and flexspaces in the last week. I love them so far, it would be great to see future versions.

One thing, that I wonder about is, though. Would it not be more efficient (and much more fun, rewarding, exhiliarating … oO( cant think of more in the moment) ) to pool your activities and make one out of two ? You both have quite some list of features, you want to add, so why do them twice ?

Or is it technically so different that is does not make sense ?
Oh, and another thing. Do you prefer your bug/feature reporting here, or inthe forge with its bug tracker ?

Regards,Norgan