You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Wai <bz...@gmail.com> on 2017/09/24 01:35:28 UTC

Difference [+0] and []

What is the difference between the following code in an xml file:

<set field="layoutSettings.javaScripts[+0]" value="..." global="true"/>
<set field="layoutSettings.javaScripts[]" value="..." global="true"/>

If there are documentations to describe this please provide a link.
Thanks in advance.



--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html

Re: Difference [+0] and []

Posted by Jacques Le Roux <ja...@les7arts.com>.
At least simply with a comment where it's most used : in commons screens.

Not totally satisfying though (it can be used anywhere), other ideas?

Jacques


Le 25/09/2017 à 08:13, Jacques Le Roux a écrit :
> We should indeed really document that, but where?
>
> Jacques
>
> Le 25/09/2017 à 08:00, Deepak Dixit a écrit :
>> Hi Wai,
>>
>> [+0] item will be added at top of list.
>>
>>
>> Thanks & Regards
>> -- 
>> Deepak Dixit
>> www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Sun, Sep 24, 2017 at 7:05 AM, Wai <bz...@gmail.com> wrote:
>>
>>> What is the difference between the following code in an xml file:
>>>
>>> <set field="layoutSettings.javaScripts[+0]" value="..." global="true"/>
>>> <set field="layoutSettings.javaScripts[]" value="..." global="true"/>
>>>
>>> If there are documentations to describe this please provide a link.
>>> Thanks in advance.
>>>
>>>
>>>
>>> -- 
>>> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
>>>
>
>


Re: Difference [+0] and []

Posted by Jacques Le Roux <ja...@les7arts.com>.
We should indeed really document that, but where?

Jacques

Le 25/09/2017 à 08:00, Deepak Dixit a écrit :
> Hi Wai,
>
> [+0] item will be added at top of list.
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
> www.hotwax.co
>
> On Sun, Sep 24, 2017 at 7:05 AM, Wai <bz...@gmail.com> wrote:
>
>> What is the difference between the following code in an xml file:
>>
>> <set field="layoutSettings.javaScripts[+0]" value="..." global="true"/>
>> <set field="layoutSettings.javaScripts[]" value="..." global="true"/>
>>
>> If there are documentations to describe this please provide a link.
>> Thanks in advance.
>>
>>
>>
>> --
>> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
>>


Re: Difference [+0] and []

Posted by Nicolas Malin <ni...@nereide.fr>.
[] create a new list

[+add] add to the end list or create new

Nicolas


Le 25/09/2017 à 08:00, Deepak Dixit a écrit :
> Hi Wai,
>
> [+0] item will be added at top of list.
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
> www.hotwax.co
>
> On Sun, Sep 24, 2017 at 7:05 AM, Wai <bz...@gmail.com> wrote:
>
>> What is the difference between the following code in an xml file:
>>
>> <set field="layoutSettings.javaScripts[+0]" value="..." global="true"/>
>> <set field="layoutSettings.javaScripts[]" value="..." global="true"/>
>>
>> If there are documentations to describe this please provide a link.
>> Thanks in advance.
>>
>>
>>
>> --
>> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
>>


Re: Difference [+0] and []

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Hi Wai,

[+0] item will be added at top of list.


Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co

On Sun, Sep 24, 2017 at 7:05 AM, Wai <bz...@gmail.com> wrote:

> What is the difference between the following code in an xml file:
>
> <set field="layoutSettings.javaScripts[+0]" value="..." global="true"/>
> <set field="layoutSettings.javaScripts[]" value="..." global="true"/>
>
> If there are documentations to describe this please provide a link.
> Thanks in advance.
>
>
>
> --
> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
>

Re: Difference [+0] and []

Posted by ha...@163.com.
[+0] added to the before of list
[0] added to the after of list

Sent from my iPhone

> On 24 Sep 2017, at 09:35, Wai <bz...@gmail.com> wrote:
> 
> What is the difference between the following code in an xml file:
> 
> <set field="layoutSettings.javaScripts[+0]" value="..." global="true"/>
> <set field="layoutSettings.javaScripts[]" value="..." global="true"/>
> 
> If there are documentations to describe this please provide a link.
> Thanks in advance.
> 
> 
> 
> --
> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html


Re: Difference [+0] and []

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Wai to answer to your own question :)

I have created a FAQ entry for that: https://s.apache.org/P3oa

Jacques


Le 25/09/2017 à 18:07, Wai a écrit :
> These are the valid syntaxes
> []...if list does not exist, create a new list and append item to it. If
> list exist, append item to end of list
> [+0]...if list does not exist, create a new list and append item to it. If
> list exist, insert item at beginning of list
>
>
>
> --
> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
>


Re: Difference [+0] and []

Posted by Wai <bz...@gmail.com>.
These are the valid syntaxes
[]...if list does not exist, create a new list and append item to it. If
list exist, append item to end of list 
[+0]...if list does not exist, create a new list and append item to it. If
list exist, insert item at beginning of list 



--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html