Difference [+0] and []

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Wai
Reply | Threaded
Open this post in threaded view
|

Difference [+0] and []

Wai
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
Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

Deepak Dixit-3
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

Jacques Le Roux
Administrator
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 <[hidden email]> 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
>>

Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

Nicolas Malin-2
In reply to this post by Deepak Dixit-3
[] 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 <[hidden email]> 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
>>

Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

Jacques Le Roux
Administrator
In reply to this post by Jacques Le Roux
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 <[hidden email]> 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
>>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

hadwin_dai
In reply to this post by Wai
[+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 <[hidden email]> 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

Wai
Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

Wai
This post was updated on .
In reply to this post by Wai
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
[0]...if list does not exist, entry is ignored. if list exist, replace 1st entry in list.
[1]...replace 2nd entry in list

--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
Reply | Threaded
Open this post in threaded view
|

Re: Difference [+0] and []

Jacques Le Roux
Administrator
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
>