Tuesday, 15 April 2014

java - Zkoss zhtml extra div when using appendchild? -



java - Zkoss zhtml extra div when using appendchild? -

my question related zkoss , dynamically added components java side.

whenever i'm using appendchild on element (like on div) adds div kind of container. why that?

example, here part of composer class:

... @wire("div#mydiv") private div testdiv; ... ... label mylabel = new label(); mylabel.setvalue("test"); mylabel.setclass("test-label"); testdiv.appendchild(mylabel)

so instead of this:

<div id="mydiv"> <span class="test-label"> ... </span> </div>

i this:

<div id="mydiv"> <div id="hj973"> <!--this div --> <span class="test-label"> ... </span> </div> </div>

in cases not problem, except when i'm trying utilize span's grid float, because of course of study div shouldn't there.

why this? how can prevent it?

i don't know why there div, write

test-label:parent { ... }

in css file outer div behaves way span should , ignore span.

if don't help, i'll check later, don't have time right now.

java css zk

No comments:

Post a Comment