-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I a ZUL like
<window> as </window>
creates an output like:
<span id="z_e4_2" class="z-label" z.zcls="z-label" class="z-label"> as </span>
I think, it should be trimmed, like
<span id="z_e4_2" class="z-label" z.zcls="z-label" class="z-label"> as </span>
doesn't it?
Hi xmedeko
You can refer to zul.jar\metainfo\zk\lang.xml
and scroll down to bottom
you will see the below setting
<component> <component-name>window</component-name> <component-class>org.zkoss.zul.Window</component-class> <widget-class>zul.wnd.Window</widget-class> <mold> <mold-name>default</mold-name> <mold-uri>mold/window.js</mold-uri> <css-uri>css/window.css.dsp</css-uri> </mold> <preserve-blank/> </component>
The <preserve-blank/> will leave the blank
Hi Jimmi,
thanks. I have tried to put into my lang=addon.xml"
<component> <component-name>window</component-name> <component-class>org.zkoss.zul.Window</component-class> <widget-class>zul.wnd.Window</widget-class> <mold> <mold-name>default</mold-name> <mold-uri>mold/window.js</mold-uri> <css-uri>css/window.css.dsp</css-uri> </mold> </component>
I have thought the blank space is the job of the labelTemplate and the labelTemplate for the ZUL it should trim the blank spaces, or not? My real problem is that
<label value="A" /> <label value="B" />
It is a philosophical question. Since ZUL is XML, should the result be always the same when formatting changes or may be different? I do not know the answer. I think I will have to change my code to produce <label value="AB" />.
The problem is more confusing. I have a macro form-mandatory.zul:
<n:span class="z-label form-mandatory" xmlns:n="http://www.zkoss.org/2005/zk/native">*</n:span>
1.
<window xmlns:n="http://www.zkoss.org/2005/zk/native"> <span>A</span> <form-mandatory /> </window>
2.
<window xmlns:n="http://www.zkoss.org/2005/zk/native"> <n:span>A</n:span> <form-mandatory /> </window>
3.
<window xmlns:n="http://www.zkoss.org/2005/zk/native"> A <form-mandatory /> </window>
1. shows "A*" in the browser. The 2. and 3. both shows "A *" in the browser, but the HTML code is a little but different; 3. produces more spaces around 'A'.
I have no big problem with that. Just writing this post to let you know.
Asked: 2010-04-28 10:36:06 +0800
Seen: 393 times
Last updated: Apr 29 '10