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: David Holt <email@hidden>
- Date: Thu, 21 Oct 2010 10:35:06 -0700
On 2010-10-21, at 1:55 AM, Johan Henselmans wrote:
>
> 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
Maybe you're misnaming or mistyping something?
In the properties you listed in your previous email you're calling your configuration ShowInfo.showpicturebig and ShowInfo.showpicturesmall
Are you sure the configurations listed in the properties are named *exactly* the same as they are configured in the Rules?
d
>
> 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