Is there any sample code using this plugin available? #2

Open
mts749 opened this Issue Dec 6, 2011 · 15 comments

Projects

None yet

5 participants

@mts749
mts749 commented Dec 6, 2011

Pointers to sample code using this plugin would be greatly appreciated.

Thanks,
Martin

@fix
Owner
fix commented Dec 6, 2011

Not really here, but in the readme i think this is clear enough:

  • register an alfresco server at http://myserver:8080/myapp/alfrescoServer
  • create a view with a <alfresco:spaceTree .... /> tag inside

That's it!

https://github.com/fix/grails-alfresco-plugin#readme

@mnavas
mnavas commented Dec 21, 2011

I'm trying to use the library and I get an exception: Cannot get property 'ticket' on null object.
What do you mean with create a connector user/password? Just create user and passwords in alfresco?. I did that and since I sent only username, servername and node, it threw the exception.

We need a more understandable example, also for the configuration of the alfresco side.

Please help!!!

@fix
Owner
fix commented Dec 22, 2011

@mnavas if you can't get a ticket on null object it means that your method cannot find the AlfrescoServer linked to the the username/servername provided in your tag. Be sure when you use <alfresco:spaceTree username="registered_username" servername="registered_name" node="workspace://StoresSpace/your-node"> you have a registered AlfrescoServer with name="registered_name" and username="registered_username".

If you wonder where to register your AlfrescoServer, or get the list of AlfrescoServer go to http://your_host_name_probably_localhost:port_probably_8080/yourappname/alfrescoServer

@fix
Owner
fix commented Dec 22, 2011

but taking your remarks, i'll update the README accordingly

@mnavas
mnavas commented Dec 22, 2011

Thanks for the quick response, we installed the plugin but we don't get anything for:

http://localhost:8080/grailsApp/alfrescoServer

From the readme file, we understood that the plugin would create a url in the grails application to register the available alfresco servers. However the controler does not exist and we get the url exception response of apache.

Some examples would be appreciated.

Thanks

@fix
Owner
fix commented Dec 22, 2011

yes actually there should be something actually! if you inspect your database do you have an "alfresco_server" table?

also, if you create an AlfrescoServer inside your Bootstrap, can it solve the issue?

creating from BootStrap:

new org.grails.plugin.alfresco.AlfrescoServer(
    name:"test", 
    details:"test", 
    serverUrl:"http://afrescoServerUrl/",  
    username:"username",
    password:"pwd", 
    ticket:""
).save(failOnError:true)
@kienvm
kienvm commented Apr 11, 2013

Hi i got this error, please help me. thank you so much
Exception Message: invalid stream header: 4C808A11
Caused by: Error processing GroovyPageView: Error executing tag alfresco:spaceTree: null at D:/New folder/grails-alfresco-plugin-master/grails-app/views/helloThere/helloAlfresco.gsp:10

@fix
Owner
fix commented Apr 11, 2013

Hi the error does not say much. But my feeling is that you forgot to pass an arg in the gsp tag alfresco:spaceTree/

Sent from Mailbox for iPhone

On Thu, Apr 11, 2013 at 5:14 AM, kienvm notifications@github.com wrote:

Hi i got this error, please help me. thank you so much
Exception Message: invalid stream header: 4C808A11

Caused by: Error processing GroovyPageView: Error executing tag alfresco:spaceTree: null at D:/New folder/grails-alfresco-plugin-master/grails-app/views/helloThere/helloAlfresco.gsp:10

Reply to this email directly or view it on GitHub:
#2 (comment)

@kienvm
kienvm commented Apr 12, 2013

Hi, this is my arg in tag <alfresco:spaceTree
username="${alfrescoServer?.username }" servername="${alfrescoServer?.name }" node="http://127.0.0.1:8080/alfresco/faces/jsp/admin/store-browser.jsp">
when load this page i got this error. I think somethings wrong in arg
Exception Message: invalid stream header: 4C808A11

@fix
Owner
fix commented Apr 12, 2013

I think, you should put a different argument for node, this is not the server but the node name, something like: "1a235d-4342d-a8769-9890a"

@fix
Owner
fix commented Apr 12, 2013

but if you just want to browse the tree use alfresco:homeTree tag

@sharmakuldeep

when i try to using alfresco:homeTree tag there is no error or exception but it asks for the user attribute in the tag so what will be the value of this attribute, and also in alfresco:spaceTree/ tag from where i can found the value of node attribute please specify

@sharmakuldeep

Also i have only serverUrl, username and password, can anybody please specify what else i need to connect to the Alfresco server from within my application.

@sharmakuldeep

new org.grails.plugin.alfresco.AlfrescoServer(
name:"test",
details:"test",
serverUrl:"http://afrescoServerUrl/",
username:"username",
password:"pwd",
ticket:""
).save(failOnError:true) when i try to save the AlfrescoServer from bootstrap, its not saving the server in database because of the null value of the ticket so what value of the ticket i should provide here.

@fix
Owner
fix commented Jan 13, 2014

sorry to be back so late. What do you mean? ticket is not null in this case, it is setup with empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment