cancel
Showing results for 
Search instead for 
Did you mean: 

Tutorial for newbies creation new content

mstransky
Champ in-the-making
Champ in-the-making
Hello,
I am new in alfresco and perhaps same as other I am facing how to customize it by developing new copoment (multicopy, specific transformation, sigantures etc…)
I use Java and SDK library using eclipse. I learned How to sign PDF document, but I am unable to create new document. Ive already spend several searching tha web without any result.
Please can someone help me?  send me some tutorial, navigate me to some wiki or to some books?
PLEASE..
BR
Michal
3 REPLIES 3

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you have create new content dialog(wizard) for text , html and xml docs.

mstransky
Champ in-the-making
Champ in-the-making
Savic, thx,
actually Iam talking about java enhacement.
I found how to create new document using filefolder.create
http://wiki.alfresco.com/wiki/NodeRef_cookbook#Writing_data_to_a_node.27s_content

but still Iam facing problem with exception
User:admin ERROR [ui.common.Utils] A system error happened during the operation: Transaction didn't commit: null
javax.transaction.RollbackException: Transaction didn't commit: null

here is par of my code:
QName contentQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}content");

   NodeRef directory = (NodeRef)action.getParameterValue(PARAM_SIGN_DESTINATION);
   
   FileInfo pdfInfo = fileFolderService.create(directory, "TEST.pdf", contentQName);
    NodeRef pdf = pdfInfo.getNodeRef();

mstransky
Champ in-the-making
Champ in-the-making
We solved it.
I need to use nodeService and  forget to extend module-context.xml
see more here:
http://forums.alfresco.com/en/viewtopic.php?f=10&t=26971