I was thinking

   @Multipart(value = "somepart", nullIfMissing = true)



On Thu, Nov 24, 2011 at 11:08 AM, Sergey Beryozkin <[email protected]> wrote:
> Hi
> On 24/11/11 15:53, Benson Margulies wrote:
>>
>> Sergey,
>>
>> Thanks.
>>
>> I have another closely-related whine in mind.
>>
>> I got into this area because I forgot to add one of the form elements
>> to a form pointed at a function annotated with @Multipart.
>>
>> I had sort of hoped that this would lead, optionally, to a null
>> instead of an exception.
>>
>> I note that Multipart is 'one of ours'. Would you object to my added a
>> boolean flag that maps 'no such part' to null instead of throwing?
>
> Do you mean adding a property to MultipartProvider indicating to it that it
> should just return null ? Sounds good, I guess if one uses @Multipart and a
> valid payload may not necessarily include a given part  then 'null'
> (assuming the user has configured the provider) is valid,
>
> Cheers, Sergey
>

Reply via email to