what does layoutSettings.javascript[+0] mean?

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

what does layoutSettings.javascript[+0] mean?

Ritesh Trivedi
Hi,

Have couple of questions...

1. What does layoutSettings.javascript[+0] mean?
2. Where is layoutSettings object defined?
3. Is there an alternative to screen widgets which people may have used with Ofbiz controller (controller.xml)?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: what does layoutSettings.javascript[+0] mean?

Scott Gray
1.  +0 pushes the entry into position zero rather than replacing the current
entry at zero, so whatever entry is at zero at the moment will end up at
position 1
2.  layoutSettings is defined the first time it is called, there isn't
anything special about it, it's just a variable like any other.  Because
there is an entry "javascripts[]" appended to it, the <set> tag knows to
create a map named "layoutSettings" if one doesn't already exist.  That map
will have an entry named "javascripts" which will be treated as a list
because of the square brackets.  Make any sense?
3.  Can't really comment, I have no experience myself.

Regards
Scott

On 06/02/2008, Ritz123 <[hidden email]> wrote:

>
>
> Hi,
>
> Have couple of questions...
>
> 1. What does layoutSettings.javascript[+0] mean?
> 2. Where is layoutSettings object defined?
> 3. Is there an alternative to screen widgets which people may have used
> with
> Ofbiz controller (controller.xml)?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/what-does-layoutSettings.javascript-%2B0--mean--tp15296728p15296728.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: what does layoutSettings.javascript[+0] mean?

Adrian Crum
In reply to this post by Ritesh Trivedi
layoutSettings is a Map that contains settings to control the page layout. It is typically
initialized in the widget XML file or a BSH script.

Some of the layoutSettings elements are lists, and the layoutSettings.javascript[+0] syntax
indicates that something is being added to a list.

-Adrian

Ritz123 wrote:

> Hi,
>
> Have couple of questions...
>
> 1. What does layoutSettings.javascript[+0] mean?
> 2. Where is layoutSettings object defined?
> 3. Is there an alternative to screen widgets which people may have used with
> Ofbiz controller (controller.xml)?
>
> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: what does layoutSettings.javascript[+0] mean?

Ritesh Trivedi
In reply to this post by Scott Gray
Thanks Scott. Perfect. That made sense.

Couple of more follow up questions - sorry

I see that both <set> and <property-map> tags have global attribute. I presume declaring global = true would make those variables available to other screens? also, I think I may have seen a case or two where UiLabelMap is declared global multiple times when a screen is included within a screen and both the screens have the same UiLabelMap declared. shouldnt all the common uilabelmaps be loaded globally first?

Also, is it possible to use other dynamic content resource (like jsp) inside a widget? basically to be able to use ftls in combination with jsps etc.?


Scott Gray wrote
1.  +0 pushes the entry into position zero rather than replacing the current
entry at zero, so whatever entry is at zero at the moment will end up at
position 1
2.  layoutSettings is defined the first time it is called, there isn't
anything special about it, it's just a variable like any other.  Because
there is an entry "javascripts[]" appended to it, the <set> tag knows to
create a map named "layoutSettings" if one doesn't already exist.  That map
will have an entry named "javascripts" which will be treated as a list
because of the square brackets.  Make any sense?
3.  Can't really comment, I have no experience myself.

Regards
Scott

On 06/02/2008, Ritz123 <ritesh.trivedi@gmail.com> wrote:
>
>
> Hi,
>
> Have couple of questions...
>
> 1. What does layoutSettings.javascript[+0] mean?
> 2. Where is layoutSettings object defined?
> 3. Is there an alternative to screen widgets which people may have used
> with
> Ofbiz controller (controller.xml)?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/what-does-layoutSettings.javascript-%2B0--mean--tp15296728p15296728.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: what does layoutSettings.javascript[+0] mean?

Adrian Crum
Ritz123 wrote:
> Also, is it possible to use other dynamic content resource (like jsp) inside
> a widget? basically to be able to use ftls in combination with jsps etc.?

OFBiz abandoned JSPs several years ago. Widgets are easier to use. Take another look at what you are
trying to accomplish to see if JSPs are really necessary.

-Adrian