:: Forum >>

AW.UI.Group

Hi, I could use some help understanding the behavior of AW.UI.Group. It seems that when I set the content, attribute values no longer get populated in the output markup.

Example without content:
var obj = new AW.UI.Group;
obj.setId(getRandomId());
obj.setControlText("Hello");

<fieldset id="N101218228083" class="aw-system-control aw-item-control aw-templates- aw-ui-group aw-text-normal " aw="control" tabIndex="-1" hideFocus="true" title="" oncontextmenu="return false" onselectstart="return false" onkeydown="AW(this,event)" onkeypress="AW(this,event)" onactivate="AW(this,event)">
<legend id="N101218228083-box" class="aw-item-legend ">
<span id="N101218228083-box-image" class="aw-item-image aw-image-none "></span>
<span id="N101218228083-box-ruler" class="aw-item-ruler "></span>
<span id="N101218228083-box-text" class="aw-item-text " tabIndex="-1">Hello</span>
</legend>
</fieldset>


Example with simple object for content (note the missing attribute values):
var obj = new AW.UI.Group;
obj.setId(getRandomId());
obj.setControlText("Hello");
obj.setContent("html", new MyObj());
function MyObj() {
this.outerHTML = function() { return "<span>Goodbye</span>"; }
}

<fieldset id="N10121153141893" class="aw-system-control aw-item-control aw-templates- aw-ui-group aw-text-normal " aw="control" tabIndex="{#NaN}" hideFocus="true" title="{#NaN}" oncontextmenu="return false" onselectstart="return false" onkeydown="AW(this,event)" onkeypress="AW(this,event)" onactivate="AW(this,event)">
<legend id="N10121153141893-box" class="aw-item-legend ">
<span id="N10121153141893-box-image" class="aw-item-image aw-image-{#0} "></span>
<span id="N10121153141893-box-ruler" class="aw-item-ruler "></span>
<span id="N10121153141893-box-text" class="aw-item-text " tabIndex="{#2}">{#1}</span>
</legend>
<span>Goodbye</span>
</fieldset>


I'm wondering if there is a simple fix to force the group to generate the attribute values.

Additionally, I noticed in the css that width and height were hard-coded to 400/100 px, respectively. Removing this line causes the groups to have 0/0 px dimensions, and not wrap the content I added. Any hints on this? I'm thinking it should be easy css change.

Thanks!
-w

(ps - I know it has been previously and explicity stated that the group control is not intended to actually contain anything, but since it generates the correct markup to support this, i thought i'd ask again anyway =)
wombat
Thursday, May 11, 2006
*bump*

I'll answer the second part of my question about px dimensions:

The group wasn't actually collapsing to 0/0px, it was collapsing to 75/23px. This is just enough to show the fieldset's legend and not the content. This size is inherited from the aw-item-control class, so a simple removal of that class causes the fieldset to wrap the entire content correctly!
obj.setClass("item", "");
obj.setClass("ui", "");
wombat
Wednesday, May 24, 2006

This topic is archived.


Back to support forum

Forum search