You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Alexander Klimetschek <ak...@day.com> on 2009/06/30 12:54:23 UTC

Re: Inconsistencies handling of empty string values by the SlingPostServlet

On Tue, Jun 30, 2009 at 11:59 AM, Felix Meschberger<fm...@gmail.com> wrote:
> Now, I would assume, that sending an empty parameter should really set
> the property to the empty string and wanting to remove a property should
> the parameter not be set to a non-empty value must be requested with
> @DefaultValue=:null.

I thought removing a property is "normally" done through "property@Delete=true".

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Inconsistencies handling of empty string values by the SlingPostServlet

Posted by Ian Boston <ie...@tfd.co.uk>.
On 30 Jun 2009, at 11:55, Alexander Klimetschek wrote:

> On Tue, Jun 30, 2009 at 12:54 PM, Alexander Klimetschek<aklimets@day.com 
> > wrote:
>> On Tue, Jun 30, 2009 at 11:59 AM, Felix Meschberger<fmeschbe@gmail.com 
>> > wrote:
>>> Now, I would assume, that sending an empty parameter should really  
>>> set
>>> the property to the empty string and wanting to remove a property  
>>> should
>>> the parameter not be set to a non-empty value must be requested with
>>> @DefaultValue=:null.
>>
>> I thought removing a property is "normally" done through  
>> "property@Delete=true".
>
> Oh, forgot to say: yes, an empty string in the request parameter
> should also set the property to the empty string, because for deletion
> we have a clearly separate mechanism with the @Delete suffix.
>
> Regards,
> Alex

The @Delete works fine for single valued properties, but it was  
interesting the orriginal post mentioned multivalued properties as  
IIRC there is no way to edit a list of multivalue properties, the POST  
operation just replaces the whole list... which sound Ok in theory.

Out UI developers are reporting having to get the list first, edit in  
the browser and post the replacement list back, which a) adds UI  
coding complexity, b) is a real pain for big lists.

Are there any plans to provide an incremental update mechanims for  
multivalued properties ?
Ian



>
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com


Re: Inconsistencies handling of empty string values by the SlingPostServlet

Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Jun 30, 2009 at 12:54 PM, Alexander Klimetschek<ak...@day.com> wrote:
> On Tue, Jun 30, 2009 at 11:59 AM, Felix Meschberger<fm...@gmail.com> wrote:
>> Now, I would assume, that sending an empty parameter should really set
>> the property to the empty string and wanting to remove a property should
>> the parameter not be set to a non-empty value must be requested with
>> @DefaultValue=:null.
>
> I thought removing a property is "normally" done through "property@Delete=true".

Oh, forgot to say: yes, an empty string in the request parameter
should also set the property to the empty string, because for deletion
we have a clearly separate mechanism with the @Delete suffix.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com