Re: ERMD2WEditAttachment in Edit page only works once.
Re: ERMD2WEditAttachment in Edit page only works once.
- Subject: Re: ERMD2WEditAttachment in Edit page only works once.
- From: Johan Henselmans <email@hidden>
- Date: Thu, 21 Oct 2010 10:55:00 +0200
On 20 okt 2010, at 18:35, David Holt wrote:
> Hi Johan!
>
> On 2010-10-20, at 7:27 AM, Johan Henselmans wrote:
>>
>>
>>
>> I tried to find out why this happens and it seems that ERFileAttachmentProcessor.java does not get a configurationName passed on.
>>
>> Which leads to the following questions:
>>
>> Is it possible to have two uploadblobs in one form with ERMD2WEditAttachment?
>
> It should be. You need two different configuration names as you've done.
>
>> Why can't I set the properties of two separate ERAttachments in the Properties file?
>
> I don't believe the properties are where your problem lies. If you remember from the screencast, you need to set three bindings on an upload - configurationName, editingContext, and attachment. If you have multiple uploaders on a pageConfiguration, then it seems that you'll need to use the rules to tell the component the bindings.
>
> 100 : (task = 'edit' and entity.name = 'Document' and propertyKey = 'attachedFile') => attachmentConfigurationName = "Document.attachedFile" [com.webobjects.directtoweb.Assignment]
>
> David
>
OK, I added the rules
properyKey= picturebig -> attachmentConfigurationName = ShowInfo.picturebig,
and
properyKey= picturesmall -> attachmentConfigurationName = ShowInfo.picturesmall
to the previous rules:
properyKey= picturebig -> componentName = ERMD2WEditAttachment,
properyKey= picturesmall -> componentName = ERMD2WEditAttachment,
uploading the first item (picturebig) worked, apart from the following error:
There is no element on this page with the id "AFUIC_0".
The second ERMD2WEditAttachment still came with the error:
There is no 'er.attachment.null.file.filesystemPath' or 'er.attachment.file.filesystemPath' property set.
after adding the rules:
properyKey= picturesmall -> attachmentId = ShowInfo.picturesmall,
properyKey= picturebig -> attachmentId = ShowInfo.picturebig,
I did not get any errors uploading pictures to the form for the first time, but clicking on the edit button in the ERMD2WEditAttachment, I could select a picture for the bottom component (picturesmall), but for the component above it, I did not get a filebrowser window, the original picture disappeared, but saving the complete entity and opening it again did show the old picture in the first ERMD2WEditAttachment.
Is there anything else I have to set?
I assume I do not have to set the editing Context for D2W?
>
>>
>>
>> Johan Henselmans
>> email@hidden
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
Johan Henselmans
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden