You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2007/01/17 20:31:59 UTC

Screen Decorator question

In the CommonScreens.xml GlobalDecorator are these lines:

<set field="layoutSettings.styleSheets[+0]" value="/images/maincss.css" 
global="true"/>
<set field="layoutSettings.styleSheets[+1]" value="/images/tabstyles.css" 
global="true"/>

If a component wants to add another style sheet to the list, what would the 
syntax be? Would

<set field="layoutSettings.styleSheets[+0]" value="/images/mycomponent.css" 
global="true"/>

overwrite /images/maincss.css or would it add it to the list?

Another way to ask this question: How do I add style sheets to the 
layoutSettings.styleSheets list when I don't know how many it already contains?



Re: Screen Decorator question

Posted by Adrian Crum <ad...@hlmksw.com>.
That works. Thanks Chris!

Chris Howe wrote:

> I haven't played with how the screen widget handles
> arrays too much, but to add it to the end it should
> just be 
> 
> "layoutSettings.stylesheets[]"
> --- Adrian Crum <ad...@hlmksw.com> wrote:
> 
> 
>>In the CommonScreens.xml GlobalDecorator are these
>>lines:
>>
>><set field="layoutSettings.styleSheets[+0]"
>>value="/images/maincss.css" 
>>global="true"/>
>><set field="layoutSettings.styleSheets[+1]"
>>value="/images/tabstyles.css" 
>>global="true"/>
>>
>>If a component wants to add another style sheet to
>>the list, what would the 
>>syntax be? Would
>>
>><set field="layoutSettings.styleSheets[+0]"
>>value="/images/mycomponent.css" 
>>global="true"/>
>>
>>overwrite /images/maincss.css or would it add it to
>>the list?
>>
>>Another way to ask this question: How do I add style
>>sheets to the 
>>layoutSettings.styleSheets list when I don't know
>>how many it already contains?
>>
>>
>>
> 
> 
> 

Re: Screen Decorator question

Posted by Chris Howe <cj...@yahoo.com>.
I haven't played with how the screen widget handles
arrays too much, but to add it to the end it should
just be 

"layoutSettings.stylesheets[]"
--- Adrian Crum <ad...@hlmksw.com> wrote:

> In the CommonScreens.xml GlobalDecorator are these
> lines:
> 
> <set field="layoutSettings.styleSheets[+0]"
> value="/images/maincss.css" 
> global="true"/>
> <set field="layoutSettings.styleSheets[+1]"
> value="/images/tabstyles.css" 
> global="true"/>
> 
> If a component wants to add another style sheet to
> the list, what would the 
> syntax be? Would
> 
> <set field="layoutSettings.styleSheets[+0]"
> value="/images/mycomponent.css" 
> global="true"/>
> 
> overwrite /images/maincss.css or would it add it to
> the list?
> 
> Another way to ask this question: How do I add style
> sheets to the 
> layoutSettings.styleSheets list when I don't know
> how many it already contains?
> 
> 
>