Re: Problems calling "addAdditionalViewForProduct"
Hi Alexander, You don't need to add these parameters to your form. This is the job of ServiceEventHandler to put the uploaded file related information in the parameters that are being passed to the service, refer ServiceEventHandler.java (line 151 - 227). You said you are writing custom logic around the OOTB "addAdditionalViewForProduct" service. If that's true it would be easier for you if your custom logic is written as a service and the service def implements "uploadFileInterface" service interface. -- Thanks & Regards Mridul Pathak Hotwax Media http://www.hotwaxmedia.com mridul.pat...@hotwaxmedia.com - direct: +91 - 942.592.6892 On Thu, Jan 28, 2010 at 2:16 PM, Alexander1893 < alexan...@familie-schweizer.net> wrote: > > Hi Midrul, > > first of all - it's not "my service" I'm calling. > > You said that this is missing: > > field="addAdditionalViewForProduct._uploadedFile_fileName" > from-field="parameters._uploadedFile_fileName"/> > > field="addAdditionalViewForProduct._uploadedFile_contentType" > from-field="parameters._uploadedFile_contentType"/> > > First: Actualy I'dont understand why I should have this parameters in the > form, if they are optional in the service-dev... If optional meens, that > the > service doesn't work - than the service-def is useless. > I have only one field in the form - which is a input type "file". Where > should the "fileName" and "contentType" come from? > > Thanks a lot for futher help! > Alexander > -- > View this message in context: > http://n4.nabble.com/Problems-calling-addAdditionalViewForProduct-tp1397293p1400053.html > Sent from the OFBiz - User mailing list archive at Nabble.com. >
Re: Problems calling "addAdditionalViewForProduct"
Hi Midrul, first of all - it's not "my service" I'm calling. You said that this is missing: First: Actualy I'dont understand why I should have this parameters in the form, if they are optional in the service-dev... If optional meens, that the service doesn't work - than the service-def is useless. I have only one field in the form - which is a input type "file". Where should the "fileName" and "contentType" come from? Thanks a lot for futher help! Alexander -- View this message in context: http://n4.nabble.com/Problems-calling-addAdditionalViewForProduct-tp1397293p1400053.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Problems calling "addAdditionalViewForProduct"
The first thing that you need to make sure is that your servicedef implements uploadFileInterface, add following line to your servicedef: The next thing you will need to do is to pass in the following input parameters (comes from uploadFileInterface) to addAdditionalViewForProduct service: (you already have this one) Once this is done your service should work. -- Thanks & Regards Mridul Pathak Hotwax Media http://www.hotwaxmedia.com mridul.pat...@hotwaxmedia.com - direct: +91 - 942.592.6892 On Thu, Jan 28, 2010 at 1:37 PM, Alexander1893 < alexan...@familie-schweizer.net> wrote: > > Hi all, > > I'm trying to use the service "addAdditionalViewForProduct" and I'm havin > some problems. > > I have the following form in the front-end: > > target="performSingleFileUpload"> > > > >widget-style="smallSubmit"> > > > > > After submitting I do some other things necessary (calling some services > etc.). > > Than I prepare the Input-Map for the service "addAdditionalViewForProduct": > > from-field="userLogin.userLogin"/> > from-field="productRoleAttributes.productId"/> > > field="addAdditionalViewForProduct.productContentTypeId" > value="DIGITAL_DOWNLOAD"/> > from-field="parameters.uploadedFile"/> > > And then I call the service: > > in-map-name="addAdditionalViewForProduct"/> > > When I do that, I don't get any errors in the log - but nothing really > happens (the file is not associated with the product...) > I debugged the "ProductServices.java" in Eclipse - and obviously "the > imageData" ist "Null" in after this Line: > >ByteBuffer imageData = (ByteBuffer) context.get("uploadedFile"); > > Can anyone help? > > Thanks a lot! > Alexander > > > > > > -- > View this message in context: > http://n4.nabble.com/Problems-calling-addAdditionalViewForProduct-tp1397293p1397293.html > Sent from the OFBiz - User mailing list archive at Nabble.com. >
Problems calling "addAdditionalViewForProduct"
Hi all, I'm trying to use the service "addAdditionalViewForProduct" and I'm havin some problems. I have the following form in the front-end: After submitting I do some other things necessary (calling some services etc.). Than I prepare the Input-Map for the service "addAdditionalViewForProduct": And then I call the service: When I do that, I don't get any errors in the log - but nothing really happens (the file is not associated with the product...) I debugged the "ProductServices.java" in Eclipse - and obviously "the imageData" ist "Null" in after this Line: ByteBuffer imageData = (ByteBuffer) context.get("uploadedFile"); Can anyone help? Thanks a lot! Alexander -- View this message in context: http://n4.nabble.com/Problems-calling-addAdditionalViewForProduct-tp1397293p1397293.html Sent from the OFBiz - User mailing list archive at Nabble.com.