Tree Widget : expand-collapse-style attribute does not seems to be used in node element any more

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

Tree Widget : expand-collapse-style attribute does not seems to be used in node element any more

Vikas Mayur-2
I come across this attribute (expandCollapseStyle) in ModelNode class and it
does not seems to be used any more.
I did a search but could not find much except that it is removed from method
renderNodeBegin() in HtmlTreeRenderer in rev 514099.

-            String *expandCollapseStyle* =
UtilFormatOut.checkEmpty(node.getExpandCollapseStyle(), "expandcollapse");
-            expandCollapseLink.setStyle(*expandCollapseStyle*);
-            expandCollapseLink.setImage(expandCollapseImage);


Will appreciate any pointers.

Thank you,
  Vikas
Reply | Threaded
Open this post in threaded view
|

Re: Tree Widget : expand-collapse-style attribute does not seems to be used in node element any more

Adrian Crum
Vikas,

There was a time when individual HTML elements were styled independently
and the widget attributes reflected that. Since then, we have moved away
from styling individual HTML elements and toward styling HTML element
collections (or compounds).

So, instead of specifying expandCollapseStyle for a node, you specify a
style for the whole tree - which would contain the style for the node.

Doing things this way reduces style sheet file size, and it reduces the
amount of markup produced.

Here are some helpful links:

http://docs.ofbiz.org/display/OFBADMIN/HTML+and+CSS+Best+Practices
http://docs.ofbiz.org/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles

-Adrian

Vikas Mayur wrote:

> I come across this attribute (expandCollapseStyle) in ModelNode class and it
> does not seems to be used any more.
> I did a search but could not find much except that it is removed from method
> renderNodeBegin() in HtmlTreeRenderer in rev 514099.
>
> -            String *expandCollapseStyle* =
> UtilFormatOut.checkEmpty(node.getExpandCollapseStyle(), "expandcollapse");
> -            expandCollapseLink.setStyle(*expandCollapseStyle*);
> -            expandCollapseLink.setImage(expandCollapseImage);
>
>
> Will appreciate any pointers.
>
> Thank you,
>   Vikas
>
Reply | Threaded
Open this post in threaded view
|

Re: Tree Widget : expand-collapse-style attribute does not seems to be used in node element any more

Vikas Mayur-2
Adrian - Thank you so much for this wonderful explanation.
Does that mean we can remove this attribute and associated method from
ModelTree ?

-Vikas


On Tue, Jun 24, 2008 at 8:00 PM, Adrian Crum <[hidden email]> wrote:

> Vikas,
>
> There was a time when individual HTML elements were styled independently
> and the widget attributes reflected that. Since then, we have moved away
> from styling individual HTML elements and toward styling HTML element
> collections (or compounds).
>
> So, instead of specifying expandCollapseStyle for a node, you specify a
> style for the whole tree - which would contain the style for the node.
>
> Doing things this way reduces style sheet file size, and it reduces the
> amount of markup produced.
>
> Here are some helpful links:
>
> http://docs.ofbiz.org/display/OFBADMIN/HTML+and+CSS+Best+Practices
>
> http://docs.ofbiz.org/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles
>
> -Adrian
>
>
> Vikas Mayur wrote:
>
>> I come across this attribute (expandCollapseStyle) in ModelNode class and
>> it
>> does not seems to be used any more.
>> I did a search but could not find much except that it is removed from
>> method
>> renderNodeBegin() in HtmlTreeRenderer in rev 514099.
>>
>> -            String *expandCollapseStyle* =
>> UtilFormatOut.checkEmpty(node.getExpandCollapseStyle(), "expandcollapse");
>> -            expandCollapseLink.setStyle(*expandCollapseStyle*);
>> -            expandCollapseLink.setImage(expandCollapseImage);
>>
>>
>> Will appreciate any pointers.
>>
>> Thank you,
>>  Vikas
>>
>>