留言板

Implement my own document library

Cédric Celer,修改在12 年前。

Implement my own document library

New Member 帖子: 9 加入日期: 11-6-16 最近的帖子
Hi guys,

I am trying to implement my own document library in my portlet but it does not work.
I looked the document library portlet and I had in my jsp this code and I get the good implementation :



                <div class="lfr-dynamic-uploader">
		    <div class="lfr-upload-container" id="<portlet:namespace />fileUpload"></div>
		</div>
		<div class="lfr-fallback aui-helper-hidden" id="<portlet:namespace />fallback"></div>
		
		<aui:script use="liferay-upload">
		    new Liferay.Upload({
		            allowedFileTypes: '*.*',
		            container: '#<portlet:namespace />fileUpload',
		            fileDescription: 'All files',
		            fallbackContainer: '#<portlet:namespace />fallback',
		            maxFileSize: 10000,
		            namespace: '<portlet:namespace />',
		            uploadFile: '<portlet:actionurl windowstate="exclusive"></portlet:actionurl>'
			});
		</aui:script>



In the document library portlet, this code call the processAction method. Then I created the method in my portlet and put some code inside like
 System.out.println("Im in the processAction !!"); 

But when I click on the button update file everything goes ok but it didn't come in the processAction method ...
I don't use Struts, and I get the code error 2038, wrong url I think.

Someone has an idea ?

Thx.

Cédric
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: Implement my own document library

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
If you are using firebug can you please track the url which is in the request. Or just paste here the url of the page after you click on the button. That may help us understanding it clearly..
Cédric Celer,修改在12 年前。

RE: Implement my own document library

New Member 帖子: 9 加入日期: 11-6-16 最近的帖子
This is the url I get :
upload_url:
https://bop52:8443/web/guest/my-softwares?p_auth=2okBzJXi&p_p_id=IssueView_WAR_IssueViewportlet_INSTANCE_Cg7i&p_p_lifecycle=1&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1

I get it passing the debug attribut to true in the upload.js in the SWFUpload.
Cédric Celer,修改在12 年前。

RE: Implement my own document library

New Member 帖子: 9 加入日期: 11-6-16 最近的帖子
This is the SWF Debug I get, it could help :


SWF DEBUG: SWFUpload Init Complete
SWF DEBUG: 
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number:           SWFUPLOAD 2.2.0 Beta 3 2008-11-16
SWF DEBUG: movieName:              SWFUpload_0
SWF DEBUG: Upload URL:             https://bop52:8443/web/guest/my-softwares?p_auth=2okBzJXi&amp;p_p_id=IssueView_WAR_IssueViewportlet_INSTANCE_Cg7i&amp;p_p_lifecycle=1&amp;p_p_state=exclusive&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1
SWF DEBUG: File Types String:      *.*
SWF DEBUG: Parsed File Types:      
SWF DEBUG: HTTP Success:           0
SWF DEBUG: File Types Description: All files (*.*)
SWF DEBUG: File Size Limit:        10240000 bytes
SWF DEBUG: File Upload Limit:      0
SWF DEBUG: File Queue Limit:       0
SWF DEBUG: Post Params:
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG: 
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to https://bop52:8443/web/guest/my-softwares?p_auth=2okBzJXi&amp;p_p_id=IssueView_WAR_IssueViewportlet_INSTANCE_Cg7i&amp;p_p_lifecycle=1&amp;p_p_state=exclusive&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1 for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadError : IO Error : File ID: SWFUpload_0_0. IO Error: Error #2038
SWF DEBUG: Event: uploadComplete : Upload cycle complete.