=0?m.substring(0,l):m,k=g(location.href);l=k.indexOf("#");if(l>=0){k=k.substring(0,l)}if(k!=i){return}}location.reload()}}},frames:function(i){var j=[];a(j,i);return j},intsToString:function(m){if(!m){return""}var n=[];for(var l=0,i=m.length;l=0?p.substring(m,l):p.substring(m)).trim();if(n.length==0){if(l<0){break}o.push(i)}else{o.push(zk.parseInt(n))}if(l<0){break}m=l+1}return o},mapToString:function(m,j,l){j=j||"=";l=l||" ";var k=[];for(var i in m){k.push(l,i,j,m[i])}k[0]="";return k.join("")},appendAttr:function(i,k,j){return k||j?" "+i+'="'+k+'"':""},fireSized:function(j,k){if(zUtl.isImageLoading()||zk.clientinfo){var i=arguments.callee;setTimeout(function(){return i(j,k)},20);return}j=h(j);if(!(k<0)){zWatch.fireDown("beforeSize",j,null,k>0)}zWatch.fireDown("onFitSize",j,{reverse:true});zWatch.fireDown("onSize",j)},fireShown:function(i,j){zWatch.fireDown("onShow",i);zUtl.fireSized(i,j)},loadImage:function(i){if(!e[i]){e[i]=true;d(i)}},isImageLoading:function(){for(var url in iMap){var img=iMap[url];if(img.complete){try{delete e[url];}catch(err){}try{delete iMap[url];}catch(err){}}}for(var i in e){return true}return false}};var e={};var iMap={};function d(j){var i=new Image(),k=function(){try{delete e[j];}catch(err){}try{delete iMap[j];}catch(err){}};i.onerror=i.onload=k;i.src=j}})();
\ No newline at end of file
diff --git a/org.adempiere.ui.zk/WEB-INF/cwr/js/zk/utl.src.js b/org.adempiere.ui.zk/WEB-INF/cwr/js/zk/utl.src.js
deleted file mode 100644
index 10dc460cf6..0000000000
--- a/org.adempiere.ui.zk/WEB-INF/cwr/js/zk/utl.src.js
+++ /dev/null
@@ -1,654 +0,0 @@
-/* util.js
-
- Purpose:
-
- Description:
-
- History:
- Tue Sep 30 09:02:06 2008, Created by tomyeh
-
-Copyright (C) 2008 Potix Corporation. All Rights Reserved.
-
-This program is distributed under LGPL Version 2.1 in the hope that
-it will be useful, but WITHOUT ANY WARRANTY.
-*/
-(function () {
- var _decs = {lt: '<', gt: '>', amp: '&', quot: '"'},
- _encs = {};
- for (var v in _decs)
- _encs[_decs[v]] = v;
-
- function _pathname(url) {
- var j = url.indexOf('//');
- if (j > 0) {
- j = url.indexOf('/', j + 2);
- if (j > 0) return url.substring(j);
- }
- }
-
- function _frames(ary, w) {
- //Note: the access of frames is allowed for any window (even if it connects other website)
- ary.push(w);
- for (var fs = w.frames, j = 0, l = fs.length; j < l; ++j)
- _frames(ary, fs[j]);
- }
- /* Returns the onSize target of the given widget.
- * The following code is dirty since it checks _hflexsz (which is implementation)
- * FUTRE: consider to have zk.Widget.beforeSize to clean up _hflexsz and
- * this method considers only if _hflex is min
- */
- function _onSizeTarget(wgt) {
- var r1 = wgt, p1 = r1,
- j1 = -1;
- for (; p1 && p1._hflex == 'min'; p1 = p1.parent) {
- delete p1._hflexsz;
- r1 = p1;
- ++j1;
- if (p1.ignoreFlexSize_('w')) //p1 will not affect its parent's flex size
- break;
- }
-
- var r2 = wgt, p2 = r2,
- j2 = -1;
- for (; p2 && p2._vflex == 'min'; p2 = p2.parent) {
- delete p2._vflexsz;
- r2 = p2;
- ++j2;
- if (p2.ignoreFlexSize_('h')) //p2 will not affect its parent's flex size
- break;
- }
- return j1 > 0 || j2 > 0 ? j1 > j2 ? r1 : r2: wgt;
- }
-
-/** @class zUtl
- * @import zk.Widget
- * @import zk.xml.Utl
- * The basic utilties.
- * For more utilities, refer to {@link Utl}.
- */
-zUtl = { //static methods
- //Character
- /**
- * Returns whether the character is according to its opts.
- * @param char cc the character
- * @param Map opts the options.
-
- Allowed Options
-
-
- Name
- Allowed Values
- Description
-
-
- digit
- true, false
- Specifies the character is digit only.
-
-
- upper
- true, false
- Specifies the character is upper case only.
-
-
- lower
- true, false
- Specifies the character is lower case only.
-
-
- whitespace
- true, false
- Specifies the character is whitespace only.
-
-
- opts[cc]
- true, false
- Specifies the character is allowed only.
-
-
- * @return boolean
- */
- isChar: function (cc, opts) {
- return (opts.digit && cc >= '0' && cc <= '9')
- || (opts.upper && cc >= 'A' && cc <= 'Z')
- || (opts.lower && cc >= 'a' && cc <= 'z')
- || (opts.whitespace && (cc == ' ' || cc == '\t' || cc == '\n' || cc == '\r'))
- || opts[cc];
- },
-
- //HTML/XML
- /** Parses the specifie text into a map.
- * For example
- *
-zUtl.parseMap("a=b,c=d");
-zUtl.parseMap("a='b c',c=de", ',', "'\"");
-
- * @param String text the text to parse
- * @param String separator the separator. If omitted, ','
- * is assumed
- * @param String quote the quote to handle. Ignored if omitted.
- * @return Map the map
- */
- parseMap: function (text, separator, quote) {
- var map = {};
- if (text) {
- var ps = text.split(separator || ',');
- if (quote) {
- var tmp = [],
- re = new RegExp(quote, 'g'),
- key = '', t, pair;
- while((t = ps.shift()) !== undefined) {
- if ((pair = (key += t).match(re)) && pair.length != 1) {
- if (key)
- tmp.push(key);
- key = '';
- } else
- key += separator;
- }
- ps = tmp;
- }
- for (var len = ps.length; len--;) {
- var key = ps[len].trim(),
- index = key.indexOf('=');
- if (index != -1)
- map[key.substring(0, index)] = key.substring(index + 1, key.length).trim();
- }
- }
- return map;
- },
-
- /** Encodes the string to a valid XML string.
- * Refer to {@link Utl} for more XML utilities.
- * @param String txt the text to encode
- * @param Map opts [optional] the options. Allowd value:
- *
- * pre - whether to replace whitespace with
- * multiline - whether to replace linefeed with <br/>
- * maxlength - the maximal allowed length of the text
- *
- * @return String the encoded text.
- */
- encodeXML: function (txt, opts) {
- txt = txt != null ? String(txt):'';
- var tl = txt.length,
- pre = opts && opts.pre,
- multiline = pre || (opts && opts.multiline),
- maxlength = opts ? opts.maxlength : 0;
-
- if (!multiline && maxlength && tl > maxlength) {
- var j = maxlength;
- while (j > 0 && txt.charAt(j - 1) == ' ')
- --j;
- opts.maxlength = 0; //no limit
- return zUtl.encodeXML(txt.substring(0, j) + '...', opts);
- }
-
- var out = [], k = 0, enc;
- if (multiline || pre)
- for (var j = 0; j < tl; ++j) {
- var cc = txt.charAt(j);
- if (enc = _encs[cc]) {
- out.push(txt.substring(k, j), '&', enc, ';');
- k = j + 1;
- } else if (multiline && cc == '\n') {
- out.push(txt.substring(k, j), ' \n');
- k = j + 1;
- } else if (pre && (cc == ' ' || cc == '\t')) {
- out.push(txt.substring(k, j), ' ');
- if (cc == '\t')
- out.push(' ');
- k = j + 1;
- }
- }
- else
- for (var j = 0; j < tl; ++j)
- if (enc = _encs[txt.charAt(j)]) {
- out.push(txt.substring(k, j), '&', enc, ';');
- k = j + 1;
- }
-
- if (!k) return txt;
- if (k < tl)
- out.push(txt.substring(k));
- return out.join('');
- },
- /** Decodes the XML string into a normal string.
- * For example, < is convert to <
- * @param String txt the text to decode
- * @return String the decoded string
- */
- decodeXML: function (txt) {
- var out = '';
- if (!txt) return out;
-
- var k = 0, tl = txt.length;
- for (var j = 0; j < tl; ++j) {
- var cc = txt.charAt(j);
- if (cc == '&') {
- var l = txt.indexOf(';', j + 1);
- if (l >= 0) {
- var dec = txt.charAt(j + 1) == '#' ?
- String.fromCharCode(txt.charAt(j + 2).toLowerCase() == 'x' ?
- parseInt(txt.substring(j + 3, l), 16):
- parseInt(txt.substring(j + 2, l), 10)):
- _decs[txt.substring(j + 1, l)];
- if (dec) {
- out += txt.substring(k, j) + dec;
- k = (j = l) + 1;
- }
- }
- }
- }
- return !k ? txt:
- k < tl ? out + txt.substring(k): out;
- },
-
- /** A shortcut of ' cellpadding="0" cellspacing="0" border="0"'
.
- * @type String
- */
- cellps0: ' cellpadding="0" cellspacing="0" border="0"',
- /** A shortcut of '<img style="height:0;width:0"/>'
.
- * @type String
- */
- img0: ' ',
- /** A shortcut of '<i style="height:0;width:0"/>'
.
- * @type String
- */
- i0: ' ',
-
- /** Returns a long value representing the current time (unit: miliseconds).
- * @return long
- * @deprecated As of release 5.0.6, replaced with jq.now().
- */
- now: jq.now,
- /** Returns today.
- * @param boolean full if true, returns the full time,
- * else only returns year, month, and day.
- * If omitted, false is assumed
- * @return Date
- */
- /** Returns today.
- * @param String fmt the time format, such as HH:mm:ss.SSS
- * If a time element such as seconds not specified in the format, it will
- * be considered as 0. For example, if the format is "HH:mm", then
- * the returned object will be today, this hour and this minute, but
- * the second and milliseconds will be zero.
- * @return Date
- * @since 5.0.6
- */
- today: function (fmt) {
- var d = new Date(), hr = 0, min = 0, sec = 0, msec = 0;
- if (typeof fmt == 'string') {
- var fmt0 = fmt.toLowerCase();
- if (fmt0.indexOf('h') >= 0 || fmt0.indexOf('k') >= 0) hr = d.getHours();
- if (fmt.indexOf('m') >= 0) min = d.getMinutes();
- if (fmt.indexOf('s') >= 0) sec = d.getSeconds();
- if (fmt.indexOf('S') >= 0) msec = d.getMilliseconds();
- } else if (fmt)
- return d;
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(),
- hr, min, sec, msec);
- },
-
- /** Returns if one is ancestor of the other.
- * It assumes the object has either a method called getParent
- * or a field called parent
.
- * A typical example is used to test the widgets ({@link Widget}).
- *
- * Notice that, if you want to test DOM elements, please use
- * {@link jq#isAncestor} instead.
- *
- * @param Object p the parent. This method return true if p is null
- or p is the same as c
- * @param Object c the child
- * @return boolean
- * @see jq#isAncestor
- */
- isAncestor: function (p, c) {
- if (!p) return true;
- for (; c; c = c.getParent ? c.getParent(): c.parent)
- if (p == c)
- return true;
- return false;
- },
-
- //progress//
- /** Creates a message box to indicate something is being processed
- * @param String id the ID of the DOM element being created
- * @param String msg the message to shown
- * @param boolean mask whether to show sem-transparent mask to prevent
- * the user from accessing it.
- * @param String icon the CSS class used to shown an icon in the box.
- * Ignored if not specified.
- * @see #destroyProgressbox
- */
- progressbox: function (id, msg, mask, icon, _opts) {
- if (mask && zk.Page.contained.length) {
- for (var c = zk.Page.contained.length, e = zk.Page.contained[--c]; e; e = zk.Page.contained[--c]) {
- if (!e._applyMask)
- e._applyMask = new zk.eff.Mask({
- id: e.uuid + '-mask',
- message: msg,
- anchor: e.$n()
- });
- }
- return;
- }
-
- if (_opts && _opts.busy) {
- zk.busy++;
- jq.focusOut(); //Bug 2912533
- }
-
- var x = jq.innerX(), y = jq.innerY(),
- style = ' style="left:'+x+'px;top:'+y+'px"',
- idtxt = id + '-t',
- idmsk = id + '-m',
- html = '
';
- if (icon)
- html += '
';
- jq(document.body).append(html + '
');
-
- var $n = jq(id, zk),
- n = $n[0],
- $txt = jq(idtxt, zk),
- txt = $txt[0],
- st = txt.style;
- if (mask) {
- // old IE will get the auto value by default.
- var zIndex = $txt.css('z-index');
- if (zIndex == 'auto')
- zIndex = 1;
- n.z_mask = new zk.eff.FullMask({
- mask: jq(idmsk, zk)[0],
- zIndex: zIndex - 1
- });
- }
-
- if (mask && $txt.length) { //center
- st.left = jq.px((jq.innerWidth() - txt.offsetWidth) / 2 + x);
- st.top = jq.px((jq.innerHeight() - txt.offsetHeight) / 2 + y);
- } else {
- var pos = zk.progPos;
- if (pos) {
- var left,
- top,
- width = jq.innerWidth(),
- height = jq.innerHeight(),
- wdgap = width - zk(txt).offsetWidth(),
- hghgap = height - zk(txt).offsetHeight();
-
- if (pos.indexOf('mouse') >= 0) {
- var offset = zk.currentPointer;
- left = offset[0] + 10;
- top = offset[1] + 10;
- } else {
- if (pos.indexOf('left') >= 0) left = x;
- else if (pos.indexOf('right') >= 0) left = x + wdgap -1;
- else if (pos.indexOf('center') >= 0) left = x + wdgap / 2;
- else left = 0;
-
- if (pos.indexOf('top') >= 0) top = y;
- else if (pos.indexOf('bottom') >= 0) top = y + hghgap - 1;
- else if (pos.indexOf('center') >= 0) top = y + hghgap / 2;
- else top = 0;
-
- left = left < x ? x : left;
- top = top < y ? y : top;
- }
- st.left = jq.px(left);
- st.top = jq.px(top);
- }
- }
-
- $n.zk.cleanVisibility();
- },
- /** Removes the message box created by {@link #progressbox}.
- * @param String id the ID of the DOM element of the message box
- */
- destroyProgressbox: function (id, _opts) {
- if (_opts && _opts.busy && --zk.busy < 0)
- zk.busy = 0;
- var $n = jq(id, zk), n;
- if ($n.length) {
- if (n = $n[0].z_mask) n.destroy();
- $n.remove();
- }
-
- for (var c = zk.Page.contained.length, e = zk.Page.contained[--c]; e; e = zk.Page.contained[--c])
- if (e._applyMask) {
- e._applyMask.destroy();
- e._applyMask = null;
- }
- },
-
- //HTTP//
- /** Navigates to the specified URL.
- * @param String url the URL to go to
- * @param Map opts [optional] the options. Allowed values:
- *
- * target - the name of the target browser window. The same browswer
- * window is assumed if omitted. You can use any value allowed in
- * the target attribute of the HTML FORM tag, such as _self, _blank,
- * _parent and _top.
- * overwrite - whether load a new page in the current browser window.
- * If true, the new page replaces the previous page's position in the history list.
- *
- */
- go: function (url, opts) {
- opts = opts || {};
- if (opts.target) {
- open(url, opts.target);
- } else if (opts.overwrite) {
- location.replace(url ? url: location.href);
- } else {
- if (url) {
- location.href = url;
-
- var j = url.indexOf('#');
- //bug 3363687, only if '#" exist, has to reload()
- if(j < 0)
- return;
-
- var un = j >= 0 ? url.substring(0, j): url,
- pn = _pathname(location.href);
-
- j = pn.indexOf('#');
- if (j >= 0) pn = pn.substring(0, j);
- if (pn != un)
- return;
- //fall thru (bug 2882149)
- }
- location.reload();
- }
- },
-
- /** Returns all descendant frames of the given window.
- * To retrieve all, invoke zUtl.frames(top)
.
- * Notice: w is included in the returned array.
- * If you want to exclude it, invoke zUtl.frames(w).$remove(w)
.
- * @param Window w the browser window
- * @return Array
- * @since 5.0.4
- */
- frames: function (w) {
- var ary = [];
- _frames(ary, w);
- return ary;
- },
-
- /** Converts an integer array to a string (separated by comma).
- * @param int[] ary the integer array to convert.
- * If null, an empty string is returned.
- * @return String
- * @see #stringToInts
- */
- intsToString: function (ary) {
- if (!ary) return '';
-
- var sb = [];
- for (var j = 0, k = ary.length; j < k; ++j)
- sb.push(ary[j]);
- return sb.join();
- },
- /** Converts a string separated by comma to an array of integers.
- * @see #intsToString
- * @param String text the string to convert.
- * If null, null is returned.
- * @param int defaultValue the default value used if the value
- * is not specified. For example, zUtl.stringToInts("1,,3", 2) returns [1, 2, 3].
- * @return int[]
- */
- stringToInts: function (text, defaultValue) {
- if (text == null)
- return null;
-
- var list = [];
- for (var j = 0;;) {
- var k = text.indexOf(',', j),
- s = (k >= 0 ? text.substring(j, k): text.substring(j)).trim();
- if (s.length == 0) {
- if (k < 0) break;
- list.push(defaultValue);
- } else
- list.push(zk.parseInt(s));
-
- if (k < 0) break;
- j = k + 1;
- }
- return list;
- },
- /** Converts a map to a string
- * @see #intsToString
- * @param Map map the map to convert
- * @param String assign the symbol for assignment. If omitted, '=' is assumed.
- * @param String separator the symbol for separator. If omitted, ',' is assumed.
- * @return String
- */
- mapToString: function (map, assign, separator) {
- assign = assign || '=';
- separator = separator || ' ';
- var out = [];
- for (var v in map)
- out.push(separator, v, assign, map[v]);
- out[0] = '';
- return out.join('');
- },
- /** Appends an attribute.
- * Notice that the attribute won't be appended if val is empty or false.
- * In other words, it is equivalent to
- * val ? ' ' + nm + '="' + val + '"': ""
.
- *
If you want to generate the attribute no matter what val is, use
- * {@link #appendAttr(String, Object, boolean)}.
- * @param String nm the name of the attribute
- * @param Object val the value of the attribute
- * @since 5.0.3
- */
- /** Appends an attribute.
- * Notice that the attribute won't be appended.
- * @param String nm the name of the attribute
- * @param Object val the value of the attribute
- * @param boolean force whether to append attribute no matter what value it is.
- * If false (or omitted), it is the same as {@link #appendAttr(String, Object)}.
- * @since 5.0.3
- */
- appendAttr: function (nm, val, force) {
- return val || force ? ' ' + nm + '="' + val + '"': '';
- },
- /** Fires beforeSize, onFitSize and onSize
- * @param Widget wgt the widget which the zWatch event will be fired against.
- * @param int bfsz the beforeSize mode:
- *
- * 0 (null/undefined/false): beforeSize sent normally.
- * -1: beforeSize won't be sent.
- * 1: beforeSize will be sent with an additional cleanup option,
- * which will clean up the cached minimal size (if flex=min).
- *
- * @since 5.0.8
- */
- fireSized: function (wgt, bfsz) {
- if (zUtl.isImageLoading() || zk.clientinfo) {
- var f = arguments.callee;
- setTimeout(function () {
- return f(wgt, bfsz);
- }, 20);
- return;
- }
- wgt = _onSizeTarget(wgt);
- if (!(bfsz < 0)) //don't use >= (because bfsz might be undefined)
- zWatch.fireDown('beforeSize', wgt, null, bfsz > 0);
- zWatch.fireDown('onFitSize', wgt, {reverse: true});
- zWatch.fireDown('onSize', wgt);
- },
- /** Fires onBeforeSize, onShow, onFitSize, and onSize
- * @param Widget wgt the widget which the zWatch event will be fired against.
- * @param int bfsz the beforeSize mode:
- *
- * 0 (null/undefined/false): beforeSize sent normally.
- * -1: beforeSize won't be sent.
- * 1: beforeSize will be sent with an additional cleanup option,
- * which will clean up the cached minimal size (if flex=min).
- *
- * @since 5.0.8
- */
- fireShown: function (wgt, bfsz) {
- zWatch.fireDown('onShow', wgt);
- zUtl.fireSized(wgt, bfsz);
- },
- /**
- * Loads an image before ZK client engine to calculate the widget's layout.
- * @param String url the loading image's localation
- * @since 6.0.0
- */
- loadImage: function (url) {
- if (!_imgMap[url]) {
- _imgMap[url] = true;
- _loadImage(url);
- }
- },
- /**
- * Checks whether all the loading images are finish.
- * @see #loadImage
- * @since 6.0.0
- */
- isImageLoading: function () {
- for (var url in _imgObjectMap) {
- var img = _imgObjectMap[url];
- if (img.complete) {
- try {
- delete _imgMap[url];
- } catch (err) {}
- try {
- delete _imgObjectMap[url];
- } catch (err) {}
- }
- }
- for (var n in _imgMap) {
- return true;
- }
- return false;
- }
-};
-
-var _imgMap = {};
-var _imgObjectMap = {};
-function _loadImage(url) {
- var img = new Image(),
- f = function () {
- try {
- delete _imgMap[url];
- } catch (err) {}
- try {
- delete _imgObjectMap[url];
- } catch (err) {}
- };
- _imgObjectMap[url]=img;
- img.onerror = img.onload = img.onabort = f;
- img.src = url;
-}
-})();
diff --git a/org.adempiere.ui.zk/WEB-INF/override-web.xml b/org.adempiere.ui.zk/WEB-INF/override-web.xml
new file mode 100644
index 0000000000..6c8c48e3f8
--- /dev/null
+++ b/org.adempiere.ui.zk/WEB-INF/override-web.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ ZK loader for ZUML pages
+ zkLoader
+
+ org.adempiere.webui.session.WebUIServlet
+
+
+
+ update-uri
+ /zkau
+
+
+ compress
+ false
+
+ 1
+
+
+ zkLoader
+ *.zul
+
+
+ zkLoader
+ *.zhtml
+
+
+
diff --git a/org.adempiere.ui.zk/WEB-INF/src/metainfo/tld/config.xml b/org.adempiere.ui.zk/WEB-INF/src/metainfo/tld/config.xml
index 30167039f0..e94a568a19 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/metainfo/tld/config.xml
+++ b/org.adempiere.ui.zk/WEB-INF/src/metainfo/tld/config.xml
@@ -1,6 +1,7 @@
+ org.adempiere.ui.zk
org.adempiere.webui.AdempiereWebUI
1.0.0
diff --git a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml
index 8b26228bbf..e138fad282 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml
+++ b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml
@@ -35,7 +35,7 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
-
+
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java
index 7f8b91f0a7..af5e1b108f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java
@@ -52,7 +52,7 @@ public class AdempiereIdGenerator implements IdGenerator {
boolean useIdSpace = true;
if (Util.isEmpty(uuid)) {
useIdSpace = false;
- String attribute = comp.getWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
+ String attribute = comp.getClientAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
if (!Util.isEmpty(attribute)) {
String widgetName = getWidgetName(comp.getWidgetClass());
uuid = widgetName+"0"+attribute;
@@ -156,7 +156,7 @@ public class AdempiereIdGenerator implements IdGenerator {
}
if (Util.isEmpty(id)) {
- String attribute = comp.getWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
+ String attribute = comp.getClientAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME);
if (attribute != null && attribute.length() > 0) {
String widgetName = getWidgetName(comp.getWidgetClass());
locatorBuilder.append("@")
@@ -171,7 +171,7 @@ public class AdempiereIdGenerator implements IdGenerator {
Component parent = comp.getParent();
while(parent != null) {
if (Util.isEmpty(id) || (parent instanceof IdSpace)) {
- String parentLocator = parent.getWidgetAttribute(ZK_LOCATOR_ATTRIBUTE);
+ String parentLocator = parent.getClientAttribute(ZK_LOCATOR_ATTRIBUTE);
if (parentLocator != null && parentLocator.trim().length() > 0) {
locatorBuilder.insert(0, parentLocator+ " ");
break;
@@ -180,6 +180,6 @@ public class AdempiereIdGenerator implements IdGenerator {
parent = parent.getParent();
}
- comp.setWidgetAttribute(ZK_LOCATOR_ATTRIBUTE, locatorBuilder.toString());
+ comp.setClientAttribute(ZK_LOCATOR_ATTRIBUTE, locatorBuilder.toString());
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/FedexLabelWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/FedexLabelWindow.java
index 287e284296..feee381617 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/FedexLabelWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/FedexLabelWindow.java
@@ -22,6 +22,8 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.VerticalBox;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
+import org.apache.ecs.xhtml.center;
import org.compiere.model.MAttachmentEntry;
import org.compiere.util.CLogger;
import org.zkoss.util.media.AMedia;
@@ -62,7 +64,7 @@ public class FedexLabelWindow extends Window implements EventListener
private void init()
{
this.setBorder("normal");
- this.setWidth("730px");
+ ZKUpdateUtil.setWidth(this, "730px");
VerticalBox box = new VerticalBox();
this.appendChild(box);
lbx = ListboxFactory.newDropdownListbox();
@@ -75,8 +77,8 @@ public class FedexLabelWindow extends Window implements EventListener
box.appendChild(new Separator());
content = new Iframe();
- content.setHeight("500px");
- content.setWidth("700px");
+ ZKUpdateUtil.setHeight(content, "500px");
+ ZKUpdateUtil.setWidth(content, "700px");
content.setId("content");
content.setName(content.getUuid());
box.appendChild(content);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LabelAppletWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LabelAppletWindow.java
index 0151d1f361..263f70461d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LabelAppletWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LabelAppletWindow.java
@@ -18,6 +18,7 @@ import java.util.logging.Level;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MArchive;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@@ -50,8 +51,8 @@ public class LabelAppletWindow extends Window implements EventListener
Applet applet = new Applet();
applet.setCode("PrintLabelApplet.class");
applet.setArchive("labelapplet.jar");
- applet.setWidth("0");
- applet.setHeight("0");
+ ZKUpdateUtil.setWidth(applet, "0");
+ ZKUpdateUtil.setHeight(applet, "0");
applet.setParam("size", list.size() + "");
for(int i = 0; i < list.size(); i++)
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UPSHtmlLabelWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UPSHtmlLabelWindow.java
index bcf5fed0d4..7f13e4dea8 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UPSHtmlLabelWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UPSHtmlLabelWindow.java
@@ -27,6 +27,7 @@ import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.VerticalBox;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MAttachmentEntry;
import org.compiere.util.CLogger;
import org.zkoss.util.media.AMedia;
@@ -70,7 +71,7 @@ public class UPSHtmlLabelWindow extends Window implements EventListener
private void init()
{
this.setBorder("normal");
- this.setWidth("730px");
+ ZKUpdateUtil.setWidth(this, "730px");
VerticalBox box = new VerticalBox();
this.appendChild(box);
html = ListboxFactory.newDropdownListbox();
@@ -82,8 +83,8 @@ public class UPSHtmlLabelWindow extends Window implements EventListener
box.appendChild(html);
box.appendChild(new Separator());
content = new Iframe();
- content.setHeight("500px");
- content.setWidth("700px");
+ ZKUpdateUtil.setHeight(content, "500px");
+ ZKUpdateUtil.setWidth(content, "700px");
content.setId("content");
content.setName(content.getUuid());
box.appendChild(content);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UiLifeCycleListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UiLifeCycleListener.java
index 5940bb7f57..67ee6f61b9 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UiLifeCycleListener.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/UiLifeCycleListener.java
@@ -16,6 +16,7 @@ package org.adempiere.webui;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Desktop;
import org.zkoss.zk.ui.Page;
+import org.zkoss.zk.ui.ShadowElement;
import org.zkoss.zk.ui.util.UiLifeCycle;
/**
@@ -67,4 +68,16 @@ public class UiLifeCycleListener implements UiLifeCycle {
public void afterPageDetached(Page page, Desktop prevdesktop) {
}
+ @Override
+ public void afterShadowAttached(ShadowElement arg0, Component arg1) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void afterShadowDetached(ShadowElement arg0, Component arg1) {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java
index 2abd2c52ef..13f32af59f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java
@@ -34,6 +34,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.component.ZkCssHelper;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridField;
import org.compiere.model.MRole;
@@ -311,15 +312,15 @@ public class ValuePreference extends Window implements EventListener
cbInfowindow.setChecked(true);
//
setPanel.appendChild(setLayout);
- setPanel.setHflex("1");
+ ZKUpdateUtil.setHflex(setPanel, "1");
fAttribute.setReadonly(true);
fValue.setReadonly(true);
Vbox box = new Vbox();
- box.setWidth("100%");
- box.setHeight("100%");
+ ZKUpdateUtil.setWidth(box, "100%");
+ ZKUpdateUtil.setHeight(box, "100%");
box.setParent(this);
- box.setHflex("1");
+ ZKUpdateUtil.setHflex(box, "1");
box.appendChild(setPanel);
Rows rows = new Rows();
@@ -331,7 +332,7 @@ public class ValuePreference extends Window implements EventListener
div.appendChild(lAttribute);
row.appendCellChild(div, 1);
row.appendCellChild(fAttribute, 4);
- fAttribute.setWidth("96%");
+ ZKUpdateUtil.setWidth(fAttribute, "96%");
row.appendCellChild(lAttributeValue, 1);
rows.appendChild(row);
@@ -341,7 +342,7 @@ public class ValuePreference extends Window implements EventListener
div.appendChild(lValue);
row.appendCellChild(div, 1);
row.appendCellChild(fValue, 4);
- fValue.setWidth("96%");
+ ZKUpdateUtil.setWidth(fValue, "96%");
row.appendCellChild(lValueValue, 1);
rows.appendChild(row);
@@ -382,7 +383,7 @@ public class ValuePreference extends Window implements EventListener
//
Separator separator = new Separator();
- separator.setHeight("10px");
+ ZKUpdateUtil.setHeight(separator, "10px");
box.appendChild(separator);
box.appendChild(confirmPanel);
@@ -390,7 +391,7 @@ public class ValuePreference extends Window implements EventListener
setLayout.makeNoStrip();
setLayout.setOddRowSclass("even");
- this.setWidth("500px");
+ ZKUpdateUtil.setWidth(this, "500px");
this.setSizable(true);
} // jbInit
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java
index f9592495d3..ac3a08cde4 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java
@@ -22,6 +22,7 @@ import javax.servlet.ServletRequest;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.part.AbstractUIPart;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.LoginWindow;
import org.zkoss.web.servlet.Servlets;
import org.zkoss.zhtml.Text;
@@ -76,7 +77,7 @@ public class WLogin extends AbstractUIPart
div.appendChild(new Text(msg));
browserWarningWindow.appendChild(div);
browserWarningWindow.setPosition("top,right");
- browserWarningWindow.setWidth("550px");
+ ZKUpdateUtil.setWidth(browserWarningWindow, "550px");
browserWarningWindow.setPage(page);
browserWarningWindow.doOverlapped();
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java
index 2b816d8dcc..933d77b5b6 100755
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java
@@ -50,6 +50,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MAcctSchemaElement;
@@ -250,11 +251,11 @@ public class WAcctViewer extends Window implements EventListener
private void init() throws Exception
{
// Selection Panel
- selectionPanel.setHflex("1");
+ ZKUpdateUtil.setHflex(selectionPanel, "1");
// Accounting Schema
Grid grid = new Grid();
- grid.setHflex("1");
+ ZKUpdateUtil.setHflex(grid, "1");
grid.setSclass("grid-layout");
selectionPanel.appendChild(grid);
@@ -262,10 +263,10 @@ public class WAcctViewer extends Window implements EventListener
Columns columns = new Columns();
grid.appendChild(columns);
Column column = new Column();
- column.setWidth("30%");
+ ZKUpdateUtil.setWidth(column, "30%");
columns.appendChild(column);
column = new Column();
- column.setWidth("60%");
+ ZKUpdateUtil.setWidth(column, "60%");
columns.appendChild(column);
Rows rows = grid.newRows();
@@ -277,7 +278,7 @@ public class WAcctViewer extends Window implements EventListener
Row row = rows.newRow();
row.appendChild(lacctSchema);
row.appendChild(selAcctSchema);
- selAcctSchema.setHflex("1");
+ ZKUpdateUtil.setHflex(selAcctSchema, "1");
selDocument.setLabel(Msg.getMsg(Env.getCtx(), "SelectDocument"));
selDocument.addEventListener(Events.ON_CHECK, this);
@@ -301,7 +302,7 @@ public class WAcctViewer extends Window implements EventListener
row = rows.newRow();
row.appendChild(lpostingType);
row.appendChild(selPostingType);
- selPostingType.setHflex("1");
+ ZKUpdateUtil.setHflex(selPostingType, "1");
// Date
@@ -325,7 +326,7 @@ public class WAcctViewer extends Window implements EventListener
row = rows.newRow();
row.appendChild(lOrg);
row.appendChild(selOrg);
- selOrg.setHflex("1");
+ ZKUpdateUtil.setHflex(selOrg, "1");
// Account
@@ -384,7 +385,7 @@ public class WAcctViewer extends Window implements EventListener
displayQty.setLabel(Msg.getMsg(Env.getCtx(), "DisplayQty"));
displayQty.addEventListener(Events.ON_CHECK, this);
- displayPanel.setWidth("100%");
+ ZKUpdateUtil.setWidth(displayPanel, "100%");
displayPanel.appendChild(displayDocumentInfo);
displayPanel.appendChild(displaySourceAmt);
displayPanel.appendChild(displayQty);
@@ -392,15 +393,15 @@ public class WAcctViewer extends Window implements EventListener
grid = new Grid();
grid.setSclass("grid-layout");
- grid.setHflex("1");
+ ZKUpdateUtil.setHflex(grid, "1");
displayPanel.appendChild(grid);
columns = new Columns();
grid.appendChild(columns);
column = new Column();
- column.setWidth("70%");
+ ZKUpdateUtil.setWidth(column, "70%");
columns.appendChild(column);
column = new Column();
- column.setWidth("30%");
+ ZKUpdateUtil.setWidth(column, "30%");
columns.appendChild(column);
rows = grid.newRows();
@@ -408,35 +409,35 @@ public class WAcctViewer extends Window implements EventListener
lSort.setValue(Msg.getMsg(Env.getCtx(), "SortBy"));
lGroup.setValue(Msg.getMsg(Env.getCtx(), "GroupBy"));
row.appendChild(lSort);
- lSort.setHflex("1");
+ ZKUpdateUtil.setHflex(lSort, "1");
row.appendChild(lGroup);
row = rows.newRow();
sortBy1.setMold("select");
sortBy1.setRows(1);
row.appendChild(sortBy1);
- sortBy1.setHflex("1");
+ ZKUpdateUtil.setHflex(sortBy1, "1");
row.appendChild(group1);
row = rows.newRow();
sortBy2.setMold("select");
sortBy2.setRows(1);
row.appendChild(sortBy2);
- sortBy2.setHflex("1");
+ ZKUpdateUtil.setHflex(sortBy2, "1");
row.appendChild(group2);
row = rows.newRow();
sortBy3.setMold("select");
sortBy3.setRows(1);
row.appendChild(sortBy3);
- sortBy3.setHflex("1");
+ ZKUpdateUtil.setHflex(sortBy3, "1");
row.appendChild(group3);
row = rows.newRow();
sortBy4.setMold("select");
sortBy4.setRows(1);
row.appendChild(sortBy4);
- sortBy4.setHflex("1");
+ ZKUpdateUtil.setHflex(sortBy4, "1");
row.appendChild(group4);
//"images/InfoAccount16.png"
@@ -452,15 +453,15 @@ public class WAcctViewer extends Window implements EventListener
groupSelection.appendChild(selectionPanel);
Hlayout boxQueryPanel = new Hlayout();
- boxQueryPanel.setHflex("3");
+ ZKUpdateUtil.setHflex(boxQueryPanel, "3");
boxQueryPanel.appendChild(groupSelection);
- groupSelection.setHflex("2");
+ ZKUpdateUtil.setHflex(groupSelection, "2");
Separator separator = new Separator();
separator.setOrient("vertical");
boxQueryPanel.appendChild(separator);
boxQueryPanel.appendChild(groupDisplay);
- groupDisplay.setHflex("1");
+ ZKUpdateUtil.setHflex(groupDisplay, "1");
// South Panel
@@ -489,11 +490,11 @@ public class WAcctViewer extends Window implements EventListener
bExport.addEventListener(Events.ON_CLICK, this);
bExport.setVisible(false);
- southPanel.setHflex("5");
+ ZKUpdateUtil.setHflex(southPanel, "5");
Grid southLeftGrid = new Grid();
southLeftGrid.setSclass("grid-layout");
southPanel.appendChild(southLeftGrid);
- southLeftGrid.setHflex("4");
+ ZKUpdateUtil.setHflex(southLeftGrid, "4");
rows = southLeftGrid.newRows();
Row southLeft = rows.newRow();
Hlayout repostLayout = new Hlayout();
@@ -501,12 +502,12 @@ public class WAcctViewer extends Window implements EventListener
repostLayout.appendChild(bRePost);
repostLayout.appendChild(new Separator());
repostLayout.appendChild(forcePost);
- repostLayout.setVflex("1");
+ ZKUpdateUtil.setVflex(repostLayout, "1");
southLeft.appendChild(statusLine);
Grid southRight = new Grid();
southRight.setSclass("grid-layout");
- southRight.setHflex("1");
+ ZKUpdateUtil.setHflex(southRight, "1");
southPanel.appendChild(southRight);
Panel southRightPanel = new Panel();
southRightPanel.appendChild(bZoom); // Elaine 2009/07/29
@@ -521,27 +522,27 @@ public class WAcctViewer extends Window implements EventListener
resultPanel = new Borderlayout();
resultPanel.setStyle("position: absolute");
- resultPanel.setWidth("99%");
- resultPanel.setHeight("99%");
+ ZKUpdateUtil.setWidth(resultPanel, "99%");
+ ZKUpdateUtil.setHeight(resultPanel, "99%");
result.appendChild(resultPanel);
Center resultCenter = new Center();
resultPanel.appendChild(resultCenter);
- table.setHflex("1");
- table.setVflex(true);
- table.setHeight("99%");
+ ZKUpdateUtil.setHflex(table, "1");
+ ZKUpdateUtil.setVflex(table, true);
+ //ZKUpdateUtil.setHeight(table, "99%");
table.setStyle("position: absolute;");
resultCenter.appendChild(table);
- table.setHflex("1");
- table.setVflex("1");
+ ZKUpdateUtil.setHflex(table, "1");
+ //ZKUpdateUtil.setVflex(table, "1");
table.addEventListener(Events.ON_DOUBLE_CLICK, this);
pagingPanel = new South();
resultPanel.appendChild(pagingPanel);
pagingPanel.appendChild(paging);
- result.setHflex("1");
- result.setHeight("100%");
+ ZKUpdateUtil.setHflex(result, "1");
+ ZKUpdateUtil.setHeight(result, "100%");
result.setStyle("position: relative");
paging.addEventListener("onPaging", this);
@@ -550,7 +551,7 @@ public class WAcctViewer extends Window implements EventListener
// Query Tab
- query.setHflex("1");
+ ZKUpdateUtil.setHflex(query, "1");
query.appendChild(boxQueryPanel);
// Tabbox
@@ -564,35 +565,35 @@ public class WAcctViewer extends Window implements EventListener
tabs.appendChild(tabQuery);
tabs.appendChild(tabResult);
- tabpanels.setHflex("1");
+ ZKUpdateUtil.setHflex(tabpanels, "1");
tabpanels.appendChild(query);
tabpanels.appendChild(result);
- tabbedPane.setHflex("1");
- tabbedPane.setVflex("1");
+ ZKUpdateUtil.setHflex(tabbedPane, "1");
+ ZKUpdateUtil.setVflex(tabbedPane, "1");
tabbedPane.appendChild(tabs);
tabbedPane.appendChild(tabpanels);
Borderlayout layout = new Borderlayout();
layout.setParent(this);
- layout.setHeight("100%");
- layout.setWidth("100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
layout.setStyle("background-color: transparent; margin: 0; position: absolute; padding: 0;");
Center center = new Center();
center.setParent(layout);
center.setStyle("background-color: transparent; padding: 2px;");
tabbedPane.setParent(center);
- tabbedPane.setHflex("1");
- tabbedPane.setVflex("1");
+ ZKUpdateUtil.setHflex(tabbedPane, "1");
+ ZKUpdateUtil.setVflex(tabbedPane, "1");
South south = new South();
south.setParent(layout);
south.setStyle("background-color: transparent");
- south.setHeight("36px");
+ ZKUpdateUtil.setHeight(south, "36px");
southPanel.setParent(south);
- southPanel.setVflex("1");
- southPanel.setHflex("1");
+ ZKUpdateUtil.setVflex(southPanel, "1");
+ ZKUpdateUtil.setHflex(southPanel, "1");
this.setTitle(Msg.getMsg(Env.getCtx(), TITLE));
this.setClosable(true);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java
index bd4a8ff879..6475d2c5c0 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java
@@ -37,6 +37,7 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MRole;
@@ -91,7 +92,7 @@ public class ADSortTab extends Panel implements IADTabpanel
this.gridTab = gridTab;
m_AD_Table_ID = gridTab.getAD_Table_ID();
- this.setVflex("true");
+ ZKUpdateUtil.setVflex(this, "true");
} // ADSortTab
/** Logger */
@@ -265,8 +266,8 @@ public class ADSortTab extends Panel implements IADTabpanel
noLabel.setValue("No");
yesLabel.setValue("Yes");
- yesList.setVflex(true);
- noList.setVflex(true);
+ ZKUpdateUtil.setVflex(yesList, true);
+ ZKUpdateUtil.setVflex(noList, true);
setId(AdempiereIdGenerator.escapeId(gridTab.getName()));
@@ -345,16 +346,16 @@ public class ADSortTab extends Panel implements IADTabpanel
listHeader.setParent(listHead);
Hlayout hlayout = new Hlayout();
- hlayout.setVflex("true");
- hlayout.setHflex("true");
+ ZKUpdateUtil.setVflex(hlayout, "true");
+ ZKUpdateUtil.setHflex(hlayout, "true");
hlayout.setStyle("margin: auto;");
appendChild(hlayout);
- noList.setHflex("1");
- noList.setVflex(true);
+ ZKUpdateUtil.setHflex(noList, "1");
+ ZKUpdateUtil.setVflex(noList, true);
hlayout.appendChild(noList);
- yesList.setVflex(true);
- yesList.setHflex("1");
+ ZKUpdateUtil.setVflex(yesList, true);
+ ZKUpdateUtil.setHflex(yesList, "1");
hlayout.appendChild(yesList);
addEventListener(ON_ACTIVATE_EVENT, new EventListener() {
@@ -964,7 +965,7 @@ public class ADSortTab extends Panel implements IADTabpanel
@Override
public void setDetailPaneMode(boolean detailMode) {
this.detailPaneMode = detailMode;
- this.setVflex("true");
+ ZKUpdateUtil.setVflex(this, "true");
}
public boolean isDetailPaneMode() {
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java
index 7f082df202..603444a5ba 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java
@@ -55,6 +55,7 @@ import org.adempiere.webui.panel.HelpController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.GridTabDataBinder;
import org.adempiere.webui.util.TreeUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener;
@@ -131,7 +132,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
/**
*
*/
- private static final long serialVersionUID = -6108216899210485771L;
+ private static final long serialVersionUID = -3728896318124756192L;
private static final String ON_SAVE_OPEN_PREFERENCE_EVENT = "onSaveOpenPreference";
@@ -203,8 +204,6 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
public static final String ON_TOGGLE_EVENT = "onToggle";
- private static final String DEFAULT_PANEL_WIDTH = "300px";
-
private static enum SouthEvent {
SLIDE(),
OPEN(),
@@ -238,11 +237,11 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
{
LayoutUtils.addSclass("adtab-content", this);
- this.setWidth("100%");
+ ZKUpdateUtil.setWidth(this, "100%");
form = new Grid();
- form.setHflex("1");
- form.setHeight(null);
+ ZKUpdateUtil.setHflex(form, "1");
+ ZKUpdateUtil.setHeight(form, null);
form.setVflex(false);
form.setSclass("grid-layout adwindow-form");
form.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "form");
@@ -300,7 +299,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
int maxHeight = browserHeight - topmarginpx;
if (prefHeight <= maxHeight) {
height = Integer.toString(prefHeight) + "px";
- formContainer.getSouth().setHeight(height);
+ ZKUpdateUtil.setHeight(formContainer.getSouth(), height);
}
} catch (Exception e) {
// just ignore exception is harmless here, consequence is just not setting height so it will assume the default of theme
@@ -362,7 +361,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
treePanel = new ADTreePanel(windowNo, gridTab.getTabNo());
West west = new West();
west.appendChild(treePanel);
- west.setWidth(widthTreePanel());
+ ZKUpdateUtil.setWidth(west, "300px");
west.setCollapsible(true);
west.setSplittable(true);
west.setAutoscroll(true);
@@ -372,8 +371,8 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
Vlayout div = new Vlayout();
div.appendChild(form);
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
div.setSclass("adtab-form");
div.setStyle("overflow-y: visible;");
div.setSpacing("0px");
@@ -389,8 +388,8 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
div.setSclass("adtab-form");
div.appendChild(form);
div.setStyle("overflow-y: visible;");
- div.setVflex("1");
- div.setWidth("100%");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setWidth(div, "100%");
div.setSpacing("0px");
Borderlayout layout = new Borderlayout();
@@ -432,7 +431,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
for (int h=0;h 0 && adTabId > 0) {
- width = Env.getPreference(Env.getCtx(), windowId, adTabId+"|TreePanel.Width", false);
- }
- if (Util.isEmpty(width)) {
- width = DEFAULT_PANEL_WIDTH;
- }
- return width;
- }
private void navigateTo(DefaultTreeNode value) {
MTreeNode treeNode = value.getData();
// We Have a TreeNode
@@ -1404,7 +1391,13 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
SimpleTreeModel model = (SimpleTreeModel)(TreeModel>) treePanel.getTree().getModel();
if (treePanel.getTree().getSelectedItem() != null) {
- DefaultTreeNode treeNode = treePanel.getTree().getSelectedItem().getValue();
+ Treeitem treeItem = treePanel.getTree().getSelectedItem();
+ if (!treeItem.isLoaded()){
+ return;
+ }
+
+ DefaultTreeNode treeNode = treeItem.getValue();
+
MTreeNode data = (MTreeNode) treeNode.getData();
if (data.getNode_ID() == recordId) {
int[] path = model.getPath(treeNode);
@@ -1574,7 +1567,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
} else {
attachDetailPane();
}
- this.setVflex("true");
+ ZKUpdateUtil.setVflex(this, "true");
listPanel.setDetailPaneMode(detailPaneMode);
}
}
@@ -1754,43 +1747,31 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
if (formContainer.getSouth() != null) {
if (formContainer.getSouth().isVisible() && formContainer.getSouth().isOpen()) {
String height = formContainer.getSouth().getHeight();
- if (! Util.isEmpty(height))
- savePreference("DetailPane.Height", height);
+ if (! Util.isEmpty(height)) {
+ int windowId = getGridTab().getAD_Window_ID();
+ int adTabId = getGridTab().getAD_Tab_ID();
+ if (windowId > 0 && adTabId > 0) {
+ Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_User_ID=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
+ int userId = Env.getAD_User_ID(Env.getCtx());
+ MPreference preference = query.setOnlyActiveRecords(true)
+ .setApplyAccessFilter(true)
+ .setParameters(windowId, adTabId+"|DetailPane.Height", userId)
+ .first();
+ if (preference == null || preference.getAD_Preference_ID() <= 0) {
+ preference = new MPreference(Env.getCtx(), 0, null);
+ preference.setAD_Window_ID(windowId);
+ preference.set_ValueOfColumn("AD_User_ID", userId); // required set_Value for System=0 user
+ preference.setAttribute(adTabId+"|DetailPane.Height");
+ }
+ preference.setValue(height);
+ preference.saveEx();
+ //update current context
+ Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.Height", height);
+ }
+ }
}
}
-
- if (treePanel != null && formContainer.getWest() != null) {
- if (formContainer.getWest().isVisible() && formContainer.getWest().isOpen()) {
- String width = formContainer.getWest().getWidth();
- if (! Util.isEmpty(width))
- savePreference("TreePanel.Width", width);
- }
- }
-
super.onPageDetached(page);
}
- void savePreference(String attribute, String value)
- {
- int windowId = getGridTab().getAD_Window_ID();
- int adTabId = getGridTab().getAD_Tab_ID();
- if (windowId > 0 && adTabId > 0) {
- Query query = new Query(Env.getCtx(), MTable.get(Env.getCtx(), I_AD_Preference.Table_ID), "AD_Window_ID=? AND Attribute=? AND AD_User_ID=? AND AD_Process_ID IS NULL AND PreferenceFor = 'W'", null);
- int userId = Env.getAD_User_ID(Env.getCtx());
- MPreference preference = query.setOnlyActiveRecords(true)
- .setApplyAccessFilter(true)
- .setParameters(windowId, adTabId+"|"+attribute, userId)
- .first();
- if (preference == null || preference.getAD_Preference_ID() <= 0) {
- preference = new MPreference(Env.getCtx(), 0, null);
- preference.setAD_Window_ID(windowId);
- preference.set_ValueOfColumn("AD_User_ID", userId); // required set_Value for System=0 user
- preference.setAttribute(adTabId+"|"+attribute);
- }
- preference.setValue(value);
- preference.saveEx();
- //update current context
- Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|"+attribute, value);
- }
- }
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTreePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTreePanel.java
index 035ee11515..5a7f9d6b16 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTreePanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTreePanel.java
@@ -19,6 +19,7 @@ import org.adempiere.webui.component.SimpleTreeModel;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.panel.TreeSearchPanel;
import org.adempiere.webui.util.TreeUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
@@ -83,13 +84,13 @@ public class ADTreePanel extends Panel implements EventListener
private void init()
{
setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "treepanel");
- this.setWidth("100%");
- this.setHeight("100%");
+ ZKUpdateUtil.setWidth(this, "100%");
+ ZKUpdateUtil.setHeight(this, "100%");
tree = new Tree();
tree.setMultiple(false);
- tree.setWidth("100%");
- tree.setVflex(true);
+ ZKUpdateUtil.setWidth(tree, "100%");
+ ZKUpdateUtil.setVflex(tree, true);
tree.setPageSize(-1); // Due to bug in the new paging functionality
tree.setStyle("border: none");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowContent.java
index f4376f8a63..8165f55ed2 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowContent.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowContent.java
@@ -33,6 +33,7 @@ import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.panel.ITabOnCloseHandler;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger;
import org.zkoss.zk.au.out.AuScript;
@@ -90,7 +91,7 @@ public class ADWindowContent extends AbstractADWindowContent
Div div = new Div();
div.setStyle("height: 100%; width: 100%");
north.appendChild(div);
- north.setVflex("0");
+ ZKUpdateUtil.setVflex(north, "0");
toolbar.setParent(div);
toolbar.setWindowNo(getWindowNo());
breadCrumb = new BreadCrumb(getWindowNo());
@@ -143,8 +144,8 @@ public class ADWindowContent extends AbstractADWindowContent
contentArea = new Div();
contentArea.setParent(layout);
- contentArea.setVflex("1");
- contentArea.setHflex("1");
+ ZKUpdateUtil.setVflex(contentArea, "1");
+ ZKUpdateUtil.setHflex(contentArea, "1");
contentArea.setStyle("overflow: auto;");
adTabbox.createPart(contentArea);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java
index d45793a28d..637da5c865 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java
@@ -34,6 +34,7 @@ import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.event.ToolbarListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MRole;
@@ -264,7 +265,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener
configureKeyMap();
- setWidth("100%");
+ ZKUpdateUtil.setWidth(this, "100%");
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java
index f576621a09..979bae9f83 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java
@@ -70,6 +70,7 @@ import org.adempiere.webui.panel.action.ReportAction;
import org.adempiere.webui.part.AbstractUIPart;
import org.adempiere.webui.part.ITabOnSelectHandler;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.CustomizeGridViewDialog;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.FindWindow;
@@ -752,8 +753,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
findWindow.setTitle(null);
findWindow.setBorder("none");
findWindow.setStyle("position: absolute; border-bottom: 2px solid #484848; padding: 2px; background-color: #fff;");
- findWindow.setWidth("100%");
- findWindow.setHeight("60%");
+ ZKUpdateUtil.setWidth(findWindow, "100%");
+ ZKUpdateUtil.setHeight(findWindow, "60%");
findWindow.setZindex(1000);
findWindow.setSizable(false);
findWindow.setContentStyle("background-color: #fff; width: 99%; margin: auto;");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java
index d5fb79fa6d..a13afca44b 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java
@@ -29,6 +29,7 @@ import org.adempiere.webui.component.ZkCssHelper;
import org.adempiere.webui.event.ToolbarListener;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WRecordInfo;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.MRole;
@@ -96,7 +97,7 @@ public class BreadCrumb extends Div implements EventListener {
layout.setPack("start");
layout.setAlign("center");
this.appendChild(layout);
- layout.setHeight("100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
layout.setStyle("float: left");
this.setVisible(false);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java
index fccf1fea02..d11d81c5b5 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java
@@ -27,6 +27,7 @@ import java.util.logging.Level;
import org.adempiere.util.Callback;
import org.adempiere.webui.component.ADTabListModel;
import org.adempiere.webui.component.ADTabListModel.ADTabLabel;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener;
@@ -257,8 +258,8 @@ public class CompositeADTabbox extends AbstractADTabbox
protected Component doCreatePart(Component parent)
{
layout = new Vlayout();
- layout.setHeight("100%");
- layout.setWidth("100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
layout.setStyle("position: relative");
if (parent != null) {
layout.setParent(parent);
@@ -408,7 +409,7 @@ public class CompositeADTabbox extends AbstractADTabbox
headerTab.setDetailPane(createDetailPane());
} else
tabPanel.setVisible(false);
- headerTab.getDetailPane().setHflex("1");
+ ZKUpdateUtil.setHflex(headerTab.getDetailPane(), "1");
headerTab.getDetailPane().addADTabpanel(tabPanel, tabLabel);
tabPanel.setDetailPaneMode(true);
headerTab.getDetailPane().setVflex("true");
@@ -418,8 +419,8 @@ public class CompositeADTabbox extends AbstractADTabbox
headerTab.getDetailPane().setVflex("true");
}
HtmlBasedComponent htmlComponent = (HtmlBasedComponent) tabPanel;
- htmlComponent.setVflex("1");
- htmlComponent.setWidth("100%");
+ ZKUpdateUtil.setVflex(htmlComponent, "1");
+ ZKUpdateUtil.setWidth(htmlComponent, "100%");
tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel));
}
@@ -544,7 +545,7 @@ public class CompositeADTabbox extends AbstractADTabbox
}
detailPane.setAttribute("detailpane.tablist", list);
- detailPane.setVflex("true");
+ ZKUpdateUtil.setVflex(detailPane, "true");
if (headerTab.getDetailPane() == null) {
headerTab.setDetailPane(detailPane);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java
index 81670707e8..06b63068ed 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java
@@ -23,6 +23,7 @@ import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MToolBarButton;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@@ -126,7 +127,7 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
});
tabbox.setSclass("adwindow-detailpane-tabbox");
tabbox.setTabscroll(true);
- tabbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(tabbox, "100%");
createPopup();
@@ -264,7 +265,7 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
Tabpanels tabpanels = tabbox.getTabpanels();
if (tabpanels == null) {
tabpanels = new Tabpanels();
- tabpanels.setWidth("100%");
+ ZKUpdateUtil.setWidth(tabpanels, "100%");
tabbox.appendChild(tabpanels);
}
Tabpanel tp = new Tabpanel();
@@ -396,7 +397,7 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
toolbar.appendChild(messageContainer);
toolbar.setSclass("adwindow-detailpane-toolbar");
- toolbar.setVflex("0");
+ ZKUpdateUtil.setVflex(toolbar, "0");
messageContainers.put(tabLabel.AD_Tab_ID, messageContainer);
tabPanel.setAttribute("AD_Tab_ID", tabLabel.AD_Tab_ID);
@@ -600,7 +601,7 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
private void createPopup() {
msgPopupCnt = new Div();
- msgPopupCnt.setVflex("1");
+ ZKUpdateUtil.setVflex(msgPopupCnt, "1");
msgPopup = new Window();
@@ -609,7 +610,7 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
msgPopup.setClosable(true);
msgPopup.setSizable(true);
msgPopup.setContentStyle("overflow: auto");
- msgPopup.setWidth("500px");
+ ZKUpdateUtil.setWidth(msgPopup, "500px");
msgPopup.appendChild(msgPopupCnt);
msgPopup.setPage(SessionManager.getAppDesktop().getComponent().getPage());
msgPopup.setShadow(true);
@@ -638,8 +639,10 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
*/
@Override
public void setVflex(String flex) {
+ if (getHeight() != null)
+ setHeight(null);
super.setVflex(flex);
- tabbox.setVflex(flex);
+ ZKUpdateUtil.setVflex(tabbox, flex);
}
/**
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java
index d6ab2010d1..605ebc9161 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java
@@ -38,6 +38,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.panel.HelpController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.GridTabDataBinder;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.util.DisplayType;
@@ -513,7 +514,7 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt
}
}
div.setStyle(divStyle);
- div.setWidth("100%");
+ ZKUpdateUtil.setWidth(div, "100%");
div.setAttribute("columnName", gridPanelFields[i].getColumnName());
div.addEventListener(Events.ON_CLICK, rowListener);
div.addEventListener(Events.ON_DOUBLE_CLICK, rowListener);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java
index 8723226617..e9148b169f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java
@@ -34,6 +34,7 @@ import org.adempiere.webui.component.NumberBox;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.util.SortComparator;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.GridTable;
@@ -150,10 +151,10 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
setId("gridView");
createListbox();
- this.setHflex("1");
+ ZKUpdateUtil.setHflex(this, "1");
gridFooter = new Div();
- gridFooter.setVflex("0");
+ ZKUpdateUtil.setVflex(gridFooter, "0");
//default paging size
if (AEnv.isTablet())
@@ -175,7 +176,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
appendChild(listbox);
appendChild(gridFooter);
- this.setVflex("true");
+ ZKUpdateUtil.setVflex(this, "true");
setStyle(HEADER_GRID_STYLE);
gridFooter.setStyle(HEADER_GRID_STYLE);
@@ -187,8 +188,8 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
protected void createListbox() {
listbox = new Grid();
listbox.setSizedByContent(false);
- listbox.setVflex("1");
- listbox.setHflex("1");
+ ZKUpdateUtil.setVflex(listbox, "1");
+ ZKUpdateUtil.setHflex(listbox, "1");
listbox.setSclass("adtab-grid");
listbox.setEmptyMessage(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Processing")));
}
@@ -465,7 +466,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
}
org.zkoss.zul.Column selection = new Column();
- selection.setWidth("22px");
+ ZKUpdateUtil.setWidth(selection, "22px");
try{
selection.setSort("none");
} catch (Exception e) {}
@@ -477,7 +478,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
columns.appendChild(selection);
org.zkoss.zul.Column indicator = new Column();
- indicator.setWidth("22px");
+ ZKUpdateUtil.setWidth(indicator, "22px");
try {
indicator.setSort("none");
} catch (Exception e) {}
@@ -509,24 +510,24 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
column.setLabel(gridField[i].getHeader());
if (columnWidthMap != null && columnWidthMap.get(gridField[i].getAD_Field_ID()) != null && !columnWidthMap.get(gridField[i].getAD_Field_ID()).equals("")) {
- column.setWidth(columnWidthMap.get(gridField[i].getAD_Field_ID()));
+ ZKUpdateUtil.setWidth(column, columnWidthMap.get(gridField[i].getAD_Field_ID()));
} else {
if (gridField[i].getDisplayType()==DisplayType.YesNo) {
if (i > 0) {
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
} else {
int estimatedWidth=60;
int headerWidth = (gridField[i].getHeader().length()+2) * 8;
if (headerWidth > estimatedWidth)
estimatedWidth = headerWidth;
- column.setWidth(estimatedWidth+"px");
+ ZKUpdateUtil.setWidth(column, estimatedWidth+"px");
}
} else if (DisplayType.isNumeric(gridField[i].getDisplayType()) && "Line".equals(gridField[i].getColumnName())) {
//special treatment for line
if (i > 0)
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
else
- column.setWidth("60px");
+ ZKUpdateUtil.setWidth(column, "60px");
} else {
int estimatedWidth = 0;
if (DisplayType.isNumeric(gridField[i].getDisplayType()))
@@ -548,17 +549,17 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
if (DisplayType.isLookup(gridField[i].getDisplayType()))
{
if (headerWidth > MIN_COMBOBOX_WIDTH)
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
}
else if (DisplayType.isNumeric(gridField[i].getDisplayType()))
{
if (headerWidth > MIN_NUMERIC_COL_WIDTH)
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
}
else if (!DisplayType.isText(gridField[i].getDisplayType()))
{
if (headerWidth > MIN_COLUMN_WIDTH)
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
}
}
@@ -568,7 +569,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
estimatedWidth = MAX_COLUMN_WIDTH;
else if ( estimatedWidth < MIN_COLUMN_WIDTH)
estimatedWidth = MIN_COLUMN_WIDTH;
- column.setWidth(Integer.toString(estimatedWidth) + "px");
+ ZKUpdateUtil.setWidth(column, Integer.toString(estimatedWidth) + "px");
}
}
}
@@ -1164,7 +1165,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
Component firstChild = parent.getFirstChild();
if ( gridFooter.getParent() != firstChild ) {
firstChild.appendChild(gridFooter);
- gridFooter.setHflex("0");
+ ZKUpdateUtil.setHflex(gridFooter, "0");
gridFooter.setSclass("adwindow-detailpane-adtab-grid-south");
}
break;
@@ -1177,7 +1178,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi
else
{
if (gridFooter.getParent() != this) {
- gridFooter.setHflex("1");
+ ZKUpdateUtil.setHflex(gridFooter, "1");
gridFooter.setSclass("adtab-grid-south");
appendChild(gridFooter);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java
index b9d64b9dc7..af244390e7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java
@@ -6,6 +6,7 @@ package org.adempiere.webui.adwindow;
import java.util.List;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zul.Button;
import org.zkoss.zul.Vbox;
@@ -23,11 +24,11 @@ public class ProcessButtonPopup extends Window {
public void render(List buttons) {
setSclass("toolbar-popup-window process-buttons-popup");
//setWidth("250px");
- setHflex("min");
+ ZKUpdateUtil.setHflex(this, "min");
setBorder("normal");
Vbox vbox = new Vbox();
- vbox.setHflex("true");
+ ZKUpdateUtil.setHflex(vbox, "true");
appendChild(vbox);
vbox.setSclass("toolbar-popup-window-cnt");
vbox.setAlign("stretch");
@@ -36,7 +37,7 @@ public class ProcessButtonPopup extends Window {
if (button.getPage() != null) {
button.detach();
}
- button.setHflex("1");
+ ZKUpdateUtil.setHflex(button, "1");
vbox.appendChild(button);
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java
index 43187e8b8e..4ab530f601 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java
@@ -23,6 +23,7 @@ import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.process.ProcessInfoLog;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.ui.Component;
@@ -274,7 +275,7 @@ public class StatusBar extends Panel implements EventListener
private void createPopup() {
msgPopupCnt = new Div();
- msgPopupCnt.setVflex("1");
+ ZKUpdateUtil.setVflex(msgPopupCnt, "1");
msgPopup = new Window();
@@ -282,7 +283,7 @@ public class StatusBar extends Panel implements EventListener
msgPopup.setClosable(true);
msgPopup.setSizable(true);
msgPopup.setContentStyle("overflow: auto");
- msgPopup.setWidth("500px");
+ ZKUpdateUtil.setWidth(msgPopup, "500px");
msgPopup.appendChild(msgPopupCnt);
msgPopup.setShadow(true);
msgPopupCaption = new Caption();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java
index be9ebacebb..b110131e6a 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java
@@ -48,6 +48,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.process.WProcessInfo;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.compiere.Adempiere;
@@ -274,7 +275,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
topParameterLayout = new Vlayout();
topParameterLayout.setSclass("top-parameter-layout");
mainParameterLayout.appendChild(topParameterLayout);
- topParameterLayout.setVflex("true");
+ ZKUpdateUtil.setVflex(topParameterLayout, "true");
// button and advanced control
bottomParameterLayout = new Vlayout();
bottomParameterLayout.setSclass("bottom-parameter-layout");
@@ -324,10 +325,10 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
Columns columns = new Columns();
grid.appendChild(columns);
Column col = new Column();
- col.setWidth("30%");
+ ZKUpdateUtil.setWidth(col, "30%");
columns.appendChild(col);
col = new Column();
- col.setWidth("70%");
+ ZKUpdateUtil.setWidth(col, "70%");
columns.appendChild(col);
Rows rows = new Rows();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java
index 1005624d51..263efc41bd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java
@@ -22,6 +22,7 @@ import java.util.Comparator;
import java.util.List;
import org.adempiere.webui.component.Label;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.I_AD_SearchDefinition;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@@ -69,8 +70,8 @@ public class DocumentSearchController implements EventListener{
public void create(Component parent) {
layout = new Vlayout();
layout.setStyle("padding: 3px;");
- layout.setWidth("100%");
- layout.setVflex("true");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setVflex(layout, "true");
parent.appendChild(layout);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java
index efec1679f3..409dea2ace 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java
@@ -36,6 +36,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.FeedbackManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.apache.commons.io.IOUtils;
import org.compiere.model.MAttachment;
@@ -89,7 +90,7 @@ public class FeedbackRequestWindow extends Window implements EventListener {
bandbox = new Bandbox();
bandbox.setSclass("global-search-box");
appendChild(bandbox);
- bandbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(bandbox, "100%");
bandbox.setAutodrop(true);
bandbox.addEventListener(Events.ON_CHANGING, this);
bandbox.addEventListener(Events.ON_CHANGE, this);
@@ -83,11 +84,11 @@ public class GlobalSearch extends Div implements EventListener {
bandbox.addEventListener(Events.ON_CTRL_KEY, this);
Bandpopup popup = new Bandpopup();
- popup.setHeight("500px");
+ ZKUpdateUtil.setHeight(popup, "500px");
bandbox.appendChild(popup);
tabbox = new Tabbox();
- tabbox.setVflex("true");
+ ZKUpdateUtil.setVflex(tabbox, "true");
tabbox.addEventListener(Events.ON_SELECT, this);
Tabs tabs = new Tabs();
tabbox.appendChild(tabs);
@@ -97,7 +98,7 @@ public class GlobalSearch extends Div implements EventListener {
Tabpanels tabPanels = new Tabpanels();
tabbox.appendChild(tabPanels);
Tabpanel tabPanel = new Tabpanel();
- tabPanel.setVflex("true");
+ ZKUpdateUtil.setVflex(tabPanel, "true");
tabPanel.setSclass("global-search-tabpanel");
tabPanels.appendChild(tabPanel);
popup.appendChild(tabbox);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/HelpWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/HelpWindow.java
index 5ce3f3fe79..1d732cf7dd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/HelpWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/HelpWindow.java
@@ -19,6 +19,7 @@ import java.util.Calendar;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.h3;
import org.apache.ecs.xhtml.h4;
@@ -52,15 +53,15 @@ public class HelpWindow extends Window {
this.setTitle(Msg.getMsg(Env.getCtx(), "Help"));
this.gridWindow = gridWindow;
- this.setWidth("99%");
- this.setHeight("100%");
+ ZKUpdateUtil.setWidth(this, "99%");
+ ZKUpdateUtil.setHeight(this, "100%");
this.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
this.setSclass("help-window");
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
- borderlayout.setHflex("1");
- borderlayout.setVflex("1");
+ ZKUpdateUtil.setHflex(borderlayout, "1");
+ ZKUpdateUtil.setVflex(borderlayout, "1");
Center centerPane = new Center();
centerPane.setAutoscroll(true);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java
index 9b4445dba5..f25fd41c11 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java
@@ -24,6 +24,7 @@ import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.TreeItemAction;
import org.adempiere.webui.util.TreeNodeAction;
import org.adempiere.webui.util.TreeUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MTreeNode;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@@ -178,14 +179,14 @@ public class MenuSearchController implements EventListener{
refreshModel();
layout = new Vlayout();
- layout.setHeight("100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
parent.appendChild(layout);
listbox = new Listbox();
listbox.setEmptyMessage(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "FindZeroRecords")));
listbox.setStyle("border: none");
- listbox.setWidth("100%");
- listbox.setVflex("true");
+ ZKUpdateUtil.setWidth(listbox, "100%");
+ ZKUpdateUtil.setVflex(listbox, "true");
layout.appendChild(listbox);
listbox.setItemRenderer(new MenuItemRenderer());
listbox.addEventListener(Events.ON_SELECT, this);
@@ -195,7 +196,7 @@ public class MenuSearchController implements EventListener{
Listheader listheader = new Listheader();
listhead.appendChild(listheader);
listheader = new Listheader();
- listheader.setWidth("32px");
+ ZKUpdateUtil.setWidth(listheader, "32px");
listhead.appendChild(listheader);
layout.addEventListener(ON_SEARCH_ECHO, this);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java
index e7a67baf4f..5f7968ce49 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java
@@ -37,6 +37,7 @@ import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.process.WProcessInfo;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.model.X_AD_CtxHelp;
@@ -340,7 +341,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
if (resultPanelLayout == null){
resultPanelLayout = new Vlayout();
resultPanelLayout.setSclass("result-parameter-layout");
- resultPanelLayout.setVflex("true");
+ ZKUpdateUtil.setVflex(resultPanelLayout, "true");
// reference for update late
messageResultContent = setHeadMessage(resultPanelLayout, null);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java
index 3834aafb63..878146d515 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java
@@ -41,6 +41,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.IProcessParameter;
import org.compiere.model.GridField;
@@ -107,10 +108,10 @@ public class ProcessParameterPanel extends Panel implements
Columns columns = new Columns();
centerPanel.appendChild(columns);
Column col = new Column();
- col.setWidth("30%");
+ ZKUpdateUtil.setWidth(col, "30%");
columns.appendChild(col);
col = new Column();
- col.setWidth("70%");
+ ZKUpdateUtil.setWidth(col, "70%");
columns.appendChild(col);
}
@@ -336,7 +337,7 @@ public class ProcessParameterPanel extends Panel implements
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
editor2.setProcessParameter(true);
//override attribute
- editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
+ editor2.getComponent().setClientAttribute("columnName", mField2.getColumnName()+"_To");
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
// New Field value to be updated to editor
mField2.addPropertyChangeListener(editor2);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java
index 9151569786..e6f5b2bed1 100755
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java
@@ -48,6 +48,7 @@ import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Allocation;
import org.compiere.model.MAllocationHdr;
@@ -155,8 +156,8 @@ public class WAllocation extends Allocation
{
//
form.appendChild(mainLayout);
- mainLayout.setWidth("99%");
- mainLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(mainLayout, "99%");
+ ZKUpdateUtil.setHeight(mainLayout, "100%");
dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date"));
autoWriteOff.setSelected(false);
autoWriteOff.setText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", true));
@@ -197,11 +198,11 @@ public class WAllocation extends Allocation
Rows rows = null;
Row row = null;
- parameterLayout.setWidth("80%");
+ ZKUpdateUtil.setWidth(parameterLayout, "80%");
rows = parameterLayout.newRows();
row = rows.newRow();
row.appendCellChild(bpartnerLabel.rightAlign());
- bpartnerSearch.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(bpartnerSearch.getComponent(), "true");
row.appendCellChild(bpartnerSearch.getComponent(),2);
bpartnerSearch.showMenu();
Hbox box = new Hbox();
@@ -209,13 +210,13 @@ public class WAllocation extends Allocation
box.appendChild(dateField.getComponent());
row.appendCellChild(box);
row.appendCellChild(organizationLabel.rightAlign());
- organizationPick.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(organizationPick.getComponent(), "true");
row.appendCellChild(organizationPick.getComponent(),1);
organizationPick.showMenu();
row = rows.newRow();
row.appendCellChild(currencyLabel.rightAlign(),1);
- currencyPick.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(currencyPick.getComponent(), "true");
row.appendCellChild(currencyPick.getComponent(),1);
currencyPick.showMenu();
row.appendCellChild(multiCurrency,1);
@@ -228,37 +229,37 @@ public class WAllocation extends Allocation
south.appendChild(southPanel);
southPanel.appendChild(allocationPanel);
allocationPanel.appendChild(allocationLayout);
- allocationLayout.setHflex("min");
+ ZKUpdateUtil.setHflex(allocationLayout, "min");
rows = allocationLayout.newRows();
row = rows.newRow();
row.appendCellChild(differenceLabel.rightAlign());
row.appendCellChild(allocCurrencyLabel.rightAlign());
- differenceField.setHflex("true");
+ ZKUpdateUtil.setHflex(differenceField, "true");
row.appendCellChild(differenceField);
row.appendCellChild(chargeLabel.rightAlign());
- chargePick.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(chargePick.getComponent(), "true");
row.appendCellChild(chargePick.getComponent());
row.appendCellChild(DocTypeLabel.rightAlign());
chargePick.showMenu();
- DocTypePick.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(DocTypePick.getComponent(), "true");
row.appendCellChild(DocTypePick.getComponent());
DocTypePick.showMenu();
- allocateButton.setHflex("true");
+ ZKUpdateUtil.setHflex(allocateButton, "true");
row.appendCellChild(allocateButton);
row.appendCellChild(refreshButton);
paymentPanel.appendChild(paymentLayout);
- paymentPanel.setWidth("100%");
- paymentPanel.setHeight("100%");
- paymentLayout.setWidth("100%");
- paymentLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(paymentPanel, "100%");
+ ZKUpdateUtil.setHeight(paymentPanel, "100%");
+ ZKUpdateUtil.setWidth(paymentLayout, "100%");
+ ZKUpdateUtil.setHeight(paymentLayout, "100%");
paymentLayout.setStyle("border: none");
invoicePanel.appendChild(invoiceLayout);
- invoicePanel.setWidth("100%");
- invoicePanel.setHeight("100%");
- invoiceLayout.setWidth("100%");
- invoiceLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(invoicePanel, "100%");
+ ZKUpdateUtil.setHeight(invoicePanel, "100%");
+ ZKUpdateUtil.setWidth(invoiceLayout, "100%");
+ ZKUpdateUtil.setHeight(invoiceLayout, "100%");
invoiceLayout.setStyle("border: none");
north = new North();
@@ -272,8 +273,8 @@ public class WAllocation extends Allocation
Center center = new Center();
paymentLayout.appendChild(center);
center.appendChild(paymentTable);
- paymentTable.setWidth("99%");
- paymentTable.setHeight("99%");
+ ZKUpdateUtil.setWidth(paymentTable, "99%");
+ //ZKUpdateUtil.setHeight(paymentTable, "99%");
center.setStyle("border: none");
north = new North();
@@ -287,23 +288,23 @@ public class WAllocation extends Allocation
center = new Center();
invoiceLayout.appendChild(center);
center.appendChild(invoiceTable);
- invoiceTable.setWidth("99%");
- invoiceTable.setHeight("99%");
+ ZKUpdateUtil.setWidth(invoiceTable, "99%");
+ //ZKUpdateUtil.setHeight(invoiceTable, "99%");
center.setStyle("border: none");
//
center = new Center();
mainLayout.appendChild(center);
center.appendChild(infoPanel);
- infoPanel.setHflex("1");
- infoPanel.setVflex("1");
+ ZKUpdateUtil.setHflex(infoPanel, "1");
+ ZKUpdateUtil.setVflex(infoPanel, "1");
infoPanel.setStyle("border: none");
- infoPanel.setWidth("100%");
- infoPanel.setHeight("100%");
+ ZKUpdateUtil.setWidth(infoPanel, "100%");
+ ZKUpdateUtil.setHeight(infoPanel, "100%");
north = new North();
north.setStyle("border: none");
- north.setHeight("49%");
+ ZKUpdateUtil.setHeight(north, "49%");
infoPanel.appendChild(north);
north.appendChild(paymentPanel);
north.setSplittable(true);
@@ -311,8 +312,8 @@ public class WAllocation extends Allocation
center.setStyle("border: none");
infoPanel.appendChild(center);
center.appendChild(invoicePanel);
- invoicePanel.setHflex("1");
- invoicePanel.setVflex("1");
+ ZKUpdateUtil.setHflex(invoicePanel, "1");
+ ZKUpdateUtil.setVflex(invoicePanel, "1");
} // jbInit
/**
@@ -343,7 +344,7 @@ public class WAllocation extends Allocation
// Translation
statusBar.appendChild(new Label(Msg.getMsg(Env.getCtx(), "AllocateStatus")));
- statusBar.setVflex("min");
+ ZKUpdateUtil.setVflex(statusBar, "min");
// Date set to Login Date
Calendar cal = Calendar.getInstance();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java
index b66df115a6..67e88befad 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java
@@ -53,6 +53,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Archive;
import org.compiere.model.MArchive;
@@ -198,8 +199,8 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
private void jbInit() throws Exception
{
- tabbox.setWidth("100%");
- tabbox.setHeight("90%");
+ ZKUpdateUtil.setWidth(tabbox, "100%");
+ ZKUpdateUtil.setHeight(tabbox, "90%");
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
tabbox.addEventListener(Events.ON_SELECT, this);
@@ -251,17 +252,17 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
gridQuery.appendChild(columns);
Column column = new Column();
- column.setWidth("35%");
+ ZKUpdateUtil.setWidth(column, "35%");
column.setAlign("right");
columns.appendChild(column);
column = new Column();
- column.setWidth("40%");
+ ZKUpdateUtil.setWidth(column, "40%");
column.setAlign("left");
columns.appendChild(column);
column = new Column();
- column.setWidth("25%");
+ ZKUpdateUtil.setWidth(column, "25%");
column.setAlign("left");
columns.appendChild(column);
@@ -278,49 +279,49 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
rows.appendChild(row);
row.appendChild(processLabel);
row.appendChild(processField);
- processField.setHflex("1");
+ ZKUpdateUtil.setHflex(processField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(bPartnerLabel);
row.appendChild(bPartnerField.getComponent());
- bPartnerField.getComponent().setHflex("1");
+ ZKUpdateUtil.setHflex(bPartnerField.getComponent(), "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(tableLabel);
row.appendChild(tableField);
- tableField.setHflex("1");
+ ZKUpdateUtil.setHflex(tableField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(nameQLabel);
row.appendChild(nameQField);
- nameQField.setHflex("1");
+ ZKUpdateUtil.setHflex(nameQField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(descriptionQLabel);
row.appendChild(descriptionQField);
- descriptionQField.setHflex("1");
+ ZKUpdateUtil.setHflex(descriptionQField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(helpQLabel);
row.appendChild(helpQField);
- helpQField.setHflex("1");
+ ZKUpdateUtil.setHflex(helpQField, "1");
row.appendChild(new Space());
row = new Row();
rows.appendChild(row);
row.appendChild(createdByQLabel);
row.appendChild(createdByQField);
- createdByQField.setHflex("1");
+ ZKUpdateUtil.setHflex(createdByQField, "1");
row.appendChild(new Space());
row = new Row();
@@ -350,17 +351,17 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
gridView.appendChild(columns);
Column column = new Column();
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
column.setAlign("left");
columns.appendChild(column);
column = new Column();
- column.setHflex("1");
+ ZKUpdateUtil.setHflex(column, "1");
column.setAlign("center");
columns.appendChild(column);
column = new Column();
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
column.setAlign("right");
columns.appendChild(column);
@@ -376,12 +377,12 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
row = new Row();
rows.appendChild(row);
row.appendCellChild(createdByLabel, 3);
- createdByLabel.setHflex("1");
+ ZKUpdateUtil.setHflex(createdByLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(createdByField, 3);
- createdByField.setHflex("1");
+ ZKUpdateUtil.setHflex(createdByField, "1");
row = new Row();
rows.appendChild(row);
@@ -395,36 +396,36 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
row = new Row();
rows.appendChild(row);
row.appendCellChild(nameLabel, 3);
- nameLabel.setHflex("1");
+ ZKUpdateUtil.setHflex(nameLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(nameField, 3);
- nameField.setHflex("1");
+ ZKUpdateUtil.setHflex(nameField, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(descriptionLabel, 3);
- descriptionLabel.setHflex("1");
+ ZKUpdateUtil.setHflex(descriptionLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(descriptionField, 3);
descriptionField.setRows(3);
- descriptionField.setHeight("100%");
- descriptionField.setHflex("1");
+ ZKUpdateUtil.setHeight(descriptionField, "100%");
+ ZKUpdateUtil.setHflex(descriptionField, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(helpLabel, 3);
- helpLabel.setHflex("1");
+ ZKUpdateUtil.setHflex(helpLabel, "1");
row = new Row();
rows.appendChild(row);
row.appendCellChild(helpField, 3);
helpField.setRows(3);
- helpField.setHeight("100%");
- helpField.setHflex("1");
+ ZKUpdateUtil.setHeight(helpField, "100%");
+ ZKUpdateUtil.setHflex(helpField, "1");
row = new Row();
rows.appendChild(row);
@@ -448,14 +449,14 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
Tabpanel tabViewPanel = new Tabpanel();
Hbox boxViewSeparator = new Hbox();
- boxViewSeparator.setWidth("100%");
- boxViewSeparator.setHeight("100%");
+ ZKUpdateUtil.setWidth(boxViewSeparator, "100%");
+ ZKUpdateUtil.setHeight(boxViewSeparator, "100%");
cell = new Cell();
- cell.setWidth("70%");
+ ZKUpdateUtil.setWidth(cell, "70%");
cell.appendChild(iframe);
boxViewSeparator.appendChild(cell);
cell = new Cell();
- cell.setWidth("30%");
+ ZKUpdateUtil.setWidth(cell, "30%");
cell.appendChild(gridView);
boxViewSeparator.appendChild(cell);
tabViewPanel.appendChild(boxViewSeparator);
@@ -469,12 +470,12 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
iframe.setId("reportFrame");
int height = Double.valueOf(SessionManager.getAppDesktop().getClientInfo().desktopHeight * 0.8).intValue();
height = height - 50;
- iframe.setHeight(height + "px");
- iframe.setWidth("100%");
+ ZKUpdateUtil.setHeight(iframe, height + "px");
+ ZKUpdateUtil.setWidth(iframe, "100%");
//iframe.setAutohide(true);
- form.setWidth("100%");
- form.setHeight("100%");
+ ZKUpdateUtil.setWidth(form, "100%");
+ ZKUpdateUtil.setHeight(form, "100%");
form.appendChild(tabbox);
form.appendChild(confirmPanel);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java
index 3e7aabed36..cd8d8bdf79 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAttributeGrid.java
@@ -37,6 +37,7 @@ import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.panel.ADForm;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MAttribute;
import org.compiere.model.MAttributeValue;
@@ -101,20 +102,20 @@ public class WAttributeGrid extends ADForm implements EventListener
modeCombo.appendItem(MODES[i], MODES[i]);
modeCombo.setMold("select");
- tabbox.setWidth("100%");
- tabbox.setHeight("85%");
+ ZKUpdateUtil.setWidth(tabbox, "100%");
+ ZKUpdateUtil.setHeight(tabbox, "85%");
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
tabbox.addEventListener(Events.ON_SELECT, this);
Grid gridSelection = new Grid();
- gridSelection.setWidth("500px");
+ ZKUpdateUtil.setWidth(gridSelection, "500px");
gridSelection.setStyle("margin:0; padding:0;");
gridSelection.makeNoStrip();
gridSelection.setOddRowSclass("even");
- gridView.setWidth("100%");
- gridView.setHeight("100%");
+ ZKUpdateUtil.setWidth(gridView, "100%");
+ ZKUpdateUtil.setHeight(gridView, "100%");
gridView.setSizedByContent(false);
Rows rows = new Rows();
@@ -127,7 +128,7 @@ public class WAttributeGrid extends ADForm implements EventListener
div.appendChild(attributeLabel1);
row.appendCellChild(div, 1);
row.appendCellChild(attributeCombo1, 2);
- attributeCombo1.setWidth("100%");
+ ZKUpdateUtil.setWidth(attributeCombo1, "100%");
row = new Row();
rows.appendChild(row);
@@ -136,7 +137,7 @@ public class WAttributeGrid extends ADForm implements EventListener
div.appendChild(attributeLabel2);
row.appendCellChild(div, 1);
row.appendCellChild(attributeCombo2, 2);
- attributeCombo2.setWidth("100%");
+ ZKUpdateUtil.setWidth(attributeCombo2, "100%");
row = new Row();
rows.appendChild(row);
@@ -145,7 +146,7 @@ public class WAttributeGrid extends ADForm implements EventListener
div.appendChild(labelPriceList);
row.appendCellChild(div, 1);
row.appendCellChild(pickPriceList, 2);
- pickPriceList.setWidth("100%");
+ ZKUpdateUtil.setWidth(pickPriceList, "100%");
row = new Row();
rows.appendChild(row);
@@ -154,7 +155,7 @@ public class WAttributeGrid extends ADForm implements EventListener
div.appendChild(labelWarehouse);
row.appendCellChild(div, 1);
row.appendCellChild(pickWarehouse, 2);
- pickWarehouse.setWidth("100%");
+ ZKUpdateUtil.setWidth(pickWarehouse, "100%");
div = new Div();
div.setStyle("text-align: center;");
@@ -184,8 +185,8 @@ public class WAttributeGrid extends ADForm implements EventListener
tabpanels.appendChild(tabAttributeGridPanel);
tabs.appendChild(tabAttributeGrid);
- this.setWidth("100%");
- this.setHeight("100%");
+ ZKUpdateUtil.setWidth(this, "100%");
+ ZKUpdateUtil.setHeight(this, "100%");
this.appendChild(tabbox);
tabbox.addEventListener(Events.ON_SELECT, this);
this.appendChild(confirmPanel);
@@ -456,7 +457,7 @@ public class WAttributeGrid extends ADForm implements EventListener
if (rowIndex == 0 && colIndex == 0)
{
Vbox descr = new Vbox();
- descr.setWidth("100%");
+ ZKUpdateUtil.setWidth(descr, "100%");
if (xValues != null)
{
Div div = new Div();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java
index fefcd820b1..bddaba02ff 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java
@@ -41,6 +41,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceLine;
@@ -236,7 +237,7 @@ public class WBOMDrop extends ADForm implements EventListener
productField.addEventListener(Events.ON_SELECT, this);
productQty.addEventListener(Events.ON_CHANGE, this);
- productField.setWidth("99%");
+ ZKUpdateUtil.setWidth(productField, "99%");
boxProductQty.appendChild(lblProduct.rightAlign());
boxProductQty.appendChild(productField);
boxProductQty.appendChild(lblQty.rightAlign());
@@ -248,7 +249,7 @@ public class WBOMDrop extends ADForm implements EventListener
orderField.setRows(1);
orderField.setMold("select");
- orderField.setWidth("99%");
+ ZKUpdateUtil.setWidth(orderField, "99%");
for (int i = 0; i < keyNamePair.length; i++)
{
@@ -271,7 +272,7 @@ public class WBOMDrop extends ADForm implements EventListener
{
invoiceField.setRows(1);
invoiceField.setMold("select");
- invoiceField.setWidth("99%");
+ ZKUpdateUtil.setWidth(invoiceField, "99%");
keyNamePair = getInvoices();
@@ -296,7 +297,7 @@ public class WBOMDrop extends ADForm implements EventListener
{
projectField.setRows(1);
projectField.setMold("select");
- projectField.setWidth("99%");
+ ZKUpdateUtil.setWidth(projectField, "99%");
keyNamePair = getProjects();
@@ -626,7 +627,7 @@ public class WBOMDrop extends ADForm implements EventListener
private Div createDivPanel (int with) {
Div divPanel = new Div ();
- divPanel.setWidth(String.format("%1$spx", with));
+ ZKUpdateUtil.setWidth(divPanel, String.format("%1$spx", with));
divPanel.setStyle("padding-right:0;padding-left:0");
return divPanel;
}
@@ -634,14 +635,14 @@ public class WBOMDrop extends ADForm implements EventListener
private Hlayout createHlayoutPanel (String width) {
Hlayout layout = new Hlayout();
layout.setSpacing("0");
- layout.setWidth(width);
+ ZKUpdateUtil.setWidth(layout, width);
return layout;
}
private Vlayout createVlayoutPanel (String width) {
Vlayout layout = new Vlayout();
layout.setSpacing("0");
- layout.setWidth(width);
+ ZKUpdateUtil.setWidth(layout, width);
return layout;
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java
index 086514f47e..f58fb87066 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java
@@ -39,6 +39,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Charge;
import org.compiere.util.CLogger;
@@ -251,8 +252,8 @@ public class WCharge extends Charge implements IFormController, EventListener, WTa
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
- setWidth("750px");
- setHeight("550px");
+ ZKUpdateUtil.setWidth(this,"750px");
+ ZKUpdateUtil.setHeight(this, "550px");
setSizable(true);
setBorder("normal");
- contentPane.setWidth("100%");
- contentPane.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentPane, "100%");
+ ZKUpdateUtil.setHeight(contentPane, "100%");
}
public void onEvent(Event e) throws Exception
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java
index 185b87258e..2ac307e58f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java
@@ -32,12 +32,15 @@ import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.CreateFromInvoice;
import org.compiere.model.GridTab;
import org.compiere.model.MDocType;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
+
import static org.compiere.model.SystemIDs.*;
+
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@@ -133,8 +136,8 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
Borderlayout parameterLayout = new Borderlayout();
- parameterLayout.setHeight("110px");
- parameterLayout.setWidth("100%");
+ ZKUpdateUtil.setHeight(parameterLayout, "110px");
+ ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@@ -152,14 +155,14 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
if (bPartnerField != null)
row.appendChild(bPartnerField.getComponent());
row.appendChild(orderLabel.rightAlign());
- orderField.setHflex("1");
+ ZKUpdateUtil.setHflex(orderField, "1");
row.appendChild(orderField);
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(shipmentLabel.rightAlign());
- shipmentField.setHflex("1");
+ ZKUpdateUtil.setHflex(shipmentField, "1");
row.appendChild(shipmentField);
// Add RMA document selection to panel
@@ -167,7 +170,7 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(rmaLabel.rightAlign());
- rmaField.setHflex("1");
+ ZKUpdateUtil.setHflex(rmaField, "1");
row.appendChild(rmaField);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java
index 0f86f8f7ce..fc11fa07c7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java
@@ -28,11 +28,14 @@ import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.CreateFromRMA;
import org.compiere.model.GridTab;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
+
import static org.compiere.model.SystemIDs.*;
+
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@@ -103,8 +106,8 @@ public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListen
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
Borderlayout parameterLayout = new Borderlayout();
- parameterLayout.setHeight("110px");
- parameterLayout.setWidth("100%");
+ ZKUpdateUtil.setHeight(parameterLayout, "110px");
+ ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java
index 58aea64731..428a232c55 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java
@@ -38,13 +38,16 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.grid.CreateFromShipment;
import org.compiere.model.GridTab;
import org.compiere.model.MLocatorLookup;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MProduct;
+
import static org.compiere.model.SystemIDs.*;
+
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@@ -154,8 +157,8 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
upcLabel.setText(Msg.getElement(Env.getCtx(), "UPC", false));
Vlayout vlayout = new Vlayout();
- vlayout.setVflex("1");
- vlayout.setWidth("100%");
+ ZKUpdateUtil.setVflex(vlayout, "1");
+ ZKUpdateUtil.setWidth(vlayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(vlayout);
@@ -172,7 +175,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
if (! isRMAWindow) {
row.appendChild(orderLabel.rightAlign());
row.appendChild(orderField);
- orderField.setHflex("1");
+ ZKUpdateUtil.setHflex(orderField, "1");
}
row = rows.newRow();
@@ -181,7 +184,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
if (! isRMAWindow) {
row.appendChild(invoiceLabel.rightAlign());
row.appendChild(invoiceField);
- invoiceField.setHflex("1");
+ ZKUpdateUtil.setHflex(invoiceField, "1");
}
row = rows.newRow();
@@ -195,7 +198,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
// Add RMA document selection to panel
row.appendChild(rmaLabel.rightAlign());
row.appendChild(rmaField);
- rmaField.setHflex("1");
+ ZKUpdateUtil.setHflex(rmaField, "1");
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java
index 1c9709d1a8..09a37de727 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java
@@ -37,6 +37,7 @@ import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.CreateFromStatement;
import org.compiere.model.GridTab;
@@ -191,8 +192,8 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
Borderlayout parameterLayout = new Borderlayout();
- parameterLayout.setHeight("130px");
- parameterLayout.setWidth("100%");
+ ZKUpdateUtil.setHeight(parameterLayout, "130px");
+ ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = window.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@@ -209,14 +210,14 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event
Column column = new Column();
columns.appendChild(column);
column = new Column();
- column.setWidth("15%");
+ ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
- column.setWidth("35%");
+ ZKUpdateUtil.setWidth(column, "35%");
column = new Column();
- column.setWidth("15%");
+ ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column = new Column();
- column.setWidth("35%");
+ ZKUpdateUtil.setWidth(column, "35%");
columns.appendChild(column);
Rows rows = (Rows) parameterBankLayout.newRows();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java
index e083c7f439..1ed359fc6f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromWindow.java
@@ -25,6 +25,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.StatusBarPanel;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.CreateFrom;
import org.compiere.util.Trx;
@@ -107,12 +108,12 @@ public class WCreateFromWindow extends Window implements EventListener, W
southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
- setWidth("750px");
- setHeight("550px");
+ ZKUpdateUtil.setWidth(this, "750px");
+ ZKUpdateUtil.setHeight(this, "550px");
setSizable(true);
setBorder("normal");
- contentPane.setWidth("100%");
- contentPane.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentPane, "100%");
+ ZKUpdateUtil.setHeight(contentPane, "100%");
}
public void onEvent(Event e) throws Exception
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java
index 46390cfb0e..0eb77462e6 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java
@@ -33,6 +33,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.FactReconcile;
import org.compiere.model.MClient;
import org.compiere.model.MColumn;
@@ -173,34 +174,34 @@ implements IFormController, EventListener, WTableModelListener, ValueChan
Rows rows = null;
Row row = null;
- parameterLayout.setWidth("90%");
+ ZKUpdateUtil.setWidth(parameterLayout, "90%");
rows = parameterLayout.newRows();
row = rows.newRow();
row.appendCellChild(labelAcctSchema.rightAlign());
- fieldAcctSchema.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldAcctSchema.getComponent(), "true");
row.appendCellChild(fieldAcctSchema.getComponent(), 2);
row.appendCellChild(labelOrg.rightAlign());
- fieldOrg.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldOrg.getComponent(), "true");
row.appendCellChild(fieldOrg.getComponent(), 2);
row = rows.newRow();
row.appendCellChild(labelAccount.rightAlign());
- fieldAccount.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldAccount.getComponent(), "true");
row.appendCellChild(fieldAccount.getComponent(), 2);
row.appendCellChild(labelReconciled);
row.appendCellChild(isReconciled, 2);
row = rows.newRow();
row.appendCellChild(labelBPartner.rightAlign());
- fieldBPartner.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldBPartner.getComponent(), "true");
row.appendCellChild(fieldBPartner.getComponent(), 2);
row.appendCellChild(labelProduct.rightAlign());
- fieldProduct.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldProduct.getComponent(), "true");
row.appendCellChild(fieldProduct.getComponent(), 2);
row = rows.newRow();
row.appendCellChild(labelDateAcct.rightAlign());
- fieldDateAcct.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldDateAcct.getComponent(), "true");
row.appendCellChild(fieldDateAcct.getComponent(), 2);
row.appendCellChild(labelDateAcct2.rightAlign());
- fieldDateAcct2.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fieldDateAcct2.getComponent(), "true");
row.appendCellChild(fieldDateAcct2.getComponent(), 2);
row = rows.newRow();
row.appendChild(bRefresh);
@@ -209,8 +210,8 @@ implements IFormController, EventListener, WTableModelListener, ValueChan
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(miniTable);
- miniTable.setWidth("99%");
- miniTable.setHeight("99%");
+ ZKUpdateUtil.setWidth(miniTable, "99%");
+ //ZKUpdateUtil.setHeight(miniTable, "99%");
center.setStyle("border: none");
// Command Panel
@@ -219,22 +220,22 @@ implements IFormController, EventListener, WTableModelListener, ValueChan
mainLayout.appendChild(south);
south.appendChild(commandPanel);
commandPanel.appendChild(commandLayout);
- commandLayout.setWidth("90%");
+ ZKUpdateUtil.setWidth(commandLayout, "90%");
rows = commandLayout.newRows();
row = rows.newRow();
row.appendCellChild(bZoom, 2);
- bZoom.setHflex("true");
- bZoom.setWidth("100%");
+ ZKUpdateUtil.setHflex(bZoom, "true");
+ ZKUpdateUtil.setWidth(bZoom, "100%");
row.appendCellChild(differenceLabel.rightAlign());
- differenceLabel.setHflex("true");
+ ZKUpdateUtil.setHflex(differenceLabel, "true");
row.appendCellChild(differenceField, 2);
- differenceField.setHflex("true");
+ ZKUpdateUtil.setHflex(differenceField, "true");
row.appendCellChild(bGenerate, 2);
- bGenerate.setHflex("true");
+ ZKUpdateUtil.setHflex(bGenerate, "true");
row.appendCellChild(bReset, 2);
- bReset.setHflex("true");
+ ZKUpdateUtil.setHflex(bReset, "true");
row.appendCellChild(bCancel);
- bCancel.setHflex("true");
+ ZKUpdateUtil.setHflex(bCancel, "true");
}
/**
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java
index fa91c1e1bb..81cc8bba51 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java
@@ -41,6 +41,7 @@ import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ReaderInputStream;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.impexp.ImpFormat;
import org.compiere.impexp.ImpFormatRow;
@@ -134,14 +135,14 @@ public class WFileImport extends ADForm implements EventListener
jbInit();
dynInit();
- this.setWidth("100%");
+ ZKUpdateUtil.setWidth(this, "100%");
this.setClosable(true);
this.setTitle("Import File Loader");
this.setBorder("normal");
Borderlayout layout = new Borderlayout();
- layout.setHeight("100%");
- layout.setWidth("100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
this.appendChild(layout);
North north = new North();
layout.appendChild(north);
@@ -149,8 +150,8 @@ public class WFileImport extends ADForm implements EventListener
Center center = new Center();
layout.appendChild(center);
center.appendChild(centerPanel);
- centerPanel.setVflex("1");
- centerPanel.setHflex("1");
+ ZKUpdateUtil.setVflex(centerPanel, "1");
+ ZKUpdateUtil.setHflex(centerPanel, "1");
South south = new South();
layout.appendChild(south);
south.appendChild(confirmPanel);
@@ -211,22 +212,22 @@ public class WFileImport extends ADForm implements EventListener
hbox.appendChild(record);
hbox.appendChild(bNext);
- rawData.setHflex("1");
+ ZKUpdateUtil.setHflex(rawData, "1");
rawData.setRows(MAX_SHOWN_LINES);
- rawData.setHeight("100%");
+ ZKUpdateUtil.setHeight(rawData, "100%");
- northPanel.setHflex("1");
- northPanel.setVflex("0");
+ ZKUpdateUtil.setHflex(northPanel, "1");
+ ZKUpdateUtil.setVflex(northPanel, "0");
northPanel.appendChild(hbox);
northPanel.appendChild(rawData);
northPanel.appendChild(new Separator());
- previewPanel.setHflex("1");
- previewPanel.setVflex("1");
+ ZKUpdateUtil.setHflex(previewPanel, "1");
+ ZKUpdateUtil.setVflex(previewPanel, "1");
previewPanel.setStyle("overflow: auto");
- centerPanel.setHflex("1");
- centerPanel.setVflex("1");
+ ZKUpdateUtil.setHflex(centerPanel, "1");
+ ZKUpdateUtil.setVflex(centerPanel, "1");
centerPanel.appendChild(previewPanel);
confirmPanel.addActionListener(Events.ON_CLICK, this);
@@ -491,14 +492,14 @@ public class WFileImport extends ADForm implements EventListener
Hbox hbox = new Hbox();
hbox.setAlign("center");
- hbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(hbox, "100%");
hbox.setStyle("padding-bottom: 3px");
Cell cell = new Cell();
- cell.setWidth("30%");
+ ZKUpdateUtil.setWidth(cell, "30%");
cell.appendChild(m_labels[i].rightAlign());
hbox.appendChild(cell);
cell = new Cell();
- cell.setWidth("70%");
+ ZKUpdateUtil.setWidth(cell, "70%");
int length = row.getEndNo() - row.getStartNo();
@@ -509,7 +510,7 @@ public class WFileImport extends ADForm implements EventListener
m_fields[i] = new Textbox();
m_fields[i].setStyle("margin-left: 2px");
- m_fields[i].setWidth("300px");
+ ZKUpdateUtil.setWidth(m_fields[i], "300px");
cell.appendChild(m_fields[i]);
hbox.appendChild(cell);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java
index 8880000ef9..0f387f76b0 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java
@@ -43,6 +43,7 @@ import org.adempiere.webui.event.WTableModelListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.SimplePDFViewer;
import org.compiere.apps.form.GenForm;
@@ -121,20 +122,20 @@ public class WGenForm extends ADForm implements EventListener, WTableMode
dynInit();
Borderlayout contentPane = new Borderlayout();
this.appendChild(contentPane);
- contentPane.setWidth("99%");
- contentPane.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentPane, "99%");
+ ZKUpdateUtil.setHeight(contentPane, "100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
center.appendChild(tabbedPane);
- tabbedPane.setVflex("1");
- tabbedPane.setHflex("1");
+ ZKUpdateUtil.setVflex(tabbedPane, "1");
+ ZKUpdateUtil.setHflex(tabbedPane, "1");
South south = new South();
south.setStyle("border: none");
contentPane.appendChild(south);
south.appendChild(statusBar);
LayoutUtils.addSclass("status-border", statusBar);
- south.setHeight("22px");
+ ZKUpdateUtil.setHeight(south, "22px");
}
catch(Exception ex)
{
@@ -156,8 +157,8 @@ public class WGenForm extends ADForm implements EventListener, WTableMode
void zkInit() throws Exception
{
//
- selPanel.setWidth("99%");
- selPanel.setHeight("90%");
+ ZKUpdateUtil.setWidth(selPanel, "99%");
+ ZKUpdateUtil.setHeight(selPanel, "90%");
selPanel.setStyle("border: none; position: absolute");
DesktopTabpanel tabpanel = new DesktopTabpanel();
tabpanel.appendChild(selPanel);
@@ -180,9 +181,9 @@ public class WGenForm extends ADForm implements EventListener, WTableMode
Center center = new Center();
selPanel.appendChild(center);
center.appendChild(miniTable);
- miniTable.setVflex("1");
- miniTable.setHflex("1");
- miniTable.setHeight("99%");
+ ZKUpdateUtil.setVflex(miniTable, "1");
+ ZKUpdateUtil.setHflex(miniTable, "1");
+ //ZKUpdateUtil.setHeight(miniTable, "99%");
confirmPanelSel.addActionListener(this);
//
tabpanel = new DesktopTabpanel();
@@ -191,8 +192,8 @@ public class WGenForm extends ADForm implements EventListener, WTableMode
tab = new Tab(Msg.getMsg(Env.getCtx(), "Generate"));
tabs.appendChild(tab);
tab.setDisabled(true);
- genPanel.setWidth("99%");
- genPanel.setHeight("90%");
+ ZKUpdateUtil.setWidth(genPanel, "99%");
+ ZKUpdateUtil.setHeight(genPanel, "90%");
genPanel.setStyle("border: none; position: absolute");
center = new Center();
genPanel.appendChild(center);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java
index 3be9dced43..9f9db9b95d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java
@@ -26,6 +26,7 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.InOutGen;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@@ -100,22 +101,22 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
Row row = form.getParameterPanel().newRows().newRow();
row.appendCellChild(lWarehouse.rightAlign());
- fWarehouse.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fWarehouse.getComponent(), "true");
row.appendCellChild(fWarehouse.getComponent());
row.appendCellChild(new Space());
row.appendCellChild(lBPartner.rightAlign());
- fBPartner.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fBPartner.getComponent(), "true");
row.appendCellChild(fBPartner.getComponent());
row.appendCellChild(new Space());
row = new Row();
form.getParameterPanel().getRows().appendChild(row);
row.appendCellChild(lDocType.rightAlign());
- cmbDocType.setHflex("true");
+ ZKUpdateUtil.setHflex(cmbDocType, "true");
row.appendCellChild(cmbDocType);
row.appendCellChild(new Space());
row.appendCellChild(lDocAction.rightAlign());
- docAction.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
row.appendCellChild(docAction.getComponent());
row.appendCellChild(new Space());
} // jbInit
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java
index 6fc194243b..ccc0186023 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java
@@ -26,6 +26,7 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.InvoiceGen;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@@ -101,22 +102,22 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
Row row = form.getParameterPanel().newRows().newRow();
row.appendCellChild(lOrg.rightAlign());
- fOrg.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fOrg.getComponent(), "true");
row.appendCellChild(fOrg.getComponent());
row.appendCellChild(new Space());
row.appendCellChild(lBPartner.rightAlign());
- fBPartner.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(fBPartner.getComponent(), "true");
row.appendCellChild(fBPartner.getComponent());
row.appendCellChild(new Space());
row = new Row();
form.getParameterPanel().getRows().appendChild(row);
row.appendCellChild(lDocType.rightAlign());
- cmbDocType.setHflex("true");
+ ZKUpdateUtil.setHflex(cmbDocType, "true");
row.appendCellChild(cmbDocType);
row.appendCellChild(new Space());
row.appendCellChild(lDocAction.rightAlign());
- docAction.getComponent().setHflex("true");
+ ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
row.appendCellChild(docAction.getComponent());
row.appendCellChild(new Space());
} // jbInit
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java
index 5f48268f08..c9039b3017 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java
@@ -44,6 +44,7 @@ import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.Match;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
@@ -200,8 +201,8 @@ public class WMatch extends Match
form.appendChild(mainPanel);
mainPanel.setStyle("width: 99%; height: 100%; padding: 0; margin: 0");
mainPanel.appendChild(mainLayout);
- mainLayout.setWidth("100%");
- mainLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(mainLayout, "100%");
+ ZKUpdateUtil.setHeight(mainLayout, "100%");
northPanel.appendChild(northLayout);
matchFromLabel.setText(Msg.translate(Env.getCtx(), "MatchFrom"));
matchToLabel.setText(Msg.translate(Env.getCtx(), "MatchTo"));
@@ -273,43 +274,43 @@ public class WMatch extends Match
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(centerPanel);
- centerPanel.setHflex("1");
- centerPanel.setVflex("1");
- centerLayout.setWidth("100%");
- centerLayout.setHeight("100%");
+ ZKUpdateUtil.setHflex(centerPanel, "1");
+ ZKUpdateUtil.setVflex(centerPanel, "1");
+ ZKUpdateUtil.setWidth(centerLayout, "100%");
+ ZKUpdateUtil.setHeight(centerLayout, "100%");
north = new North();
centerLayout.appendChild(north);
north.setStyle("border: none");
Panel p = new Panel();
p.appendChild(xMatchedBorder);
p.appendChild(xMatchedTable);
- xMatchedTable.setWidth("99%");
- xMatchedTable.setHeight("85%");
+ ZKUpdateUtil.setWidth(xMatchedTable, "99%");
+ //ZKUpdateUtil.setHeight(xMatchedTable, "85%");
p.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
north.appendChild(p);
- north.setHeight("44%");
+ ZKUpdateUtil.setHeight(north, "44%");
south = new South();
centerLayout.appendChild(south);
south.setStyle("border: none");
- xMatchedToTable.setWidth("99%");
- xMatchedToTable.setHeight("99%");
+ ZKUpdateUtil.setWidth(xMatchedToTable, "99%");
+ //ZKUpdateUtil.setHeight(xMatchedToTable, "99%");
south.appendChild(xMatchedToTable);
- south.setHeight("44%");
+ ZKUpdateUtil.setHeight(south, "44%");
center = new Center();
centerLayout.appendChild(center);
center.setStyle("border: none");
-// center.setHeight("6%");
+// ZKUpdateUtil.setHeight(center, "6%");
center.appendChild(xPanel);
- xPanel.setVflex("1");
- xPanel.setHflex("1");
+ ZKUpdateUtil.setVflex(xPanel, "1");
+ ZKUpdateUtil.setHflex(xPanel, "1");
xPanel.appendChild(sameBPartner);
xPanel.appendChild(new Space());
xPanel.appendChild(sameProduct);
xPanel.appendChild(new Space());
xPanel.appendChild(sameQty);
- xPanel.setHeight("50px");
+ ZKUpdateUtil.setHeight(xPanel, "50px");
xPanel.appendChild(new Separator());
xPanel.appendChild(xMatchedToBorder);
} // jbInit
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java
index f7ad8df198..31c2e02ed9 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMerge.java
@@ -32,6 +32,7 @@ import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.Merge;
import org.compiere.model.Lookup;
@@ -150,8 +151,8 @@ public class WMerge extends Merge implements IFormController, EventListener,
this.setTitle(Msg.getMsg(Env.getCtx(), "Payment"));
this.setSclass("popup-dialog");
this.setBorder("normal");
- this.setWidth("500px");
+ ZKUpdateUtil.setWidth(this, "500px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
}
@@ -82,12 +83,12 @@ public class WPaymentFormWindow extends Window implements EventListener,
Center center = new Center();
center.setSclass("dialog-content");
mainLayout.appendChild(center);
- mainLayout.setHflex("1");
- mainLayout.setVflex("min");
+ ZKUpdateUtil.setHflex(mainLayout, "1");
+ ZKUpdateUtil.setVflex(mainLayout, "min");
center.appendChild(centerPanel = getPanel());
LayoutUtils.addSclass("payment-form-content", centerPanel);
- centerPanel.setVflex("1");
- centerPanel.setHflex("1");
+ ZKUpdateUtil.setVflex(centerPanel, "1");
+ ZKUpdateUtil.setHflex(centerPanel, "1");
center.setAutoscroll(true);
//
South south = new South();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java
index 69ded0510a..3b1c05b0f4 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java
@@ -46,6 +46,7 @@ import org.adempiere.webui.panel.WRC5SummaryFieldsPanel;
import org.adempiere.webui.panel.WRCTabPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.ZkReportViewer;
import org.compiere.model.MRole;
@@ -169,8 +170,8 @@ public class WReportCustomization implements IFormController,EventListener, Va
Borderlayout contentPane = new Borderlayout();
form.appendChild(contentPane);
- contentPane.setWidth("99%");
- contentPane.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentPane, "99%");
+ ZKUpdateUtil.setHeight(contentPane, "100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
- gridPanel.setHflex("true");
- gridPanel.setVflex("true");
+ ZKUpdateUtil.setHflex(gridPanel, "true");
+ ZKUpdateUtil.setVflex(gridPanel, "true");
center.appendChild(gridPanel);
South south = new South();
south.setStyle("border: none");
@@ -127,25 +128,25 @@ public class WResetPassword implements IFormController, EventListener, Va
// AD_User.AD_User_ID
MLookup userLkp = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), 0, 212, DisplayType.Search);
fUser = new WSearchEditor("AD_User_ID", false, false, true, userLkp);
- fUser.getComponent().setWidth("220px");
+ ZKUpdateUtil.setWidth(fUser.getComponent(), "220px");
txtOldPassword = new Textbox();
txtOldPassword.setId("txtOldPassword");
txtOldPassword.setType("password");
txtOldPassword.setCols(25);
- txtOldPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtOldPassword, "220px");
txtNewPassword = new Textbox();
txtNewPassword.setId("txtNewPassword");
txtNewPassword.setType("password");
txtNewPassword.setCols(25);
- txtNewPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtNewPassword, "220px");
txtRetypeNewPassword = new Textbox();
txtRetypeNewPassword.setId("txtRetypeNewPassword");
txtRetypeNewPassword.setType("password");
txtRetypeNewPassword.setCols(25);
- txtRetypeNewPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px");
cbForceChangeNextLogin = new Checkbox();
cbForceChangeNextLogin.setLabel(Msg.getMsg(Env.getCtx(), "ForceChangeOnNextLogin"));
@@ -154,24 +155,24 @@ public class WResetPassword implements IFormController, EventListener, Va
txtNewEMail = new Textbox();
txtNewEMail.setId("txtNewEMail");
txtNewEMail.setCols(25);
- txtNewEMail.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtNewEMail, "220px");
txtNewEMailUser = new Textbox();
txtNewEMailUser.setId("txtNewEMailUser");
txtNewEMailUser.setCols(25);
- txtNewEMailUser.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtNewEMailUser, "220px");
txtNewEMailUserPW = new Textbox();
txtNewEMailUserPW.setId("txtNewEMailUserPW");
txtNewEMailUserPW.setType("password");
txtNewEMailUserPW.setCols(25);
- txtNewEMailUserPW.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtNewEMailUserPW, "220px");
txtRetypeNewEMailPW = new Textbox();
txtRetypeNewEMailPW.setId("txtRetypeNewEMail");
txtRetypeNewEMailPW.setType("password");
txtRetypeNewEMailPW.setCols(25);
- txtRetypeNewEMailPW.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtRetypeNewEMailPW, "220px");
confirmPanel = new ConfirmPanel(true);
}
@@ -185,11 +186,11 @@ public class WResetPassword implements IFormController, EventListener, Va
Column column = new Column();
columns.appendChild(column);
- column.setWidth("40%");
+ ZKUpdateUtil.setWidth(column, "40%");
column = new Column();
columns.appendChild(column);
- column.setWidth("60%");
+ ZKUpdateUtil.setWidth(column, "60%");
Rows rows = new Rows();
gridPanel.appendChild(rows);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java
index 18a66b452e..19adf52184 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java
@@ -35,6 +35,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
@@ -99,14 +100,14 @@ public class WSQLProcess extends ADForm implements EventListener
final int noStatementRows = 3;
final int noResultRows = 20;
- m_grdMain.setWidth("80%");
+ ZKUpdateUtil.setWidth(m_grdMain, "80%");
// create the top row of components
m_txbSqlField.setMultiline(true);
m_txbSqlField.setMaxlength(maxStatementLength);
m_txbSqlField.setRows(noStatementRows);
- m_txbSqlField.setHeight("100%");
- m_txbSqlField.setHflex("1");
+ ZKUpdateUtil.setHeight(m_txbSqlField, "100%");
+ ZKUpdateUtil.setHflex(m_txbSqlField, "1");
m_txbSqlField.setCols(noColumns);
m_txbSqlField.setReadonly(false);
@@ -121,8 +122,8 @@ public class WSQLProcess extends ADForm implements EventListener
// create the bottom row of components
m_txbResultField.setCols(noColumns);
m_txbResultField.setRows(noResultRows);
- m_txbResultField.setHeight("100%");
- m_txbResultField.setHflex("1");
+ ZKUpdateUtil.setHeight(m_txbResultField, "100%");
+ ZKUpdateUtil.setHflex(m_txbResultField, "1");
m_txbResultField.setReadonly(true);
rwBottom.appendCellChild(m_txbResultField, 3);
@@ -135,13 +136,13 @@ public class WSQLProcess extends ADForm implements EventListener
Borderlayout contentPane = new Borderlayout();
this.appendChild(contentPane);
- contentPane.setWidth("99%");
- contentPane.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentPane, "99%");
+ ZKUpdateUtil.setHeight(contentPane, "100%");
Center center = new Center();
center.setStyle("border: none");
contentPane.appendChild(center);
- m_grdMain.setHflex("true");
- m_grdMain.setVflex("true");
+ ZKUpdateUtil.setHflex(m_grdMain, "true");
+ ZKUpdateUtil.setVflex(m_grdMain, "true");
center.appendChild(m_grdMain);
return;
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java
index f8ac50774c..76e919efe3 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java
@@ -40,6 +40,7 @@ import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.TreeUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.SetupWizard;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
@@ -349,12 +350,12 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
*/
private void jbInit () throws Exception
{
- form.setWidth("99%");
- form.setHeight("100%");
+ ZKUpdateUtil.setWidth(form, "99%");
+ ZKUpdateUtil.setHeight(form, "100%");
form.setStyle("position: absolute; padding: 0; margin: 0");
form.appendChild (mainLayout);
- mainLayout.setWidth("100%");
- mainLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(mainLayout, "100%");
+ ZKUpdateUtil.setHeight(mainLayout, "100%");
mainLayout.setStyle("position: absolute");
bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh16.png"));
@@ -388,13 +389,13 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
- north.setHeight("38px");
+ ZKUpdateUtil.setHeight(north, "38px");
//
northPanel.appendChild(progressbar);
- progressbar.setWidth("100%");
+ ZKUpdateUtil.setWidth(progressbar, "100%");
progressbar.setZclass("progressmeter-setupwizard");
northPanel.appendChild(progressLabel);
- progressLabel.setWidth("100%");
+ ZKUpdateUtil.setWidth(progressLabel, "100%");
progressLabel.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center; border:0; text-align: center; ");
refreshProgress();
@@ -405,14 +406,14 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
statusField = new WTableDirEditor("WizardStatus", true, false, true,wizardL);
statusField.setValue(MWizardProcess.WIZARDSTATUS_Pending);
- centerBox.setVflex("1");
- centerBox.setHflex("1");
+ ZKUpdateUtil.setVflex(centerBox, "1");
+ ZKUpdateUtil.setHflex(centerBox, "1");
Center center = new Center();
mainLayout.appendChild(center);
center.appendChild(centerBox);
centerBox.appendChild(wfnodeTree);
- centerBox.setWidth("100%");
- wfnodeTree.setVflex("1");
+ ZKUpdateUtil.setWidth(centerBox, "100%");
+ ZKUpdateUtil.setVflex(wfnodeTree, "1");
centerBox.appendChild(centerBoxdown);
centerBoxdown.setOrient("horizontal");
centerBoxdown.setAlign("center");
@@ -423,8 +424,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
center.setAutoscroll(true);
Div div = new Div();
- div.setHeight("88%");
- div.setHflex("1");
+ ZKUpdateUtil.setHeight(div, "88%");
+ ZKUpdateUtil.setHflex(div, "1");
div.setStyle("text-align:center ");
pretitleLabel.setStyle("font-weight: bold; font-size: 14px");
@@ -433,8 +434,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
titleLabel.setLeft("50%");
div.appendChild(helpFrame);
- helpFrame.setWidth("99%");
- helpFrame.setHeight("80%");
+ ZKUpdateUtil.setWidth(helpFrame, "99%");
+ ZKUpdateUtil.setHeight(helpFrame, "80%");
helpFrame.setStyle("border: 1px solid lightgray; margin:auto");
Div divNote = new Div();
@@ -445,8 +446,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
divNote.appendChild(notesField);
notesField.setRows(4);
- notesField.setHeight("100%");
- notesField.setWidth("99%");
+ ZKUpdateUtil.setHeight(notesField, "100%");
+ ZKUpdateUtil.setWidth(notesField, "99%");
MLookup lookup = MLookupFactory.get(Env.getCtx(), form.getWindowNo(),
0, 200913, DisplayType.Search);
@@ -478,7 +479,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
east.appendChild(div);
east.setCollapsible(true);
east.setSplittable(true);
- east.setWidth("70%");
+ ZKUpdateUtil.setWidth(east, "70%");
east.setAutoscroll(true);
setNotesPanelVisible(false);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java
index 4eaecd5031..c0c8fbc313 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java
@@ -38,6 +38,7 @@ import org.adempiere.webui.editor.WStringEditor;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.apps.form.StatementCreateFromBatch;
import org.compiere.model.MBankStatement;
@@ -191,8 +192,8 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
Borderlayout parameterLayout = new Borderlayout();
- parameterLayout.setHeight("130px");
- parameterLayout.setWidth("100%");
+ ZKUpdateUtil.setHeight(parameterLayout, "130px");
+ ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = form.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
@@ -209,14 +210,14 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
Column column = new Column();
columns.appendChild(column);
column = new Column();
- column.setWidth("15%");
+ ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
- column.setWidth("35%");
+ ZKUpdateUtil.setWidth(column, "35%");
column = new Column();
- column.setWidth("15%");
+ ZKUpdateUtil.setWidth(column, "15%");
columns.appendChild(column);
column = new Column();
- column.setWidth("35%");
+ ZKUpdateUtil.setWidth(column, "35%");
columns.appendChild(column);
Rows rows = (Rows) parameterBankLayout.newRows();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java
index b1e80d4e2b..6af90eb308 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java
@@ -50,6 +50,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.WTabEditorForm;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.form.TabEditor;
import org.compiere.model.GridField;
import org.compiere.model.MField;
@@ -151,13 +152,13 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
private void dynList()
{
visible.addEventListener(Events.ON_SELECT, this);
- visible.setVflex("70");
+ ZKUpdateUtil.setVflex(visible, "70");
visible.setItemDraggable(true);
visible.setDroppable("true");
visible.addOnDropListener(this);
invisible.addEventListener(Events.ON_SELECT, this);
- invisible.setVflex("30");
+ ZKUpdateUtil.setVflex(invisible, "30");
invisible.setItemDraggable(true);
invisible.setDroppable("true");
invisible.addOnDropListener(this);
@@ -178,8 +179,8 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
form = new Grid();
form.makeNoStrip();
- form.setHflex("1");
- form.setHeight(null);
+ ZKUpdateUtil.setHflex(form, "1");
+ ZKUpdateUtil.setHeight(form, null);
form.setVflex(false);
int numCols = getNumColumns();
@@ -194,7 +195,7 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
for (int h=0;h
height = width > 300 ? width * 40 / 100 : width * 85 / 100;
if (height == 0)
return; // no space to render
- this.setHeight(height+"px");
+ ZKUpdateUtil.setHeight(this, height+"px");
} else {
int ratio = (height * 100) / width;
if (ratio > 85 || ratio < 50) {
height = width > 300 ? width * 40 / 100 : width * 85 / 100;
if (height == 0)
return; // no space to render
- this.setHeight(height+"px");
+ ZKUpdateUtil.setHeight(this, height+"px");
}
}
this.getChildren().clear();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java
index 6647c4c258..4e4e2c8233 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java
@@ -30,6 +30,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.wf.WFGraphLayout;
import org.compiere.apps.wf.WFNodeWidget;
import org.compiere.model.MRole;
@@ -85,7 +86,7 @@ public class WFEditor extends ADForm {
@Override
protected void initForm() {
- this.setHeight("100%");
+ ZKUpdateUtil.setHeight(this, "100%");
Borderlayout layout = new Borderlayout();
layout.setStyle("width: 100%; height: 100%; position: absolute;");
appendChild(layout);
@@ -131,7 +132,7 @@ public class WFEditor extends ADForm {
toolbar.appendChild(refreshButton);
refreshButton.addEventListener(Events.ON_CLICK, this);
refreshButton.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")));
- north.setHeight("30px");
+ ZKUpdateUtil.setHeight(north, "30px");
createTable();
center = new Center();
@@ -144,7 +145,7 @@ public class WFEditor extends ADForm {
South south = new South();
layout.appendChild(south);
south.appendChild(confirmPanel);
- south.setHeight("36px");
+ ZKUpdateUtil.setHeight(south, "36px");
}
private void createTable() {
@@ -231,7 +232,7 @@ public class WFEditor extends ADForm {
}
});
- w.setWidth("250px");
+ ZKUpdateUtil.setWidth(w, "250px");
w.setBorder("normal");
w.setPage(this.getPage());
w.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener() {
@@ -347,8 +348,8 @@ public class WFEditor extends ADForm {
else
{
Div div = new Div();
- div.setWidth((WFGraphLayout.COLUMN_WIDTH) + "px");
- div.setHeight((WFGraphLayout.ROW_HEIGHT) + "px");
+ ZKUpdateUtil.setWidth(div, (WFGraphLayout.COLUMN_WIDTH) + "px");
+ ZKUpdateUtil.setHeight(div, (WFGraphLayout.ROW_HEIGHT) + "px");
div.setAttribute("Node.XPosition", c+1);
div.setAttribute("Node.YPosition", i+1);
div.setDroppable("WFNode");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java
index 602ef1a3e0..a2f4f74afb 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java
@@ -22,6 +22,7 @@ import java.util.logging.Level;
import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.apps.wf.WFGraphLayout;
import org.compiere.apps.wf.WFNodeWidget;
import org.compiere.model.X_AD_CtxHelp;
@@ -119,12 +120,12 @@ public class WFPanel extends Borderlayout implements EventListener, IHelp
div.setStyle("width:100%; height: 100%");
div.appendChild(infoTextPane);
south.appendChild(div);
- south.setHeight("25%");
+ ZKUpdateUtil.setHeight(south, "25%");
south.setSplittable(true);
south.setCollapsible(true);
south.setAutoscroll(true);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
} // jbInit
private void createTable() {
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java
index ef30e58108..b809fe0fcd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java
@@ -5,6 +5,7 @@ import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MQuery;
import org.compiere.model.MTable;
import org.compiere.util.CLogger;
@@ -159,7 +160,7 @@ public class WFPopupItem extends Menuitem {
}
});
- w.setWidth("250px");
+ ZKUpdateUtil.setWidth(w, "250px");
w.setBorder("normal");
w.setPage(this.getPage());
w.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener() {
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java
index 64c6494932..79042066b4 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java
@@ -39,6 +39,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@@ -146,8 +147,8 @@ public class WWFActivity extends ADForm implements EventListener
private void init()
{
Grid grid = new Grid();
- grid.setWidth("100%");
- grid.setHeight("100%");
+ ZKUpdateUtil.setWidth(grid, "100%");
+ ZKUpdateUtil.setHeight(grid, "100%");
grid.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center;");
grid.makeNoStrip();
grid.setOddRowSclass("even");
@@ -162,8 +163,8 @@ public class WWFActivity extends ADForm implements EventListener
div.appendChild(lNode);
row.appendChild(div);
row.appendChild(fNode);
- fNode.setWidth("100%");
- fNode.setHflex("true");
+ ZKUpdateUtil.setWidth(fNode, "100%");
+ ZKUpdateUtil.setHflex(fNode, "true");
fNode.setReadonly(true);
row = new Row();
@@ -175,8 +176,8 @@ public class WWFActivity extends ADForm implements EventListener
row.appendChild(div);
row.appendChild(fDescription);
fDescription.setMultiline(true);
- fDescription.setWidth("100%");
- fDescription.setHflex("true");
+ ZKUpdateUtil.setWidth(fDescription, "100%");
+ ZKUpdateUtil.setHflex(fDescription, "true");
fDescription.setReadonly(true);
row = new Row();
@@ -188,9 +189,9 @@ public class WWFActivity extends ADForm implements EventListener
row.appendChild(fHelp);
fHelp.setMultiline(true);
fHelp.setRows(3);
- fHelp.setWidth("100%");
- fHelp.setHeight("100%");
- fHelp.setHflex("true");
+ ZKUpdateUtil.setWidth(fHelp, "100%");
+ ZKUpdateUtil.setHeight(fHelp, "100%");
+ ZKUpdateUtil.setHflex(fHelp, "true");
fHelp.setReadonly(true);
row.appendChild(new Label());
@@ -201,7 +202,7 @@ public class WWFActivity extends ADForm implements EventListener
div.appendChild(lHistory);
row.appendChild(div);
row.appendChild(fHistory);
- fHistory.setHflex("true");
+ ZKUpdateUtil.setHflex(fHistory, "true");
row.appendChild(new Label());
row = new Row();
@@ -212,7 +213,7 @@ public class WWFActivity extends ADForm implements EventListener
row.appendChild(div);
Hbox hbox = new Hbox();
hbox.appendChild(fAnswerText);
- fAnswerText.setHflex("true");
+ ZKUpdateUtil.setHflex(fAnswerText, "true");
hbox.appendChild(fAnswerList);
hbox.appendChild(fAnswerButton);
fAnswerButton.addEventListener(Events.ON_CLICK, this);
@@ -227,9 +228,9 @@ public class WWFActivity extends ADForm implements EventListener
div.appendChild(lTextMsg);
row.appendChild(div);
row.appendChild(fTextMsg);
- fTextMsg.setHflex("true");
+ ZKUpdateUtil.setHflex(fTextMsg, "true");
fTextMsg.setMultiline(true);
- fTextMsg.setWidth("100%");
+ ZKUpdateUtil.setWidth(fTextMsg, "100%");
row.appendChild(new Label());
row = new Row();
@@ -246,16 +247,16 @@ public class WWFActivity extends ADForm implements EventListener
bOK.addEventListener(Events.ON_CLICK, this);
Borderlayout layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
layout.setStyle("background-color: transparent; position: absolute;");
North north = new North();
north.appendChild(listbox);
north.setSplittable(true);
- listbox.setVflex("1");
- listbox.setHflex("1");
- north.setHeight("50%");
+ ZKUpdateUtil.setVflex(listbox, "1");
+ ZKUpdateUtil.setHflex(listbox, "1");
+ ZKUpdateUtil.setHeight(north, "50%");
layout.appendChild(north);
north.setStyle("background-color: transparent");
listbox.addEventListener(Events.ON_SELECT, this);
@@ -264,8 +265,8 @@ public class WWFActivity extends ADForm implements EventListener
center.appendChild(grid);
layout.appendChild(center);
center.setStyle("background-color: transparent");
- grid.setVflex("1");
- grid.setHflex("1");
+ ZKUpdateUtil.setVflex(grid, "1");
+ ZKUpdateUtil.setHflex(grid, "1");
South south = new South();
south.appendChild(statusBar);
@@ -417,13 +418,13 @@ public class WWFActivity extends ADForm implements EventListener
WListItemRenderer renderer = new WListItemRenderer(Arrays.asList(columns));
ListHeader header = new ListHeader();
- header.setWidth("60px");
+ ZKUpdateUtil.setWidth(header, "60px");
renderer.setListHeader(0, header);
header = new ListHeader();
- header.setWidth(null);
+ ZKUpdateUtil.setWidth(header, null);
renderer.setListHeader(1, header);
header = new ListHeader();
- header.setWidth(null);
+ ZKUpdateUtil.setWidth(header, null);
renderer.setListHeader(2, header);
renderer.addTableValueChangeListener(listbox);
model.setNoColumns(columns.length);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java
index a9311dd962..07f7f1a285 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java
@@ -16,6 +16,7 @@ package org.adempiere.webui.component;
import java.util.ArrayList;
import java.util.List;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
@@ -48,7 +49,7 @@ public class Accordion extends Borderlayout implements EventListener {
North north = new North();
appendChild(north);
northBox = new Vbox();
- northBox.setWidth("100%");
+ ZKUpdateUtil.setWidth(northBox, "100%");
north.appendChild(northBox);
north.setSplittable(false);
north.setCollapsible(false);
@@ -59,7 +60,7 @@ public class Accordion extends Borderlayout implements EventListener {
South south = new South();
appendChild(south);
southBox = new Vbox();
- southBox.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBox, "100%");
south.appendChild(southBox);
south.setSplittable(false);
south.setCollapsible(false);
@@ -74,7 +75,7 @@ public class Accordion extends Borderlayout implements EventListener {
ToolBarButton button = new ToolBarButton();
button.setLabel(label);
button.addEventListener(Events.ON_CLICK, this);
- button.setWidth("100%");
+ ZKUpdateUtil.setWidth(button, "100%");
Div div = new Div();
div.setClass("z-center-header");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java
index e53a521628..606cec4083 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java
@@ -18,6 +18,7 @@ import java.util.List;
import javax.activation.DataSource;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
@@ -50,7 +51,7 @@ public class AttachmentItem extends Hlayout implements EventListener{
this.list = list;
x.addEventListener(Events.ON_CLICK, this);
}
- setHflex("0");
+ ZKUpdateUtil.setHflex(this, "0");
}
@Override
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java
index 09ff75ef3c..cc8d9a28ab 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java
@@ -24,6 +24,7 @@ import java.util.Map;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
@@ -245,7 +246,7 @@ public final class ConfirmPanel extends Div
this.appendChild(pnlBtnCenter);
this.appendChild(pnlBtnRight);
this.setSclass("confirm-panel");
- this.setVflex("min");
+ ZKUpdateUtil.setVflex(this, "min");
setId("confirmPanel");
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/DatetimeBox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/DatetimeBox.java
index 51fb3b463f..75e2c12335 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/DatetimeBox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/DatetimeBox.java
@@ -16,6 +16,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Timebox;
@@ -41,7 +42,7 @@ public class DatetimeBox extends Panel {
//timeBox.setButtonVisible(false);
appendChild(dateBox);
appendChild(timeBox);
- this.setHflex("1");
+ ZKUpdateUtil.setHflex(this, "1");
initComponents();
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/EditorBox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/EditorBox.java
index 64b9321f25..6538bb64ee 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/EditorBox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/EditorBox.java
@@ -16,6 +16,7 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
@@ -55,11 +56,11 @@ public class EditorBox extends Div {
private void initComponents() {
txt = new Textbox();
txt.setSclass("editor-input");
- txt.setHflex("0");
+ ZKUpdateUtil.setHflex(txt, "0");
appendChild(txt);
btn = new Button();
btn.setTabindex(-1);
- btn.setHflex("0");
+ ZKUpdateUtil.setHflex(btn, "0");
btn.setSclass("editor-button");
appendChild(btn);
@@ -151,11 +152,11 @@ public class EditorBox extends Div {
public void setTableEditorMode(boolean flag) {
if (flag) {
- setHflex("0");
+ ZKUpdateUtil.setHflex(this, "0");
LayoutUtils.addSclass("grid-editor-input", txt);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
- setHflex("1");
+ ZKUpdateUtil.setHflex(this, "1");
LayoutUtils.removeSclass("grid-editor-input", txt);
LayoutUtils.removeSclass("grid-editor-button", btn);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java
index 66d2014edc..48a3dd3613 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java
@@ -18,6 +18,7 @@ import java.util.Arrays;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MSysConfig;
import org.compiere.util.Ini;
@@ -80,8 +81,8 @@ public class FolderBrowser extends Window implements EventListener
this.browseForFolder = browseForFolder;
setTitle(browseForFolder ? "Directory Browser" : "File Browser");
- setWidth("500px");
- setHeight("500px");
+ ZKUpdateUtil.setWidth(this, "500px");
+ ZKUpdateUtil.setHeight(this, "500px");
setBorder("normal");
Borderlayout contentLayout = new Borderlayout();
@@ -94,15 +95,15 @@ public class FolderBrowser extends Window implements EventListener
Center center = new Center();
contentLayout.appendChild(center);
center.appendChild(listDir);
- listDir.setVflex("1");
- listDir.setHflex("1");
+ ZKUpdateUtil.setVflex(listDir, "1");
+ ZKUpdateUtil.setHflex(listDir, "1");
South south = new South();
south.setStyle("border: none");
contentLayout.appendChild(south);
south.appendChild(confirmPanel);
- txtPath.setWidth("475px");
+ ZKUpdateUtil.setWidth(txtPath, "475px");
txtPath.setReadonly(true);
getFileListing(root.getPath());
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListboxFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListboxFactory.java
index c4920d2699..aad011fbf2 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListboxFactory.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ListboxFactory.java
@@ -12,6 +12,8 @@
*****************************************************************************/
package org.adempiere.webui.component;
+import org.adempiere.webui.util.ZKUpdateUtil;
+
/**
*
* @author Low Heng Sin
@@ -35,10 +37,10 @@ public class ListboxFactory {
*/
public static WListbox newDataTable() {
WListbox dataTable = new WListbox();
- dataTable.setWidth("100%");
- dataTable.setHeight("100%");
+ ZKUpdateUtil.setWidth(dataTable, "100%");
+ ZKUpdateUtil.setHeight(dataTable, "100%");
dataTable.setSizedByContent(false);
- dataTable.setVflex(true);
+ ZKUpdateUtil.setVflex(dataTable, true);
return dataTable;
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java
index 5a98f40b43..25e24e2fcd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java
@@ -24,6 +24,7 @@ import org.adempiere.webui.AdempiereIdGenerator;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
@@ -175,7 +176,7 @@ public class Messagebox extends Window implements EventListener
img.setSrc(imgSrc);
- pnlImage.setWidth("72px");
+ ZKUpdateUtil.setWidth(pnlImage, "72px");
pnlImage.setAlign("center");
pnlImage.setPack("center");
pnlImage.appendChild(img);
@@ -198,7 +199,7 @@ public class Messagebox extends Window implements EventListener
pnlButtons.appendChild(btnRetry);
pnlButtons.appendChild(btnIgnore);
- pnlButtons.setWidth("100%");
+ ZKUpdateUtil.setWidth(pnlButtons, "100%");
this.appendChild(pnlButtons);
pnlButtons.setSclass("dialog-footer");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java
index 9d407ad7a8..00fd1315db 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java
@@ -23,6 +23,7 @@ import java.text.ParseException;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MSysConfig;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@@ -83,7 +84,7 @@ public class NumberBox extends Div
if (integral)
decimalBox.setScale(0);
decimalBox.setStyle("display: inline-block;text-align:right");
- decimalBox.setHflex("0");
+ ZKUpdateUtil.setHflex(decimalBox, "0");
decimalBox.setSclass("editor-input");
decimalBox.setId(decimalBox.getUuid());
@@ -123,7 +124,7 @@ public class NumberBox extends Div
btn = new Button();
btn.setImage(ThemeManager.getThemeResource("images/Calculator16.png"));
btn.setTabindex(-1);
- btn.setHflex("0");
+ ZKUpdateUtil.setHflex(btn, "0");
btn.setWidgetListener("onClick", "try{var id=this.getPopup(); zk.Widget.$(id.substring(5, id.length - 1)).focus_(100);" +
"} catch(error) {}");
@@ -271,27 +272,27 @@ public class NumberBox extends Div
Hbox row1 = new Hbox();
Button btnAC = new Button();
- btnAC.setWidth("40px");
+ ZKUpdateUtil.setWidth(btnAC, "40px");
btnAC.setLabel("AC");
btnAC.setWidgetListener("onClick", "calc.clearAll('" + txtCalcId + "')");
Button btn7 = new Button();
- btn7.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn7, "30px");
btn7.setLabel("7");
btn7.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '7')");
Button btn8 = new Button();
- btn8.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn8, "30px");
btn8.setLabel("8");
btn8.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '8')");
Button btn9 = new Button();
- btn9.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn9, "30px");
btn9.setLabel("9");
btn9.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '9')");
Button btnMultiply = new Button();
- btnMultiply.setWidth("30px");
+ ZKUpdateUtil.setWidth(btnMultiply, "30px");
btnMultiply.setLabel("*");
btnMultiply.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' * ')");
@@ -304,27 +305,27 @@ public class NumberBox extends Div
Hbox row2 = new Hbox();
Button btnC = new Button();
- btnC.setWidth("40px");
+ ZKUpdateUtil.setWidth(btnC, "40px");
btnC.setLabel("C");
btnC.setWidgetListener("onClick", "calc.clear('" + txtCalcId + "')");
Button btn4 = new Button();
- btn4.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn4, "30px");
btn4.setLabel("4");
btn4.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '4')");
Button btn5 = new Button();
- btn5.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn5, "30px");
btn5.setLabel("5");
btn5.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '5')");
Button btn6 = new Button();
- btn6.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn6, "30px");
btn6.setLabel("6");
btn6.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '6')");
Button btnDivide = new Button();
- btnDivide.setWidth("30px");
+ ZKUpdateUtil.setWidth(btnDivide, "30px");
btnDivide.setLabel("/");
btnDivide.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' / ')");
@@ -337,27 +338,27 @@ public class NumberBox extends Div
Hbox row3 = new Hbox();
Button btnModulo = new Button();
- btnModulo.setWidth("40px");
+ ZKUpdateUtil.setWidth(btnModulo, "40px");
btnModulo.setLabel("%");
btnModulo.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' % ')");
Button btn1 = new Button();
- btn1.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn1, "30px");
btn1.setLabel("1");
btn1.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '1')");
Button btn2 = new Button();
- btn2.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn2, "30px");
btn2.setLabel("2");
btn2.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '2')");
Button btn3 = new Button();
- btn3.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn3, "30px");
btn3.setLabel("3");
btn3.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '3')");
Button btnSubstract = new Button();
- btnSubstract.setWidth("30px");
+ ZKUpdateUtil.setWidth(btnSubstract, "30px");
btnSubstract.setLabel("-");
btnSubstract.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' - ')");
@@ -370,29 +371,29 @@ public class NumberBox extends Div
Hbox row4 = new Hbox();
Button btnCurrency = new Button();
- btnCurrency.setWidth("40px");
+ ZKUpdateUtil.setWidth(btnCurrency, "40px");
btnCurrency.setLabel("$");
btnCurrency.setDisabled(true);
Button btn0 = new Button();
- btn0.setWidth("30px");
+ ZKUpdateUtil.setWidth(btn0, "30px");
btn0.setLabel("0");
btn0.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '0')");
Button btnDot = new Button();
- btnDot.setWidth("30px");
+ ZKUpdateUtil.setWidth(btnDot, "30px");
btnDot.setLabel(separator);
btnDot.setDisabled(integral);
btnDot.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '" + separator + "')");
Button btnEqual = new Button();
- btnEqual.setWidth("30px");
+ ZKUpdateUtil.setWidth(btnEqual, "30px");
btnEqual.setLabel("=");
btnEqual.setWidgetListener("onClick", "calc.evaluate('" + decimalBox.getId() + "','"
+ txtCalcId + "','" + separator + "')");
Button btnAdd = new Button();
- btnAdd.setWidth("30px");
+ ZKUpdateUtil.setWidth(btnAdd, "30px");
btnAdd.setLabel("+");
btnAdd.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' + ')");
@@ -504,11 +505,11 @@ public class NumberBox extends Div
public void setTableEditorMode(boolean flag) {
if (flag) {
- setHflex("0");
+ ZKUpdateUtil.setHflex(this, "0");
LayoutUtils.addSclass("grid-editor-input", decimalBox);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
- setHflex("1");
+ ZKUpdateUtil.setHflex(this, "1");
LayoutUtils.removeSclass("grid-editor-input", decimalBox);
LayoutUtils.removeSclass("grid-editor-button", btn);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java
index 3ac006c3f3..041e934478 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java
@@ -17,6 +17,7 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MSysConfig;
import org.compiere.util.Env;
import org.zkoss.zk.ui.event.EventListener;
@@ -55,12 +56,12 @@ public class Paymentbox extends Div {
private void initComponents() {
combo = new Combobox();
appendChild(combo);
- combo.setHflex("0");
+ ZKUpdateUtil.setHflex(combo, "0");
btn = new Button();
btn.setTabindex(-1);
btn.setSclass("editor-button");
- btn.setHflex("0");
+ ZKUpdateUtil.setHflex(btn, "0");
appendChild(btn);
LayoutUtils.addSclass("payment-rule-editor", this);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ProcessInfoDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ProcessInfoDialog.java
index ba1916412d..0c0bc3630d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ProcessInfoDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ProcessInfoDialog.java
@@ -21,6 +21,7 @@ import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoLog;
import org.compiere.process.ProcessInfoUtil;
@@ -109,7 +110,7 @@ public class ProcessInfoDialog extends Window implements EventListener {
Hbox pnlImage = new Hbox();
img.setSrc((pi != null && pi.isError()) ? ERROR:INFORMATION);
- pnlImage.setWidth("72px");
+ ZKUpdateUtil.setWidth(pnlImage, "72px");
pnlImage.setAlign("center");
pnlImage.setPack("center");
pnlImage.appendChild(img);
@@ -125,20 +126,20 @@ public class ProcessInfoDialog extends Window implements EventListener {
north.appendChild(pnlMessage);
Hbox pnlButtons = new Hbox();
- pnlButtons.setHeight("52px");
+ ZKUpdateUtil.setHeight(pnlButtons, "52px");
pnlButtons.setAlign("center");
pnlButtons.setPack("end");
pnlButtons.appendChild(btnOk);
Separator separator = new Separator();
- separator.setWidth("100%");
+ ZKUpdateUtil.setWidth(separator, "100%");
separator.setBar(true);
this.appendChild(separator);
Hbox south = new Hbox();
south.setPack("end");
- south.setWidth("100%");
+ ZKUpdateUtil.setWidth(south, "100%");
this.appendChild(south);
south.appendChild(pnlButtons);
@@ -155,7 +156,7 @@ public class ProcessInfoDialog extends Window implements EventListener {
if (m_logs != null && m_logs.length > 0){
separator = new Separator();
- separator.setWidth("100%");
+ ZKUpdateUtil.setWidth(separator, "100%");
separator.setBar(true);
pnlMessage.appendChild(separator);
for (int loopCtr = 0; loopCtr < m_logs.length; loopCtr++) {
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Urlbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Urlbox.java
index 08de57d1e0..b998c93c73 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Urlbox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Urlbox.java
@@ -16,6 +16,7 @@ import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.A;
@@ -53,7 +54,7 @@ public class Urlbox extends Div
private void initComponents() {
txt = new Textbox();
appendChild(txt);
- txt.setHflex("0");
+ ZKUpdateUtil.setHflex(txt, "0");
txt.setSclass("editor-input");
btn = new A();
@@ -61,7 +62,7 @@ public class Urlbox extends Div
btn.setTabindex(-1);
btn.setSclass("editor-button");
btn.setZclass("z-button-os");
- btn.setHflex("0");
+ ZKUpdateUtil.setHflex(btn, "0");
appendChild(btn);
LayoutUtils.addSclass("editor-box", this);
@@ -159,11 +160,11 @@ public class Urlbox extends Div
public void setTableEditorMode(boolean flag) {
if (flag) {
- setHflex("0");
+ ZKUpdateUtil.setHflex(this, "0");
LayoutUtils.addSclass("grid-editor-input", txt);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
- setHflex("1");
+ ZKUpdateUtil.setHflex(this, "1");
LayoutUtils.removeSclass("grid-editor-input", txt);
LayoutUtils.removeSclass("grid-editor-button", btn);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java
index f4fb44ec7f..e64d254040 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java
@@ -35,6 +35,7 @@ import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.event.TableValueChangeEvent;
import org.adempiere.webui.event.TableValueChangeListener;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MImage;
import org.compiere.util.DisplayType;
@@ -459,7 +460,7 @@ public class WListItemRenderer implements ListitemRenderer, EventListene
if (classType != null && classType.isAssignableFrom(IDColumn.class))
{
header = new ListHeader("");
- header.setWidth("30px");
+ ZKUpdateUtil.setWidth(header, "30px");
}
else
{
@@ -505,7 +506,7 @@ public class WListItemRenderer implements ListitemRenderer, EventListene
header.setStyle("min-width: " + width + "px");
}
- header.setHflex("min");
+ ZKUpdateUtil.setHflex(header, "min");
m_headers.add(header);
}
else
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java
index e62d12486c..db785b43da 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/CalendarWindow.java
@@ -28,11 +28,14 @@ import java.util.Map;
import java.util.Properties;
import java.util.TimeZone;
+import javax.swing.text.StyledEditorKit.BoldAction;
+
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.panel.ITabOnCloseHandler;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MSysConfig;
import org.compiere.model.X_R_RequestType;
import org.compiere.util.DisplayType;
@@ -109,8 +112,8 @@ public class CalendarWindow extends Window implements EventListener, ITab
Borderlayout borderlayout = (Borderlayout) component.getFellow("main");
borderlayout.setStyle("position: absolute");
- borderlayout.setWidth("100%");
- borderlayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(borderlayout, "100%");
+ ZKUpdateUtil.setHeight(borderlayout, "100%");
calendars = (Calendars) component.getFellow("cal");
calendars.setModel(scm);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPGoogleCalendar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPGoogleCalendar.java
index f474c2e6b8..f3c196cfca 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPGoogleCalendar.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPGoogleCalendar.java
@@ -13,6 +13,7 @@
*****************************************************************************/
package org.adempiere.webui.dashboard;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zul.Iframe;
/**
@@ -32,8 +33,8 @@ public class DPGoogleCalendar extends DashboardPanel {
super();
Iframe iframe = new Iframe("http://www.google.com/calendar/embed?showTitle=0&showTabs=0&height=300&wkst=1&bgcolor=%23FFFFFF&color=%232952A3");
- iframe.setWidth("300px");
- iframe.setHeight("310px");
+ ZKUpdateUtil.setWidth(iframe, "300px");
+ ZKUpdateUtil.setHeight(iframe, "310px");
this.appendChild(iframe);
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java
index 3767892cf6..0345856c2f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java
@@ -22,6 +22,7 @@ import org.adempiere.base.event.EventManager;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ServerPushTemplate;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MQuery;
import org.compiere.model.MRecentItem;
import org.compiere.model.MRole;
@@ -92,7 +93,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener= maxri)
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java
index 83e220b5e7..00c8ce025e 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRunningJobs.java
@@ -23,6 +23,7 @@ import org.adempiere.base.event.EventManager;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ServerPushTemplate;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MPInstance;
import org.compiere.model.MProcess;
import org.compiere.model.Query;
@@ -83,7 +84,7 @@ public class DPRunningJobs extends DashboardPanel implements EventListener {
Properties ctx = Env.getCtx();
setTitle(Msg.getMsg(ctx,"Event"));
setAttribute(Window.MODE_KEY, Window.MODE_POPUP);
- setWidth("400px");
- setHeight("310px");
+ ZKUpdateUtil.setWidth(this, "400px");
+ ZKUpdateUtil.setHeight(this, "310px");
this.setBorder("normal");
this.setClosable(true);
@@ -80,16 +81,16 @@ public class EventWindow extends Window implements EventListener {
txtContent = new Textbox();
txtContent.setRows(5);
- txtContent.setWidth("95%");
- txtContent.setHeight("100%");
+ ZKUpdateUtil.setWidth(txtContent, "95%");
+ ZKUpdateUtil.setHeight(txtContent, "100%");
txtContent.setReadonly(true);
txtHeaderColor = new Textbox();
- txtHeaderColor.setWidth("50px");
+ ZKUpdateUtil.setWidth(txtHeaderColor, "50px");
txtHeaderColor.setReadonly(true);
txtContentColor = new Textbox();
- txtContentColor.setWidth("50px");
+ ZKUpdateUtil.setWidth(txtContentColor, "50px");
txtContentColor.setReadonly(true);
confirmPanel = new ConfirmPanel(false, false, false, false, false, true);
@@ -106,7 +107,7 @@ public class EventWindow extends Window implements EventListener {
column = new Column();
columns.appendChild(column);
- column.setWidth("250px");
+ ZKUpdateUtil.setWidth(column, "250px");
Rows rows = new Rows();
grid.appendChild(rows);
@@ -142,8 +143,8 @@ public class EventWindow extends Window implements EventListener {
Center center = new Center();
borderlayout.appendChild(center);
center.appendChild(grid);
- grid.setVflex("1");
- grid.setHflex("1");
+ ZKUpdateUtil.setVflex(grid, "1");
+ ZKUpdateUtil.setHflex(grid, "1");
South south = new South();
borderlayout.appendChild(south);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java
index f9cf86bdd0..7f0d70d2ff 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java
@@ -31,6 +31,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
@@ -86,7 +87,7 @@ public class RequestWindow extends Window implements EventListener {
Properties ctx = Env.getCtx();
setTitle(Msg.getMsg(Env.getCtx(),"Event"));
setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
- setWidth("400px");
+ ZKUpdateUtil.setWidth(this, "400px");
this.setSclass("popup-dialog");
this.setBorder("normal");
this.setShadow(true);
@@ -158,8 +159,8 @@ public class RequestWindow extends Window implements EventListener {
txtSummary = new Textbox();
txtSummary.setRows(3);
- txtSummary.setWidth("95%");
- txtSummary.setHeight("100%");
+ ZKUpdateUtil.setWidth(txtSummary, "95%");
+ ZKUpdateUtil.setHeight(txtSummary, "100%");
dbxStartPlan = new Datebox();
dbxCompletePlan = new Datebox();
@@ -181,7 +182,7 @@ public class RequestWindow extends Window implements EventListener {
column = new Column();
columns.appendChild(column);
- column.setWidth("250px");
+ ZKUpdateUtil.setWidth(column, "250px");
Rows rows = new Rows();
grid.appendChild(rows);
@@ -236,18 +237,18 @@ public class RequestWindow extends Window implements EventListener {
rows.appendChild(row);
row.appendChild(lblStartTime.rightAlign());
row.appendChild(tbxStartTime);
- tbxStartTime.setWidth("40%");
+ ZKUpdateUtil.setWidth(tbxStartTime, "40%");
row = new Row();
rows.appendChild(row);
row.appendChild(lblEndTime.rightAlign());
row.appendChild(tbxEndTime);
- tbxEndTime.setWidth("40%");
+ ZKUpdateUtil.setWidth(tbxEndTime, "40%");
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
- borderlayout.setHflex("1");
- borderlayout.setVflex("min");
+ ZKUpdateUtil.setHflex(borderlayout, "1");
+ ZKUpdateUtil.setVflex(borderlayout, "min");
North northPane = new North();
northPane.setSclass("dialog-content");
@@ -255,8 +256,8 @@ public class RequestWindow extends Window implements EventListener {
borderlayout.appendChild(northPane);
northPane.appendChild(grid);
- grid.setVflex("1");
- grid.setHflex("1");
+ ZKUpdateUtil.setVflex(grid, "1");
+ ZKUpdateUtil.setHflex(grid, "1");
South southPane = new South();
southPane.setSclass("dialog-footer");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java
index 37175c593c..7b87d3256d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java
@@ -40,6 +40,7 @@ import org.adempiere.webui.factory.IDashboardGadgetFactory;
import org.adempiere.webui.report.HTMLExtension;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.ZkReportViewerProvider;
import org.compiere.model.I_AD_Menu;
import org.compiere.model.MChart;
@@ -106,8 +107,8 @@ public class DashboardController implements EventListener {
public DashboardController() {
dashboardLayout = new Anchorlayout();
dashboardLayout.setSclass("dashboard-layout");
- dashboardLayout.setVflex("1");
- dashboardLayout.setHflex("1");
+ ZKUpdateUtil.setVflex(dashboardLayout, "1");
+ ZKUpdateUtil.setHflex(dashboardLayout, "1");
maximizedHolder = new Anchorchildren();
maximizedHolder.setAnchor("100% 100%");
@@ -176,7 +177,7 @@ public class DashboardController implements EventListener {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
- dashboardColumnLayout.setHflex("1");
+ ZKUpdateUtil.setHflex(dashboardColumnLayout, "1");
currentColumnNo = columnNo;
}
@@ -388,7 +389,7 @@ public class DashboardController implements EventListener {
//set normal height
if (height == 0) {
height = width * 85 / 100;
- chartPanel.setHeight(height+"px");
+ ZKUpdateUtil.setHeight(chartPanel, height+"px");
}
chartPanel.getChildren().clear();
ChartModel model = new ChartModel();
@@ -419,13 +420,13 @@ public class DashboardController implements EventListener {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
- dashboardColumnLayout.setWidth("100%");
+ ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
}
else if (isShowInDashboard)
{
// additional column
dashboardColumnLayout = new Vlayout();
- dashboardColumnLayout.setWidth("100%");
+ ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
dashboardColumnLayout.setAttribute("ColumnNo", currentColumnNo + 1);
dashboardColumnLayout.setAttribute("IsShowInDashboard", isShowInDashboard);
dashboardColumnLayout.setAttribute("IsAdditionalColumn", true);
@@ -436,7 +437,7 @@ public class DashboardController implements EventListener {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
- dashboardColumnLayout.setWidth("100%");
+ ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
}
}
catch (Exception e)
@@ -493,8 +494,8 @@ public class DashboardController implements EventListener {
}
panel.setSclass("dashboard-widget");
//following 2 line needed for restore to size the panel correctly
- panel.setWidth(null);
- panel.setHeight(null);
+ ZKUpdateUtil.setWidth(panel, null);
+ ZKUpdateUtil.setHeight(panel, null);
}
}
else if(eventName.equals(Events.ON_CLICK))
@@ -699,7 +700,7 @@ public class DashboardController implements EventListener {
dashboardColumn.appendChild(dashboardColumnLayout);
columnList.add(dashboardColumn);
dashboardLayout.appendChild(dashboardColumn);
- dashboardColumnLayout.setWidth("100%");
+ ZKUpdateUtil.setWidth(dashboardColumnLayout, "100%");
dashboardLayout.invalidate();
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java
index 1d0f7dc6b0..1222803584 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java
@@ -55,6 +55,7 @@ import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.IServerPushCallback;
import org.adempiere.webui.util.ServerPushTemplate;
import org.adempiere.webui.util.UserPreference;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.Adempiere;
import org.compiere.model.GridField;
@@ -270,16 +271,16 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
int eWidth = Integer.valueOf(eastWidth.replace("px", ""));
if( eWidth + wWidth <= browserWidth ){
- w.setWidth(westWidth);
- e.setWidth(eastWidth);
+ ZKUpdateUtil.setWidth(w, westWidth);
+ ZKUpdateUtil.setWidth(e, eastWidth);
}
}
else if ( westWidth != null )
- w.setWidth(westWidth);
+ ZKUpdateUtil.setWidth(w, westWidth);
else if ( eastWidth != null )
- e.setWidth(eastWidth);
+ ZKUpdateUtil.setWidth(e, eastWidth);
}
boolean helpCollapsed= pref.isPropertyBool(UserPreference.P_HELP_COLLAPSED);
@@ -603,7 +604,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
{
headerPopup = new Window();
headerPopup.setSclass("desktop-header-popup");
- headerPopup.setVflex("true");
+ ZKUpdateUtil.setVflex(headerPopup, "true");
headerPopup.setVisible(false);
headerPopup.addEventListener(Events.ON_OPEN, new EventListener() {
@Override
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java
index 72cd179aa1..01c897f2b2 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java
@@ -30,6 +30,7 @@ import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.part.WindowContainer;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.WTask;
import org.compiere.model.MInfoWindow;
@@ -221,12 +222,12 @@ public abstract class TabbedDesktop extends AbstractDesktop {
*/
private void addWin(Iframe fr, String title, boolean closeable)
{
- fr.setWidth("100%");
- fr.setHeight("100%");
+ ZKUpdateUtil.setWidth(fr, "100%");
+ ZKUpdateUtil.setHeight(fr, "100%");
fr.setStyle("padding: 0; margin: 0; border: none; position: absolute");
Window window = new Window();
- window.setWidth("100%");
- window.setHeight("100%");
+ ZKUpdateUtil.setWidth(window, "100%");
+ ZKUpdateUtil.setHeight(window, "100%");
window.setStyle("padding: 0; margin: 0; border: none");
window.appendChild(fr);
window.setStyle("position: absolute");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java
index bc499305bb..0abbaf377e 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java
@@ -36,6 +36,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WFieldRecordInfo;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
@@ -162,7 +163,7 @@ public abstract class WEditor implements EventListener, PropertyChangeLis
this.setComponent(comp);
this.gridField = gridField;
if (gridField.getGridTab() != null) {
- comp.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, gridField.getGridTab().getTableName()+"0"+gridField.getColumnName());
+ comp.setClientAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, gridField.getGridTab().getTableName()+"0"+gridField.getColumnName());
this.gridTab = gridField.getGridTab();
} else {
comp.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, gridField.getColumnName());
@@ -556,20 +557,20 @@ public abstract class WEditor implements EventListener, PropertyChangeLis
}
} else if (getComponent() instanceof Image) {
Image image = (Image) getComponent();
- image.setWidth("24px");
- image.setHeight("24px");
+ ZKUpdateUtil.setWidth(image, "24px");
+ ZKUpdateUtil.setHeight(image, "24px");
} else {
if (!tableEditor) {
if (getComponent() instanceof InputElement) {
- ((InputElement)getComponent()).setHflex("1");
+ ZKUpdateUtil.setHflex((InputElement)getComponent(), "1");
} else {
- ((HtmlBasedComponent)getComponent()).setWidth(width);
+ ZKUpdateUtil.setWidth((HtmlBasedComponent)getComponent(), width);
}
} else {
if (getComponent() instanceof Combobox) {
LayoutUtils.addSclass("grid-combobox-editor", (HtmlBasedComponent)getComponent());
} else {
- ((HtmlBasedComponent)getComponent()).setWidth(width);
+ ZKUpdateUtil.setWidth((HtmlBasedComponent)getComponent(), width);
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java
index f2e62e26a0..67930b3088 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WStringEditor.java
@@ -30,6 +30,7 @@ import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WFieldRecordInfo;
import org.adempiere.webui.window.WTextEditorDialog;
import org.compiere.model.GridField;
@@ -138,7 +139,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
getComponent().setMultiline(false);
getComponent().setRows(gridField.getNumLines() <= 0 || tableEditor ? 1 : gridField.getNumLines());
if (getComponent().getRows() > 1)
- getComponent().setHeight("100%");
+ ZKUpdateUtil.setHeight(getComponent(), "100%");
if (getComponent() instanceof Textbox)
((Textbox)getComponent()).setObscureType(obscureType);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java
index 2e42ae27cb..5f100f6a5e 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java
@@ -33,6 +33,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.grid.WQuickEntry;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WFieldRecordInfo;
import org.adempiere.webui.window.WLocationDialog;
import org.compiere.model.GridField;
@@ -147,7 +148,7 @@ ContextMenuListener, IZoomableEditor
private void init()
{
- getComponent().setWidth("200px");
+ ZKUpdateUtil.setWidth(getComponent(), "200px");
getComponent().setAutocomplete(true);
getComponent().setAutodrop(true);
getComponent().addEventListener(Events.ON_BLUR, this);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java
index b1383721c5..b3107baf55 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java
@@ -28,6 +28,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WLocationEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MBPartner;
import org.compiere.model.MBPartnerLocation;
@@ -140,14 +141,14 @@ public class WBPartner extends Window implements EventListener, ValueChan
void jbInit() throws Exception
{
- this.setWidth("350px");
+ ZKUpdateUtil.setWidth(this, "350px");
this.setBorder("normal");
this.setClosable(true);
this.setSizable(true);
this.setTitle("Business Partner");
this.appendChild(centerPanel);
this.appendChild(confirmPanel);
- centerPanel.setWidth("100%");
+ ZKUpdateUtil.setWidth(confirmPanel, "100%");
confirmPanel.addActionListener(Events.ON_CLICK, this);
@@ -239,17 +240,17 @@ public class WBPartner extends Window implements EventListener, ValueChan
{
Hlayout layout = new Hlayout();
- layout.setHflex("10");
+ ZKUpdateUtil.setHflex(layout, "10");
Label label = new Label(Msg.translate(Env.getCtx(), title));
Span span = new Span();
- span.setHflex("3");
+ ZKUpdateUtil.setHflex(span, "3");
layout.appendChild(span);
span.appendChild(label);
label.setSclass("field-label");
layout.appendChild(field);
- ((HtmlBasedComponent)field).setHflex("7");
+ ZKUpdateUtil.setHflex((HtmlBasedComponent)field, "7");
centerPanel.appendChild(layout);
centerPanel.appendChild(new Separator());
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java
index ab54af0d06..5cfa106013 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java
@@ -28,6 +28,7 @@ import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
@@ -135,13 +136,13 @@ public class WQuickEntry extends Window implements EventListener, ValueCh
private void jbInit() throws Exception
{
- this.setWidth("350px");
+ ZKUpdateUtil.setWidth(this, "350px");
this.setBorder("normal");
this.setClosable(true);
this.setSizable(true);
this.appendChild(centerPanel);
this.appendChild(confirmPanel);
- centerPanel.setWidth("100%");
+ ZKUpdateUtil.setWidth(centerPanel, "100%");
confirmPanel.addActionListener(Events.ON_CLICK, this);
}
@@ -214,18 +215,18 @@ public class WQuickEntry extends Window implements EventListener, ValueCh
Component field = editor.getComponent();
Hlayout layout = new Hlayout();
- layout.setHflex("10");
+ ZKUpdateUtil.setHflex(layout, "10");
Span span = new Span();
if(parent_WindowNo!= 0)
- span.setHflex("3");
+ ZKUpdateUtil.setHflex(span, "3");
layout.appendChild(span);
Label label = editor.getLabel();
span.appendChild(label);
label.setSclass("field-label");
layout.appendChild(field);
- ((HtmlBasedComponent)field).setHflex("7");
+ ZKUpdateUtil.setHflex((HtmlBasedComponent)field, "7");
//editor.setValue("Y");
centerPanel.appendChild(layout);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java
index 0c342d5468..ff600abc55 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java
@@ -29,6 +29,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.panel.InfoPAttributeInstancePanel;
import org.adempiere.webui.panel.InvoiceHistory;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.model.MDocType;
import org.compiere.model.MRole;
@@ -236,7 +237,7 @@ public class InfoProductWindow extends InfoWindow {
// productpriceTbl.getModel().addTableModelListener(this);
tabbedPane = new Tabbox();
- tabbedPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(tabbedPane, "100%");
Tabpanels tabPanels = new Tabpanels();
tabbedPane.appendChild(tabPanels);
Tabs tabs = new Tabs();
@@ -245,41 +246,41 @@ public class InfoProductWindow extends InfoWindow {
Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Warehouse")));
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(warehouseTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Description"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
fieldDescription = new Textbox();
fieldDescription.setMultiline(true);
fieldDescription.setReadonly(true);
- fieldDescription.setHflex("1");
- fieldDescription.setWidth("99%");
- fieldDescription.setHeight("99%");
+ ZKUpdateUtil.setHflex(fieldDescription, "1");
+ ZKUpdateUtil.setWidth(fieldDescription, "99%");
+ ZKUpdateUtil.setHeight(fieldDescription, "99%");
desktopTabPanel.appendChild(fieldDescription);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Substitute_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(substituteTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(relatedTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.getMsg(Env.getCtx(), "ATP"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(m_tableAtp);
// IDEMPIERE-1692
chbShowDetailAtp = new Checkbox();
@@ -302,15 +303,15 @@ public class InfoProductWindow extends InfoWindow {
tab = new Tab(Msg.translate(Env.getCtx(), "Price"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(productpriceTbl);
tabPanels.appendChild(desktopTabPanel);
//
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 90 / 100;
contentBorderLayout = new Borderlayout();
- contentBorderLayout.setWidth("100%");
- contentBorderLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentBorderLayout, "100%");
+ ZKUpdateUtil.setHeight(contentBorderLayout, "100%");
if (isLookup())
contentBorderLayout.setStyle("border: none; position: relative; ");
else
@@ -320,7 +321,7 @@ public class InfoProductWindow extends InfoWindow {
contentBorderLayout.getCenter().setAutoscroll(false);
South south = new South();
int detailHeight = (height * 25 / 100);
- south.setHeight(detailHeight + "px");
+ ZKUpdateUtil.setHeight(south, detailHeight + "px");
south.setCollapsible(true);
south.setSplittable(true);
south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
@@ -338,8 +339,8 @@ public class InfoProductWindow extends InfoWindow {
contentBorderLayout.appendChild(south);
tabbedPane.setSclass("info-product-tabbedpane");
south.appendChild(tabbedPane);
- tabbedPane.setVflex("1");
- tabbedPane.setHflex("1");
+ ZKUpdateUtil.setVflex(tabbedPane, "1");
+ ZKUpdateUtil.setHflex(tabbedPane, "1");
center.appendChild(contentBorderLayout);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java
index 164d519e5f..80055622ee 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java
@@ -52,6 +52,7 @@ import org.adempiere.webui.grid.WQuickEntry;
import org.adempiere.webui.panel.InfoPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.EmbedWinInfo;
@@ -578,7 +579,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
if (relatedInfoList.length > 0) { // setup the panel
//embeddedPane.setTitle(Msg.translate(Env.getCtx(), "Related Information"));
- embeddedPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(embeddedPane, "100%");
//tabPanels = new Tabpanels();
embeddedPane.appendChild(tabPanels);
//tabs = new Tabs();
@@ -623,7 +624,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
embeddedTbl.autoSize();
embeddedTbl.getModel().addTableModelListener(this);
- embeddedTbl.setVflex("1");
+ ZKUpdateUtil.setVflex(embeddedTbl, "1");
//Xolali - add embeddedTbl to list, add m_sqlembedded to list
@@ -640,7 +641,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
//desktopTabPanel.
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(embeddedTbl);
tabPanels.appendChild(desktopTabPanel);
}
@@ -1088,8 +1089,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
{
setTitle(infoWindow.get_Translation("Name"));
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -1097,10 +1098,10 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
this.appendChild(layout);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
contentPanel.setSizedByContent(true);
contentPanel.setSpan(true);
@@ -1141,7 +1142,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
protected void renderFooter(South south) {
southBody = new Vbox();
- southBody.setHflex("1");
+ ZKUpdateUtil.setHflex(southBody, "1");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
@@ -1156,13 +1157,13 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
protected void renderContentPane(Center center) {
Div div = new Div();
div.setStyle("width :100%; height: 100%");
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
div.appendChild(contentPanel);
Borderlayout inner = new Borderlayout();
- inner.setWidth("100%");
- inner.setHeight("100%");
+ ZKUpdateUtil.setWidth(inner, "100%");
+ ZKUpdateUtil.setHeight(inner, "100%");
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 90 / 100;
if (isLookup())
inner.setStyle("border: none; position: relative; ");
@@ -1175,7 +1176,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
if (embeddedWinList.size() > 0) {
South south = new South();
int detailHeight = (height * 25 / 100);
- south.setHeight(detailHeight + "px");
+ ZKUpdateUtil.setHeight(south, detailHeight + "px");
south.setAutoscroll(true);
south.setCollapsible(true);
south.setSplittable(true);
@@ -1196,8 +1197,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
//south.sets
inner.appendChild(south);
embeddedPane.setSclass("info-product-tabbedpane");
- embeddedPane.setVflex("1");
- embeddedPane.setHflex("1");
+ ZKUpdateUtil.setVflex(embeddedPane, "1");
+ ZKUpdateUtil.setHflex(embeddedPane, "1");
south.appendChild(embeddedPane);
@@ -1221,7 +1222,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
columns.appendChild(new Column());
Column column = new Column();
- column.setWidth("100px");
+ ZKUpdateUtil.setWidth(column, "100px");
column.setAlign("right");
columns.appendChild(column);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java
index 237b4d6525..c90009f84f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java
@@ -45,6 +45,7 @@ import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.util.ReaderInputStream;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.MultiFileDownloadDialog;
import org.apache.commons.io.FileUtils;
@@ -80,8 +81,8 @@ public class WTranslationDialog extends TranslationController implements IFormCo
zkInit();
dynInit();
Borderlayout contentLayout = new Borderlayout();
- contentLayout.setWidth("100%");
- contentLayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(contentLayout, "100%");
+ ZKUpdateUtil.setHeight(contentLayout, "100%");
form.appendChild(contentLayout);
Center center = new Center();
contentLayout.appendChild(center);
@@ -91,7 +92,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo
contentLayout.appendChild(south);
south.appendChild(statusBar);
LayoutUtils.addSclass("status-border", statusBar);
- south.setHeight("22px");
+ ZKUpdateUtil.setHeight(south, "22px");
}
catch(Exception e)
{
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java
index 8ea1a2a8b4..00e8985dd1 100755
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java
@@ -24,6 +24,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.exception.ApplicationException;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridTab;
import org.compiere.model.MForm;
import org.compiere.model.X_AD_CtxHelp;
@@ -76,8 +77,8 @@ public abstract class ADForm extends Window implements EventListener, IHe
{
m_WindowNo = SessionManager.getAppDesktop().registerWindow(this);
- this.setWidth("100%");
- this.setHeight("95%");
+ ZKUpdateUtil.setWidth(this, "100%");
+ ZKUpdateUtil.setHeight(this, "95%");
this.setStyle("position:absolute");
this.setContentSclass("adform-content");
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java
index b762e9c4ba..073a8cd5e4 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java
@@ -26,6 +26,7 @@ import org.adempiere.webui.adwindow.ADWindow;
import org.adempiere.webui.exception.ApplicationException;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MMenu;
import org.compiere.model.MQuery;
import org.compiere.model.MTree;
@@ -90,12 +91,12 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener
ConfirmPanel pnlButtons = new ConfirmPanel(true);
pnlButtons.addActionListener(this);
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
- pnlButtons.setWidth(null);
+ ZKUpdateUtil.setWidth(pnlButtons, null);
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
pnlButtons.getButton(ConfirmPanel.A_CANCEL).setSclass(ITheme.LOGIN_BUTTON_CLASS);
div.appendChild(pnlButtons);
@@ -229,7 +230,7 @@ public class ChangePasswordPanel extends Window implements EventListener
lstSecurityQuestion.setAutocomplete(true);
lstSecurityQuestion.setAutodrop(true);
lstSecurityQuestion.setId("lstSecurityQuestion");
- lstSecurityQuestion.setWidth("220px");
+ ZKUpdateUtil.setWidth(lstSecurityQuestion, "220px");
lstSecurityQuestion.getItems().clear();
for (int i = 1; i <= ResetPasswordPanel.NO_OF_SECURITY_QUESTION; i++)
@@ -239,25 +240,25 @@ public class ChangePasswordPanel extends Window implements EventListener
txtOldPassword.setId("txtOldPassword");
txtOldPassword.setType("password");
txtOldPassword.setCols(25);
- txtOldPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtOldPassword, "220px");
txtNewPassword = new Textbox();
txtNewPassword.setId("txtNewPassword");
txtNewPassword.setType("password");
txtNewPassword.setCols(25);
- txtNewPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtNewPassword, "220px");
txtRetypeNewPassword = new Textbox();
txtRetypeNewPassword.setId("txtRetypeNewPassword");
txtRetypeNewPassword.setType("password");
txtRetypeNewPassword.setCols(25);
- txtRetypeNewPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px");
txtAnswer = new Textbox();
txtAnswer.setId("txtAnswer");
// txtAnswer.setType("password");
txtAnswer.setCols(25);
- txtAnswer.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtAnswer, "220px");
}
public void onEvent(Event event)
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java
index bac23e419c..ae0c13b930 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java
@@ -40,6 +40,7 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.I_AD_Field;
import org.compiere.model.MField;
@@ -144,8 +145,8 @@ public class CustomizeGridViewPanel extends Panel
noLabel.setValue(Msg.getMsg(Env.getCtx(), "Available"));
yesLabel.setValue(Msg.getMsg(Env.getCtx(), "Selected"));
- yesList.setVflex(true);
- noList.setVflex(true);
+ ZKUpdateUtil.setVflex(yesList, true);
+ ZKUpdateUtil.setVflex(noList, true);
EventListener mouseListener = new EventListener()
{
@@ -233,16 +234,16 @@ public class CustomizeGridViewPanel extends Panel
Hlayout hlayout = new Hlayout();
- hlayout.setVflex("true");
- hlayout.setHflex("true");
+ ZKUpdateUtil.setVflex(hlayout, "true");
+ ZKUpdateUtil.setHflex(hlayout, "true");
hlayout.setStyle("margin: auto; margin-top: 2px;");
- noList.setHflex("1");
- noList.setVflex(true);
+ ZKUpdateUtil.setHflex(noList, "1");
+ ZKUpdateUtil.setVflex(noList, true);
hlayout.appendChild(noList);
- yesList.setVflex(true);
- yesList.setHflex("1");
+ ZKUpdateUtil.setVflex(yesList, true);
+ ZKUpdateUtil.setHflex(yesList, "1");
hlayout.appendChild(yesList);
center.appendChild(hlayout);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/FooterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/FooterPanel.java
index 768de4e100..f48f56b533 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/FooterPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/FooterPanel.java
@@ -20,6 +20,7 @@ package org.adempiere.webui.panel;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.zkoss.zul.Separator;
/**
@@ -48,7 +49,7 @@ public class FooterPanel extends Window
{
label.setValue("2007 Posterita Limited");
- panel.setWidth("100%");
+ ZKUpdateUtil.setWidth(panel, "100%");
panel.setStyle("text-align:center");
panel.appendChild(label);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java
index 35645176c3..94d5ad4f73 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java
@@ -21,6 +21,7 @@ import org.adempiere.webui.apps.GlobalSearch;
import org.adempiere.webui.apps.MenuSearchController;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.AboutWindow;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@@ -80,8 +81,8 @@ public class HeaderPanel extends Panel implements EventListener
popMenu.setId("menuTreePopup");
menuTreePanel = new MenuTreePanel(popMenu);
popMenu.setSclass("desktop-menu-popup");
- popMenu.setHeight("90%");
- popMenu.setWidth("600px");
+ ZKUpdateUtil.setHeight(popMenu, "90%");
+ ZKUpdateUtil.setWidth(popMenu, "600px");
popMenu.setPage(this.getPage());
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java
index 8b9bea18c7..1991f727ca 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java
@@ -17,6 +17,7 @@ package org.adempiere.webui.panel;
import java.util.Properties;
import org.adempiere.webui.desktop.IDesktop;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.MCtxHelpMsg;
@@ -56,8 +57,8 @@ public class HelpController
{
dashboardLayout = new Anchorlayout();
dashboardLayout.setSclass("dashboard-layout");
- dashboardLayout.setVflex("1");
- dashboardLayout.setHflex("1");
+ ZKUpdateUtil.setVflex(dashboardLayout, "1");
+ ZKUpdateUtil.setHflex(dashboardLayout, "1");
}
public void render(Component parent, IDesktop desktopImpl)
@@ -69,7 +70,7 @@ public class HelpController
parent.appendChild(dashboardLayout);
Vlayout dashboardColumnLayout = new Vlayout();
- dashboardColumnLayout.setHflex("1");
+ ZKUpdateUtil.setHflex(dashboardColumnLayout, "1");
Anchorchildren dashboardColumn = new Anchorchildren();
dashboardColumn.setAnchor("95% 100%");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java
index 1576cb398f..9fad6921e4 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java
@@ -34,6 +34,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookupFactory;
@@ -154,8 +155,8 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
private void statInit()
{
- fieldValue.setHflex("1");
- fieldName.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldValue, "1");
+ ZKUpdateUtil.setHflex(fieldName, "1");
labelValue.setValue(Msg.getMsg(Env.getCtx(), "Value"));
fieldValue.addEventListener(Events.ON_CHANGE, this);
@@ -193,8 +194,8 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
row.appendChild(fProduct_ID.getComponent());
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -210,19 +211,19 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java
index aa46bcfb20..24554e68bb 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java
@@ -37,11 +37,14 @@ import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MQuery;
+
import static org.compiere.model.SystemIDs.*;
+
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@@ -192,8 +195,8 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener
private void init()
{
- fieldValue.setHflex("1");
- fieldContact.setHflex("1");
- fieldPhone.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldValue, "1");
+ ZKUpdateUtil.setHflex(fieldContact, "1");
+ ZKUpdateUtil.setHflex(fieldPhone, "1");
- fieldName.setHflex("1");
- fieldEMail.setHflex("1");
- fieldPostal.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldName, "1");
+ ZKUpdateUtil.setHflex(fieldEMail, "1");
+ ZKUpdateUtil.setHflex(fieldPostal, "1");
Grid grid = GridFactory.newGridLayout();
grid.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "infoParameterPanel");
@@ -244,8 +245,8 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener
row.appendChild(checkAND);
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -261,19 +262,19 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setHflex("1");
+ ZKUpdateUtil.setHflex(southBody, "1");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java
index 516dec0b53..fbb453126a 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java
@@ -37,6 +37,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookupFactory;
@@ -182,11 +183,11 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
private void statInit() throws Exception
{
- fName.setWidth("180px");
- fDateFrom.setWidth("165px");
- fDateTo.setWidth("165px");
- fAmtFrom.setWidth("180px");
- fAmtTo.setWidth("180px");
+ ZKUpdateUtil.setWidth(fName, "180px");
+ ZKUpdateUtil.setWidth(fDateFrom, "165px");
+ ZKUpdateUtil.setWidth(fDateTo, "165px");
+ ZKUpdateUtil.setWidth(fAmtFrom, "180px");
+ ZKUpdateUtil.setWidth(fAmtTo, "180px");
fName.addEventListener(Events.ON_CHANGE, this);
@@ -250,8 +251,8 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
rows.appendChild(row);
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -267,19 +268,19 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java
index fa3fa9a672..40e108ae7b 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java
@@ -32,6 +32,7 @@ import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
@@ -155,20 +156,20 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener
rows.appendChild(row);
row.appendChild(lbl1.rightAlign());
row.appendChild(txt1);
- txt1.setHflex("1");
+ ZKUpdateUtil.setHflex(txt1, "1");
row.appendChild(lbl2.rightAlign());
row.appendChild(txt2);
- txt2.setHflex("1");
+ ZKUpdateUtil.setHflex(txt2, "1");
row.appendChild(lbl3.rightAlign());
row.appendChild(txt3);
- txt3.setHflex("1");
+ ZKUpdateUtil.setHflex(txt3, "1");
row.appendChild(lbl4.rightAlign());
row.appendChild(txt4);
- txt4.setHflex("1");
+ ZKUpdateUtil.setHflex(txt4, "1");
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -184,20 +185,20 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
contentPanel.setSizedByContent(true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java
index ec0fa70e77..f67bb7bb20 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java
@@ -38,6 +38,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookupFactory;
@@ -168,11 +169,11 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
private void statInit() throws Exception
{
- fDocumentNo.setHflex("1");
- fDescription.setHflex("1");
- fPOReference.setHflex("1");
- fDateFrom.setWidth("165px");
- fDateTo.setWidth("165px");
+ ZKUpdateUtil.setHflex(fDocumentNo, "1");
+ ZKUpdateUtil.setHflex(fDescription, "1");
+ ZKUpdateUtil.setHflex(fPOReference, "1");
+ ZKUpdateUtil.setWidth(fDateFrom, "165px");
+ ZKUpdateUtil.setWidth(fDateTo, "165px");
fDocumentNo.addEventListener(Events.ON_CHANGE, this);
fDescription.addEventListener(Events.ON_CHANGE, this);
@@ -224,8 +225,8 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
rows.appendChild(row);
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -241,19 +242,19 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java
index f7b95c7f3d..3665f1dc03 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java
@@ -39,6 +39,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookup;
@@ -201,7 +202,7 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
editorBPartner = new WSearchEditor(lookupBP, Msg.translate(
Env.getCtx(), "C_BPartner_ID"), "", false, false, true);
editorBPartner.addValueChangeListener(this);
- editorBPartner.getComponent().setHflex("1");
+ ZKUpdateUtil.setHflex(editorBPartner.getComponent(), "1");
editorBPartner.getComponent().setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "bpartnerLookup");
MLookup lookupOrder = MLookupFactory.get(Env.getCtx(), p_WindowNo,
@@ -209,18 +210,18 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
editorOrder = new WSearchEditor(lookupOrder, Msg.translate(
Env.getCtx(), "C_Order_ID"), "", false, false, true);
editorOrder.addValueChangeListener(this);
- editorOrder.getComponent().setHflex("1");
+ ZKUpdateUtil.setHflex(editorOrder.getComponent(), "1");
editorOrder.getComponent().setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "orderLookup");
}
private void init()
{
- txtDocumentNo.setHflex("1");
- txtDescription.setHflex("1");
- dateFrom.setWidth("165px");
- dateTo.setWidth("165px");
- amountFrom.getDecimalbox().setWidth("155px");
- amountTo.getDecimalbox().setWidth("155px");
+ ZKUpdateUtil.setHflex(txtDocumentNo, "1");
+ ZKUpdateUtil.setHflex(txtDescription, "1");
+ ZKUpdateUtil.setWidth(dateFrom, "165px");
+ ZKUpdateUtil.setWidth(dateTo, "165px");
+ ZKUpdateUtil.setWidth(amountFrom.getDecimalbox(), "155px");
+ ZKUpdateUtil.setWidth(amountTo.getDecimalbox(), "155px");
Grid grid = GridFactory.newGridLayout();
@@ -259,8 +260,8 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
rows.appendChild(row);
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -276,19 +277,19 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java
index 45812c2a07..111bc79c8f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java
@@ -39,6 +39,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookup;
@@ -192,13 +193,13 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
public void init()
{
- txtDocumentNo.setHflex("1");
- txtDescription.setHflex("1");
- txtOrderRef.setHflex("1");
- dateFrom.setWidth("165px");
- dateTo.setWidth("165px");
- amountFrom.getDecimalbox().setWidth("155px");
- amountTo.getDecimalbox().setWidth("155px");
+ ZKUpdateUtil.setHflex(txtDocumentNo, "1");
+ ZKUpdateUtil.setHflex(txtDescription, "1");
+ ZKUpdateUtil.setHflex(txtOrderRef, "1");
+ ZKUpdateUtil.setWidth(dateFrom, "165px");
+ ZKUpdateUtil.setWidth(dateTo, "165px");
+ ZKUpdateUtil.setWidth(amountFrom.getDecimalbox(), "155px");
+ ZKUpdateUtil.setWidth(amountTo.getDecimalbox(), "155px");
Grid grid = GridFactory.newGridLayout();
@@ -236,8 +237,8 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
rows.appendChild(row);
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -253,19 +254,19 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java
index 1f9c9c9daa..8a819334d7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java
@@ -24,6 +24,7 @@ import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.WTableModelEvent;
import org.adempiere.webui.event.WTableModelListener;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.util.CLogger;
@@ -66,8 +67,8 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener
{
super();
setTitle(Msg.getMsg(Env.getCtx(), "PAttributeInstance"));
- setWidth("700px");
- setHeight("400px");
+ ZKUpdateUtil.setWidth(this, "700px");
+ ZKUpdateUtil.setHeight(this, "400px");
setSclass("popup-dialog");
init (M_Warehouse_ID, M_Locator_ID, M_Product_ID, C_BPartner_ID);
@@ -124,8 +125,8 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener
showAll.setText(Msg.getMsg(Env.getCtx(), "ShowAll"));
Borderlayout borderlayout = new Borderlayout();
- borderlayout.setHflex("1");
- borderlayout.setVflex("1");
+ ZKUpdateUtil.setHflex(borderlayout, "1");
+ ZKUpdateUtil.setVflex(borderlayout, "1");
this.appendChild(borderlayout);
North north = new North();
@@ -140,8 +141,8 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener
center.setAutoscroll(true);
borderlayout.appendChild(center);
center.appendChild(m_table);
- m_table.setVflex("1");
- m_table.setHflex("1");
+ ZKUpdateUtil.setVflex(m_table, "1");
+ ZKUpdateUtil.setHflex(m_table, "1");
South south = new South();
south.setSclass("dialog-footer");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java
index ceacf873a8..83e599922b 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java
@@ -32,6 +32,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.editor.WStringEditor;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MAttribute;
import org.compiere.model.MAttributeSet;
import org.compiere.model.MRole;
@@ -136,7 +137,7 @@ public class InfoPAttributePanel extends Window implements EventListener
this.appendChild(vbox);
Grid grid = new Grid();
- grid.setWidth("400px");
+ ZKUpdateUtil.setWidth(grid, "400px");
grid.setStyle("margin:0; padding:0;");
grid.makeNoStrip();
grid.setOddRowSclass("even");
@@ -172,7 +173,7 @@ public class InfoPAttributePanel extends Window implements EventListener
guaranteeDateSelection.setRows(0);
guaranteeDateSelection.setMultiple(false);
guaranteeDateSelection.setMold("select");
- guaranteeDateSelection.setWidth("150px");
+ ZKUpdateUtil.setWidth(guaranteeDateSelection, "150px");
guaranteeDateSelection.appendItem(s + " <", s + " <");
guaranteeDateSelection.appendItem(s + " =", s + " =");
guaranteeDateSelection.appendItem(s + " >", s + " >");
@@ -189,7 +190,7 @@ public class InfoPAttributePanel extends Window implements EventListener
div.appendChild(serNoLabel);
row.appendChild(div);
row.appendChild(serNoField.getComponent());
- serNoField.getComponent().setWidth("150px");
+ ZKUpdateUtil.setWidth(serNoField.getComponent(), "150px");
}
if (isLot) {
@@ -200,7 +201,7 @@ public class InfoPAttributePanel extends Window implements EventListener
div.appendChild(lotLabel);
row.appendChild(div);
row.appendChild(lotField.getComponent());
- lotField.getComponent().setWidth("150px");
+ ZKUpdateUtil.setWidth(lotField.getComponent(), "150px");
row = new Row();
rows.appendChild(row);
@@ -307,7 +308,7 @@ public class InfoPAttributePanel extends Window implements EventListener
field = new WStringEditor(name, false, false, true, 10, 40, null, null).getComponent();
}
- field.setWidth("96%");
+ ZKUpdateUtil.setWidth(field, "96%");
row.appendChild(field);
//
field.setId(String.valueOf(attribute_ID));
@@ -321,7 +322,7 @@ public class InfoPAttributePanel extends Window implements EventListener
if (MAttribute.ATTRIBUTEVALUETYPE_Number.equals(attributeValueType))
{
fieldTo = new WNumberEditor(name, false, false, true, DisplayType.Number, name).getComponent();
- ((NumberBox) fieldTo).setWidth("150px");
+ ZKUpdateUtil.setWidth(((NumberBox) fieldTo), "150px");
row = new Row();
rows.appendChild(row);
div = new Div();
@@ -455,7 +456,7 @@ public class InfoPAttributePanel extends Window implements EventListener
lotSelection.setRows(0);
lotSelection.setMultiple(false);
lotSelection.setMold("select");
- lotSelection.setWidth("150px");
+ ZKUpdateUtil.setWidth(lotSelection, "150px");
for(int i = 0; i < items.length; i++)
lotSelection.appendItem(items[i].getName(), items[i]);
} // initLotSelection
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java
index eb5fea8e16..9a4584251d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java
@@ -62,6 +62,7 @@ import org.adempiere.webui.factory.InfoManager;
import org.adempiere.webui.part.ITabOnSelectHandler;
import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.GridField;
@@ -275,23 +276,23 @@ public abstract class InfoPanel extends Window implements EventListener,
setClosable(true);
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 85 / 100;
int width = SessionManager.getAppDesktop().getClientInfo().desktopWidth * 80 / 100;
- setWidth(width + "px");
- setHeight(height + "px");
+ ZKUpdateUtil.setWidth(this, width + "px");
+ ZKUpdateUtil.setHeight(this, height + "px");
this.setContentStyle("overflow: auto");
}
else
{
setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
setBorder("none");
- setWidth("100%");
- setHeight("100%");
+ ZKUpdateUtil.setWidth(this, "100%");
+ ZKUpdateUtil.setHeight(this, "100%");
setStyle("position: absolute");
}
confirmPanel = new ConfirmPanel(true, true, true, true, true, true); // Elaine 2008/12/16
confirmPanel.addComponentsLeft(confirmPanel.createButton(ConfirmPanel.A_NEW));
confirmPanel.addActionListener(Events.ON_CLICK, this);
- confirmPanel.setHflex("1");
+ ZKUpdateUtil.setHflex(confirmPanel, "1");
// Elaine 2008/12/16
confirmPanel.getButton(ConfirmPanel.A_CUSTOMIZE).setVisible(hasCustomize());
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java
index 330ee22bc5..d04f3a1eb2 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java
@@ -38,6 +38,7 @@ import org.adempiere.webui.editor.WSearchEditor;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.event.WTableModelEvent;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MLookupFactory;
@@ -58,6 +59,8 @@ import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
import org.zkoss.zul.Vbox;
+import com.sun.corba.se.impl.oa.poa.AOMEntry;
+
/**
* Based on InfoPayment written by Jorg Janke
*
@@ -183,11 +186,11 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
private void statInit() throws Exception
{
- fDocumentNo.setHflex("1");
- fDateFrom.setWidth("165px");
- fDateTo.setWidth("165px");
- fAmtFrom.setWidth("180px");
- fAmtTo.setWidth("180px");
+ ZKUpdateUtil.setHflex(fDocumentNo, "1");
+ ZKUpdateUtil.setWidth(fDateFrom, "165px");
+ ZKUpdateUtil.setWidth(fDateTo, "165px");
+ ZKUpdateUtil.setWidth(fAmtFrom, "180px");
+ ZKUpdateUtil.setWidth(fAmtTo, "180px");
fDocumentNo.addEventListener(Events.ON_CHANGE, this);
@@ -232,8 +235,8 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
rows.appendChild(row);
layout = new Borderlayout();
- layout.setWidth("100%");
- layout.setHeight("100%");
+ ZKUpdateUtil.setWidth(layout, "100%");
+ ZKUpdateUtil.setHeight(layout, "100%");
if (!isLookup())
{
layout.setStyle("position: absolute");
@@ -249,19 +252,19 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup())
- contentPanel.setWidth("99%");
+ ZKUpdateUtil.setWidth(contentPanel, "99%");
else
contentPanel.setStyle("width: 99%; margin: 0px auto;");
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div);
- div.setVflex("1");
- div.setHflex("1");
+ ZKUpdateUtil.setVflex(div, "1");
+ ZKUpdateUtil.setHflex(div, "1");
South south = new South();
layout.appendChild(south);
southBody = new Vbox();
- southBody.setWidth("100%");
+ ZKUpdateUtil.setWidth(southBody, "100%");
south.appendChild(southBody);
southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java
index 032faecdd4..32ba5bf78a 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java
@@ -65,6 +65,7 @@ import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn;
import org.compiere.model.MDocType;
@@ -281,7 +282,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
pickPriceList.setRows(0);
pickPriceList.setMultiple(false);
pickPriceList.setMold("select");
- pickPriceList.setHflex("1");
+ ZKUpdateUtil.setHflex(pickPriceList, "1");
pickPriceList.addEventListener(Events.ON_SELECT, this);
pickPriceList.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "priceList");
@@ -290,7 +291,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
pickProductCategory.setRows(0);
pickProductCategory.setMultiple(false);
pickProductCategory.setMold("select");
- pickProductCategory.setHflex("1");
+ ZKUpdateUtil.setHflex(pickProductCategory, "1");
pickProductCategory.addEventListener(Events.ON_SELECT, this);
pickProductCategory.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "productCategory");
//
@@ -298,7 +299,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
pickAS.setRows(0);
pickAS.setMultiple(false);
pickAS.setMold("select");
- pickAS.setHflex("1");
+ ZKUpdateUtil.setHflex(pickAS, "1");
pickAS.addEventListener(Events.ON_SELECT, this);
pickAS.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "attributeSet");
@@ -306,13 +307,13 @@ public class InfoProductPanel extends InfoPanel implements EventListener
pickWarehouse.setRows(0);
pickWarehouse.setMultiple(false);
pickWarehouse.setMold("select");
- pickWarehouse.setHflex("1");
+ ZKUpdateUtil.setHflex(pickWarehouse, "1");
pickWarehouse.addEventListener(Events.ON_SELECT, this);
pickWarehouse.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "warehouse");
fieldVendor = new Textbox();
- contentPanel.setVflex(true);
+ ZKUpdateUtil.setVflex(contentPanel, true);
} // initComponents
private void init()
@@ -326,10 +327,10 @@ public class InfoProductPanel extends InfoPanel implements EventListener
rows.appendChild(row);
row.appendChild(lblValue.rightAlign());
row.appendChild(fieldValue);
- fieldValue.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldValue, "1");
row.appendChild(lblUPC.rightAlign());
row.appendChild(fieldUPC);
- fieldUPC.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldUPC, "1");
row.appendChild(lblWarehouse.rightAlign());
row.appendChild(pickWarehouse);
row.appendChild(m_InfoPAttributeButton);
@@ -337,14 +338,14 @@ public class InfoProductPanel extends InfoPanel implements EventListener
row = new Row();
row.appendCellChild(lblName.rightAlign());
row.appendCellChild(fieldName);
- fieldName.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldName, "1");
row.appendCellChild(lblSKU.rightAlign());
row.appendCellChild(fieldSKU);
- fieldSKU.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldSKU, "1");
row.appendCellChild(lblVendor.rightAlign());
row.appendCellChild(fieldVendor);
rows.appendChild(row);
- fieldVendor.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldVendor, "1");
//
@@ -361,7 +362,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
rows.appendChild(row);
row.appendCellChild(statusBar, 6);
statusBar.setEastVisibility(false);
- statusBar.setWidth("100%");
+ ZKUpdateUtil.setWidth(statusBar, "100%");
// Product Attribute Instance
m_PAttributeButton = confirmPanel.createButton(ConfirmPanel.A_PATTRIBUTE);
@@ -372,7 +373,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
// Elaine 2008/11/25
fieldDescription.setMultiline(true);
fieldDescription.setReadonly(true);
- fieldDescription.setHflex("1");
+ ZKUpdateUtil.setHflex(fieldDescription, "1");
//
ColumnInfo[] s_layoutWarehouse = new ColumnInfo[]{
@@ -451,7 +452,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
productpriceTbl.autoSize();
productpriceTbl.getModel().addTableModelListener(this);
- tabbedPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(tabbedPane, "100%");
Tabpanels tabPanels = new Tabpanels();
tabbedPane.appendChild(tabPanels);
Tabs tabs = new Tabs();
@@ -460,52 +461,52 @@ public class InfoProductPanel extends InfoPanel implements EventListener
Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Warehouse")));
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(warehouseTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Description"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
- fieldDescription.setWidth("99%");
- fieldDescription.setHeight("99%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
+ ZKUpdateUtil.setWidth(fieldDescription, "99%");
+ ZKUpdateUtil.setHeight(fieldDescription, "99%");
desktopTabPanel.appendChild(fieldDescription);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Substitute_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(substituteTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(relatedTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.getMsg(Env.getCtx(), "ATP"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(m_tableAtp);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Price"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
- desktopTabPanel.setHeight("100%");
+ ZKUpdateUtil.setHeight(desktopTabPanel, "100%");
desktopTabPanel.appendChild(productpriceTbl);
tabPanels.appendChild(desktopTabPanel);
//
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 90 / 100;
int width = SessionManager.getAppDesktop().getClientInfo().desktopWidth * 80 / 100;
- borderlayout.setWidth("100%");
- borderlayout.setHeight("100%");
+ ZKUpdateUtil.setWidth(borderlayout, "100%");
+ ZKUpdateUtil.setHeight(borderlayout, "100%");
if (isLookup())
borderlayout.setStyle("border: none; position: relative; ");
else
@@ -515,11 +516,11 @@ public class InfoProductPanel extends InfoPanel implements EventListener
center.setAutoscroll(false);
borderlayout.appendChild(center);
center.appendChild(contentPanel);
- contentPanel.setVflex("1");
- contentPanel.setHflex("1");
+ ZKUpdateUtil.setVflex(contentPanel, "1");
+ ZKUpdateUtil.setHflex(contentPanel, "1");
South south = new South();
int detailHeight = (height * 25 / 100);
- south.setHeight(detailHeight + "px");
+ ZKUpdateUtil.setHeight(south, detailHeight + "px");
south.setCollapsible(true);
south.setSplittable(true);
south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
@@ -527,12 +528,12 @@ public class InfoProductPanel extends InfoPanel implements EventListener
borderlayout.appendChild(south);
tabbedPane.setSclass("info-product-tabbedpane");
south.appendChild(tabbedPane);
- tabbedPane.setVflex("1");
- tabbedPane.setHflex("1");
+ ZKUpdateUtil.setVflex(tabbedPane, "1");
+ ZKUpdateUtil.setHflex(tabbedPane, "1");
Borderlayout mainPanel = new Borderlayout();
- mainPanel.setWidth("100%");
- mainPanel.setHeight("100%");
+ ZKUpdateUtil.setWidth(mainPanel, "100%");
+ ZKUpdateUtil.setHeight(mainPanel, "100%");
North north = new North();
mainPanel.appendChild(north);
north.appendChild(grid);
@@ -550,8 +551,8 @@ public class InfoProductPanel extends InfoPanel implements EventListener
this.appendChild(mainPanel);
if (isLookup())
{
- this.setWidth(width + "px");
- this.setHeight(height + "px");
+ ZKUpdateUtil.setWidth(this, width + "px");
+ ZKUpdateUtil.setHeight(this, height + "px");
}
contentPanel.addActionListener(new EventListener() {
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java
index 408c6fec18..ec8007e243 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java
@@ -35,6 +35,7 @@ import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.info.InfoProductWindow;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MDocType;
import org.compiere.model.MPriceList;
import org.compiere.util.CLogger;
@@ -154,25 +155,25 @@ public class InvoiceHistory extends Window implements EventListener
if (m_M_Product_ID != 0)
tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "ATP")));
- pricePane.setHeight("100%");
+ ZKUpdateUtil.setHeight(pricePane, "100%");
pricePane.appendChild(m_tablePrice);
tabpanels.appendChild(pricePane);
- reservedPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(reservedPane, "100%");
reservedPane.appendChild(m_tableReserved);
tabpanels.appendChild(reservedPane);
- orderedPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(orderedPane, "100%");
orderedPane.appendChild(m_tableOrdered);
tabpanels.appendChild(orderedPane);
- unconfirmedPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(unconfirmedPane, "100%");
unconfirmedPane.appendChild(m_tableUnconfirmed);
tabpanels.appendChild(unconfirmedPane);
if (m_M_Product_ID != 0)
{
- atpPane.setHeight("100%");
+ ZKUpdateUtil.setHeight(atpPane, "100%");
atpPane.appendChild(m_tableAtp);
tabpanels.appendChild(atpPane);
}
@@ -182,8 +183,8 @@ public class InvoiceHistory extends Window implements EventListener
confirmPanel.addActionListener(this);
Borderlayout borderlayout = new Borderlayout();
- this.setWidth("700px");
- this.setHeight("400px");
+ ZKUpdateUtil.setWidth(this, "700px");
+ ZKUpdateUtil.setHeight(this, "400px");
borderlayout.setStyle("border: none; position: relative");
this.appendChild(borderlayout);
this.setClosable(true);
@@ -198,8 +199,8 @@ public class InvoiceHistory extends Window implements EventListener
center.setAutoscroll(true);
borderlayout.appendChild(center);
center.appendChild(tabbox);
- tabbox.setVflex("1");
- tabbox.setHflex("1");
+ ZKUpdateUtil.setVflex(tabbox, "1");
+ ZKUpdateUtil.setHflex(tabbox, "1");
South south = new South();
south.setSclass("dialog-footer");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java
index 341b6b7ba3..5ebb1dad13 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java
@@ -47,6 +47,7 @@ import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.BrowserToken;
import org.adempiere.webui.util.UserPreference;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.LoginWindow;
import org.compiere.Adempiere;
@@ -330,7 +331,7 @@ public class LoginPanel extends Window implements EventListener
pnlButtons.addComponentsRight(helpButton);
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
- pnlButtons.setWidth(null);
+ ZKUpdateUtil.setWidth(pnlButtons, null);
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
div.appendChild(pnlButtons);
this.appendChild(div);
@@ -354,7 +355,7 @@ public class LoginPanel extends Window implements EventListener
txtUserId.setId("txtUserId");
txtUserId.setCols(25);
txtUserId.setMaxlength(40);
- txtUserId.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtUserId, "220px");
txtUserId.addEventListener(Events.ON_CHANGE, this); // Elaine 2009/02/06
txtPassword = new Textbox();
@@ -363,14 +364,14 @@ public class LoginPanel extends Window implements EventListener
txtPassword.setCols(25);
// txtPassword.setMaxlength(40);
- txtPassword.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtPassword, "220px");
lstLanguage = new Combobox();
lstLanguage.setAutocomplete(true);
lstLanguage.setAutodrop(true);
lstLanguage.setId("lstLanguage");
lstLanguage.addEventListener(Events.ON_SELECT, this);
- lstLanguage.setWidth("220px");
+ ZKUpdateUtil.setWidth(lstLanguage, "220px");
// Update Language List
lstLanguage.getItems().clear();
@@ -630,8 +631,8 @@ public class LoginPanel extends Window implements EventListener
return null;
}
msg = Strings.escape(msg, "\"");
- String s = "adempiere.store.set(\"zkTimeoutText\", \"" + msg + "\");";//IDEMPIERE-847
- s = s + " adempiere.store.set(\"zkContinueText\", \"" + continueNsg + "\");"; //IDEMPIERE-847
+ String s = "adempiere.set(\"zkTimeoutText\", \"" + msg + "\");";//IDEMPIERE-847
+ s = s + " adempiere.set(\"zkContinueText\", \"" + continueNsg + "\");"; //IDEMPIERE-847
return s;
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java
index 09a6574882..c4825514b0 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java
@@ -33,6 +33,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.LoginWindow;
import org.compiere.model.MClient;
import org.compiere.model.MMailText;
@@ -208,7 +209,7 @@ public class ResetPasswordPanel extends Window implements EventListener
ConfirmPanel pnlButtons = new ConfirmPanel(true);
pnlButtons.addActionListener(this);
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
- pnlButtons.setWidth(null);
+ ZKUpdateUtil.setWidth(pnlButtons, null);
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
pnlButtons.getButton(ConfirmPanel.A_CANCEL).setSclass(ITheme.LOGIN_BUTTON_CLASS);
div.appendChild(pnlButtons);
@@ -224,7 +225,7 @@ public class ResetPasswordPanel extends Window implements EventListener
txtEmail = new Textbox();
txtEmail.setId("txtEmail");
txtEmail.setCols(25);
- txtEmail.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtEmail, "220px");
txtEmail.setReadonly(false);
lblUserId = new Label();
@@ -235,7 +236,7 @@ public class ResetPasswordPanel extends Window implements EventListener
txtUserId.setId("txtUserId");
txtUserId.setCols(25);
txtUserId.setMaxlength(40);
- txtUserId.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtUserId, "220px");
txtUserId.setReadonly(false);
if (! m_noSecurityQuestion)
{
@@ -252,7 +253,7 @@ public class ResetPasswordPanel extends Window implements EventListener
txtSecurityQuestion = new Textbox();
txtSecurityQuestion.setId("txtSecurityQuestion");
txtSecurityQuestion.setCols(25);
- txtSecurityQuestion.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtSecurityQuestion, "220px");
txtSecurityQuestion.setReadonly(true);
txtSecurityQuestion.setVisible(false);
@@ -260,7 +261,7 @@ public class ResetPasswordPanel extends Window implements EventListener
txtAnswer.setId("txtAnswer");
// txtAnswer.setType("password");
txtAnswer.setCols(25);
- txtAnswer.setWidth("220px");
+ ZKUpdateUtil.setWidth(txtAnswer, "220px");
txtAnswer.setReadonly(true);
txtAnswer.setVisible(false);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java
index 3d94853fee..447fa771d1 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java
@@ -41,6 +41,7 @@ import org.adempiere.webui.session.SessionManager;
import org.adempiere.webui.theme.ITheme;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.UserPreference;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.adempiere.webui.window.LoginWindow;
import org.compiere.model.MRole;
@@ -259,7 +260,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl
okBtn.setWidgetListener("onClick", "zAu.cmd0.showBusy(null)");
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
- pnlButtons.setWidth(null);
+ ZKUpdateUtil.setWidth(pnlButtons, null);
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
pnlButtons.getButton(ConfirmPanel.A_CANCEL).setSclass(ITheme.LOGIN_BUTTON_CLASS);
div.appendChild(pnlButtons);
@@ -296,7 +297,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl
lstRole.setId("lstRole");
lstRole.addEventListener(Events.ON_SELECT, this);
- lstRole.setWidth("220px");
+ ZKUpdateUtil.setWidth(lstRole, "220px");
lstClient = new Combobox();
lstClient.setAutocomplete(true);
@@ -304,7 +305,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl
lstClient.setId("lstClient");
lstClient.addEventListener(Events.ON_SELECT, this);
- lstClient.setWidth("220px");
+ ZKUpdateUtil.setWidth(lstClient, "220px");
lstOrganisation = new Combobox();
lstOrganisation.setAutocomplete(true);
@@ -312,7 +313,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl
lstOrganisation.setId("lstOrganisation");
lstOrganisation.addEventListener(Events.ON_SELECT, this);
- lstOrganisation.setWidth("220px");
+ ZKUpdateUtil.setWidth(lstOrganisation, "220px");
lstWarehouse = new Combobox();
lstWarehouse.setAutocomplete(true);
@@ -320,7 +321,7 @@ public class RolePanel extends Window implements EventListener, Deferrabl
lstWarehouse.setId("lstWarehouse");
lstWarehouse.addEventListener(Events.ON_SELECT, this);
- lstWarehouse.setWidth("220px");
+ ZKUpdateUtil.setWidth(lstWarehouse, "220px");
lstDate = new WDateEditor();
lstDate.setValue(new Timestamp(System.currentTimeMillis()));
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java
index da1d402c4e..c11c732735 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/StatusBarPanel.java
@@ -23,6 +23,7 @@ import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.WRecordInfo;
import org.compiere.apps.IStatusBar;
import org.compiere.model.DataStatusEvent;
@@ -95,16 +96,16 @@ public class StatusBarPanel extends Panel implements EventListener, IStat
statusLine = new Label();
Hbox hbox = new Hbox();
- hbox.setWidth("100%");
- hbox.setHeight("100%");
- hbox.setHflex("1");
+ ZKUpdateUtil.setWidth(hbox, "100%");
+ ZKUpdateUtil.setHeight(hbox, "100%");
+ ZKUpdateUtil.setHflex(hbox, "1");
Cell leftCell = new Cell();
hbox.appendChild(leftCell);
Cell rightCell = new Cell();
hbox.appendChild(rightCell);
- leftCell.setWidth("50%");
- rightCell.setWidth("50%");
+ ZKUpdateUtil.setWidth(leftCell, "50%");
+ ZKUpdateUtil.setWidth(rightCell, "50%");
west = new Div();
west.setStyle("text-align: left; ");
@@ -121,7 +122,7 @@ public class StatusBarPanel extends Panel implements EventListener, IStat
leftCell.appendChild(vbox);
east = new Div();
- east.setWidth("100%");
+ ZKUpdateUtil.setWidth(east, "100%");
east.setStyle("text-align: right; ");
infoLine = new Label();
@@ -252,7 +253,7 @@ public class StatusBarPanel extends Panel implements EventListener, IStat
popupContent = new Div();
popup = new Div();
- popup.setWidth("600px");
+ ZKUpdateUtil.setWidth(popup, "600px");
popup.appendChild(popupContent);
popup.addEventListener(Events.ON_CLICK, this);
popup.setPage(SessionManager.getAppDesktop().getComponent().getPage());
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java
index c590d0fc03..7329a4918b 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java
@@ -15,6 +15,7 @@
package org.adempiere.webui.panel;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.zhtml.Script;
@@ -56,8 +57,8 @@ public class TimeoutPanel extends Window implements
Borderlayout layout = new Borderlayout();
layout.setParent(this);
- setWidth("23%");
- setHeight("25%");
+ ZKUpdateUtil.setWidth(this, "23%");
+ ZKUpdateUtil.setHeight(this, "25%");
setPosition("left,bottom");
setBorder(true);
setShadow(false);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java
index 193cd7fc92..ee01d384a2 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java
@@ -30,6 +30,7 @@ import org.adempiere.webui.util.DocumentSearch;
import org.adempiere.webui.util.TreeItemAction;
import org.adempiere.webui.util.TreeNodeAction;
import org.adempiere.webui.util.TreeUtils;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MTreeNode;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@@ -168,7 +169,7 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree
addEventListener(ON_POST_SELECT_TREEITEM_EVENT, this);
if (AEnv.isInternetExplorer())
{
- cmbSearch.setWidth("200px");
+ ZKUpdateUtil.setWidth(cmbSearch, "200px");
}
layout.appendChild(lblSearch);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java
index 39dea76afe..af2c0a6561 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java
@@ -38,6 +38,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.MAttachment;
import org.compiere.model.MAttachmentEntry;
@@ -219,8 +220,8 @@ public class WAttachment extends Window implements EventListener
{
this.setAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "attachment");
this.setMaximizable(true);
- this.setWidth("700px");
- this.setHeight("85%");
+ ZKUpdateUtil.setWidth(this, "700px");
+ ZKUpdateUtil.setHeight(this, "85%");
this.setTitle(Msg.getMsg(Env.getCtx(), "Attachment"));
this.setClosable(true);
this.setSizable(true);
@@ -228,8 +229,8 @@ public class WAttachment extends Window implements EventListener
this.setSclass("popup-dialog");
this.setShadow(true);
this.appendChild(mainPanel);
- mainPanel.setHeight("100%");
- mainPanel.setWidth("100%");
+ ZKUpdateUtil.setHeight(mainPanel, "100%");
+ ZKUpdateUtil.setWidth(mainPanel, "100%");
North northPanel = new North();
northPanel.setStyle("padding: 4px");
@@ -252,8 +253,8 @@ public class WAttachment extends Window implements EventListener
Vlayout div = new Vlayout();
div.appendChild(toolBar);
text.setRows(3);
- text.setHflex("1");
- text.setHeight("100%");
+ ZKUpdateUtil.setHflex(text, "1");
+ ZKUpdateUtil.setHeight(text, "100%");
div.appendChild(text);
northPanel.appendChild(div);
@@ -275,22 +276,22 @@ public class WAttachment extends Window implements EventListener
bDelete.addEventListener(Events.ON_CLICK, this);
previewPanel.appendChild(preview);
- preview.setHeight("100%");
- preview.setWidth("100%");
+ ZKUpdateUtil.setHeight(preview, "100%");
+ ZKUpdateUtil.setWidth(preview, "100%");
Center centerPane = new Center();
centerPane.setSclass("dialog-content");
centerPane.setAutoscroll(true);
mainPanel.appendChild(centerPane);
centerPane.appendChild(previewPanel);
- previewPanel.setVflex("1");
- previewPanel.setHflex("1");
+ ZKUpdateUtil.setVflex(previewPanel, "1");
+ ZKUpdateUtil.setHflex(previewPanel, "1");
South southPane = new South();
southPane.setSclass("dialog-footer");
mainPanel.appendChild(southPane);
southPane.appendChild(confirmPanel);
- southPane.setVflex("min");
+ ZKUpdateUtil.setVflex(southPane, "min");
bCancel.addEventListener(Events.ON_CLICK, this);
bOk.addEventListener(Events.ON_CLICK, this);
@@ -304,10 +305,10 @@ public class WAttachment extends Window implements EventListener
confirmPanel.appendChild(bDeleteAll);
confirmPanel.appendChild(bRefresh);
- confirmPanel.setHflex("1");
+ ZKUpdateUtil.setHflex(confirmPanel, "1");
Hbox hbox = new Hbox();
hbox.setPack("end");
- hbox.setHflex("1");
+ ZKUpdateUtil.setHflex(hbox, "1");
confirmPanel.appendChild(hbox);
hbox.appendChild(bOk);
hbox.appendChild(bCancel);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java
index 9bf7660a07..f52bb9c87b 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java
@@ -33,6 +33,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MAllocationHdr;
@@ -259,19 +260,19 @@ public class WDocActionPanel extends Window implements EventListener, Dia
lstDocAction.setId("lstDocAction");
lstDocAction.setRows(0);
lstDocAction.setMold("select");
- lstDocAction.setWidth("200px");
+ ZKUpdateUtil.setWidth(lstDocAction, "200px");
lstDocAction.addEventListener(Events.ON_SELECT, this);
confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(Events.ON_CLICK, this);
- confirmPanel.setVflex("true");
+ ZKUpdateUtil.setVflex(confirmPanel, "true");
}
private void init()
{
setSclass("popup-dialog");
Vlayout vlayout = new Vlayout();
- vlayout.setHflex("1");
+ ZKUpdateUtil.setHflex(vlayout, "1");
this.appendChild(vlayout);
setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "documentAction");
@@ -304,10 +305,10 @@ public class WDocActionPanel extends Window implements EventListener, Dia
footer.setSclass("dialog-footer");
vlayout.appendChild(footer);
footer.appendChild(confirmPanel);
- confirmPanel.setVflex("min");
+ ZKUpdateUtil.setVflex(confirmPanel, "min");
this.setTitle(Msg.translate(Env.getCtx(), "DocAction"));
- this.setWidth("410px");
+ ZKUpdateUtil.setWidth(this, "410px");
this.setBorder("normal");
this.setZindex(1000);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WOnlyCurrentDays.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WOnlyCurrentDays.java
index e56097db13..6a23ed84db 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WOnlyCurrentDays.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WOnlyCurrentDays.java
@@ -22,6 +22,7 @@ import java.util.logging.Level;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@@ -103,7 +104,7 @@ public class WOnlyCurrentDays extends Window implements EventListener, Di
bShowDay.setLabel(Msg.getMsg(Env.getCtx(), "Day"));
bShowDay.addEventListener(Events.ON_CLICK, this);
- mainPanel.setWidth("100%");
+ ZKUpdateUtil.setWidth(mainPanel, "100%");
mainPanel.setStyle("text-align:center");
mainPanel.appendChild(bShowDay);
mainPanel.appendChild(bShowWeek);
@@ -111,7 +112,7 @@ public class WOnlyCurrentDays extends Window implements EventListener, Di
mainPanel.appendChild(bShowYear);
mainPanel.appendChild(bShowAll);
- this.setWidth("450px");
+ ZKUpdateUtil.setWidth(this, "450px");
this.setBorder("normal");
this.setTitle(Msg.getMsg(Env.getCtx(), "VOnlyCurrentDays"));
this.setClosable(true);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WProcessParameterForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WProcessParameterForm.java
index 5fe311dc8b..094f16589e 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WProcessParameterForm.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WProcessParameterForm.java
@@ -26,6 +26,7 @@ import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.VerticalBox;
import org.adempiere.webui.factory.ButtonFactory;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MPInstancePara;
import org.compiere.model.MScheduler;
import org.compiere.process.ProcessInfo;
@@ -120,17 +121,17 @@ public class WProcessParameterForm extends ADForm
}
this.setSizable(true);
this.setClosable(true);
- this.setWidth("500px");
- this.setVflex("min");
+ ZKUpdateUtil.setWidth(this, "500px");
+ ZKUpdateUtil.setVflex(this, "min");
}
private void initComponents() {
this.setBorder("normal");
dialogBody = new VerticalBox();
- dialogBody.setHflex("1");
+ ZKUpdateUtil.setHflex(dialogBody, "1");
Vlayout dialogContent = new Vlayout();
- dialogContent.setHflex("1");
- dialogContent.setVflex("1");
+ ZKUpdateUtil.setHflex(dialogContent, "1");
+ ZKUpdateUtil.setVflex(dialogContent, "1");
dialogContent.setSclass("dialog-content");
dialogBody.appendChild(dialogContent);
Div div = new Div();
@@ -142,7 +143,7 @@ public class WProcessParameterForm extends ADForm
centerPanel = new Panel();
dialogContent.appendChild(centerPanel);
Hbox hbox = new Hbox();
- hbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(hbox, "100%");
hbox.setSclass("dialog-footer");
Button btn = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
btn.setId("Ok");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java
index aa77132232..b610c605f7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java
@@ -22,6 +22,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.util.KeyNamePair;
@@ -65,15 +66,15 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener
m_oldLabel = new String[m_pfi.size()];
Window wind=new Window();
- wind.setWidth("90%");
- wind.setHeight("100%");
- wind.setHflex("1");
+ ZKUpdateUtil.setWidth(wind, "90%");
+ ZKUpdateUtil.setHeight(wind, "100%");
+ ZKUpdateUtil.setHflex(wind, "1");
Grid grid = new Grid();
//have problem moving the following out as css class
- grid.setHflex("1");
- grid.setHeight("90%");
- grid.setVflex(true);
+ ZKUpdateUtil.setHflex(grid, "1");
+ ZKUpdateUtil.setHeight(grid, "90%");
+ ZKUpdateUtil.setVflex(grid, true);
grid.setStyle("margin:0; padding:0; position: absolute");
grid.makeNoStrip();
@@ -91,10 +92,10 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener
int widthTxt = widthChk*4;
for(int i=0;i mouseListener = new EventListener()
{
@@ -126,20 +127,20 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
listHeader.setParent(listHead);
Hlayout hlayout = new Hlayout();
- hlayout.setVflex("true");
- hlayout.setHflex("true");
+ ZKUpdateUtil.setVflex(hlayout, "true");
+ ZKUpdateUtil.setHflex(hlayout, "true");
hlayout.setStyle("width:80%;height:80%;border:none;margin:none;padding:none");
- noList.setHflex("1");
- noList.setVflex(true);
+ ZKUpdateUtil.setHflex(noList, "1");
+ ZKUpdateUtil.setVflex(noList, true);
hlayout.appendChild(noList);
Vbox vbox = new Vbox();
vbox.appendChild(bAdd);
vbox.appendChild(bRemove);
- vbox.setWidth("50px");
+ ZKUpdateUtil.setWidth(vbox, "50px");
hlayout.appendChild(vbox);
- yesList.setVflex(true);
- yesList.setHflex("1");
+ ZKUpdateUtil.setVflex(yesList, true);
+ ZKUpdateUtil.setHflex(yesList, "1");
hlayout.appendChild(yesList);
@@ -159,7 +160,7 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener
vbox = new Vbox();
vbox.appendChild(bUp);
vbox.appendChild(bDown);
- vbox.setWidth("46px");
+ ZKUpdateUtil.setWidth(vbox, "46px");
hlayout.appendChild(vbox);
this.appendChild(hlayout);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC4GroupingCriteriaPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC4GroupingCriteriaPanel.java
index 50dd7de396..2e0d40e45e 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC4GroupingCriteriaPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC4GroupingCriteriaPanel.java
@@ -23,6 +23,7 @@ import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.print.MPrintFormatItem;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
@@ -74,13 +75,13 @@ public class WRC4GroupingCriteriaPanel extends WRCTabPanel implements EventListe
public void init(){
Window wind=new Window();
- wind.setWidth("90%");
- wind.setHeight("100%");
- wind.setHflex("1");
+ ZKUpdateUtil.setWidth(wind, "90%");
+ ZKUpdateUtil.setHeight(wind, "100%");
+ ZKUpdateUtil.setHflex(wind, "1");
- grid.setHflex("1");
- grid.setHeight("90%");
- grid.setVflex(true);
+ ZKUpdateUtil.setHflex(grid, "1");
+ ZKUpdateUtil.setHeight(grid, "90%");
+ ZKUpdateUtil.setVflex(grid, true);
grid.setStyle("margin:0; padding:0; position: absolute");
grid.makeNoStrip();
@@ -92,10 +93,10 @@ public class WRC4GroupingCriteriaPanel extends WRCTabPanel implements EventListe
int widthTxt = widthChk*4;
for(int i=0;i
borderlayout = (Borderlayout) calendarContainer.getFellow("main");
borderlayout.setStyle("position: absolute; width: 98%; margin: auto;");
- borderlayout.setHeight("100%");
+ ZKUpdateUtil.setHeight(borderlayout, "100%");
if (borderlayout.getSouth() != null) {
borderlayout.getSouth().detach();
}
@@ -353,7 +354,7 @@ public class WSchedule extends Window implements EventListener
South south = new South();
south.appendChild(pane);
if (!Util.isEmpty(height)) {
- south.setHeight(height);
+ ZKUpdateUtil.setHeight(south, height);
}
borderlayout.appendChild(south);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java
index 42ec95ff9b..79bddcf11f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java
@@ -60,6 +60,7 @@ import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.util.ReaderInputStream;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.GridTab;
import org.compiere.model.MImportTemplate;
import org.compiere.util.DB;
@@ -142,7 +143,7 @@ public class CSVImportAction implements EventListener
{
winImportFile = new Window();
winImportFile.setTitle(Msg.getMsg(Env.getCtx(), "FileImport") + ": " + panel.getActiveGridTab().getName());
- winImportFile.setWidth("450px");
+ ZKUpdateUtil.setWidth(winImportFile, "450px");
winImportFile.setClosable(true);
winImportFile.setBorder("normal");
winImportFile.setStyle("position:absolute");
@@ -150,7 +151,7 @@ public class CSVImportAction implements EventListener
winImportFile.setSclass("popup-dialog");
Vbox vb = new Vbox();
- vb.setWidth("100%");
+ ZKUpdateUtil.setWidth(vb, "100%");
winImportFile.appendChild(vb);
Vlayout vlayout = new Vlayout();
@@ -162,10 +163,10 @@ public class CSVImportAction implements EventListener
Columns columns = new Columns();
Column column = new Column();
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
columns.appendChild(column);
column = new Column();
- column.setHflex("1");
+ ZKUpdateUtil.setHflex(column, "1");
columns.appendChild(column);
grid.appendChild(columns);
@@ -179,7 +180,7 @@ public class CSVImportAction implements EventListener
fTemplates.setRows(0);
fTemplates.setTooltiptext(Msg.getElement(Env.getCtx(), "AD_ImportTemplate_ID"));
row.appendChild(fTemplates);
- fTemplates.setHflex("1");
+ ZKUpdateUtil.setHflex(fTemplates, "1");
row = new Row();
rows.appendChild(row);
@@ -188,7 +189,7 @@ public class CSVImportAction implements EventListener
fImportMode.setRows(0);
fImportMode.setTooltiptext(Msg.getMsg(Env.getCtx(), "import.mode", false));
row.appendChild(fImportMode);
- fImportMode.setHflex("1");
+ ZKUpdateUtil.setHflex(fImportMode, "1");
row = new Row();
rows.appendChild(row);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java
index 4f14b8bc3d..ac375bd74f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java
@@ -42,6 +42,7 @@ import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.util.Env;
@@ -106,7 +107,7 @@ public class ExportAction implements EventListener
{
winExportFile = new Window();
winExportFile.setTitle(Msg.getMsg(Env.getCtx(), "Export") + ": " + panel.getActiveGridTab().getName());
- winExportFile.setWidth("450px");
+ ZKUpdateUtil.setWidth(winExportFile, "450px");
winExportFile.setClosable(true);
winExportFile.setBorder("normal");
winExportFile.setStyle("position:absolute");
@@ -125,7 +126,7 @@ public class ExportAction implements EventListener
cboType.addActionListener(this);
Vbox vb = new Vbox();
- vb.setWidth("100%");
+ ZKUpdateUtil.setWidth(vb, "100%");
winExportFile.appendChild(vb);
Vlayout vlayout = new Vlayout();
@@ -137,10 +138,10 @@ public class ExportAction implements EventListener
Columns columns = new Columns();
Column column = new Column();
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
columns.appendChild(column);
column = new Column();
- column.setHflex("1");
+ ZKUpdateUtil.setHflex(column, "1");
columns.appendChild(column);
grid.appendChild(columns);
@@ -151,7 +152,7 @@ public class ExportAction implements EventListener
rows.appendChild(row);
row.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType")));
row.appendChild(cboType);
- cboType.setHflex("1");
+ ZKUpdateUtil.setHflex(cboType, "1");
row = new Row();
rows.appendChild(row);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java
index f0ebe7ccef..d3f3e6974c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/FileImportAction.java
@@ -49,6 +49,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.util.ReaderInputStream;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MLookup;
@@ -143,7 +144,7 @@ public class FileImportAction implements EventListener
{
winImportFile = new Window();
winImportFile.setTitle(Msg.getMsg(Env.getCtx(), "FileImport") + ": " + panel.getActiveGridTab().getName());
- winImportFile.setWidth("450px");
+ ZKUpdateUtil.setWidth(winImportFile, "450px");
winImportFile.setClosable(true);
winImportFile.setBorder("normal");
winImportFile.setStyle("position:absolute");
@@ -161,7 +162,7 @@ public class FileImportAction implements EventListener
cboType.setSelectedIndex(0);
Vbox vb = new Vbox();
- vb.setWidth("100%");
+ ZKUpdateUtil.setWidth(vb, "100%");
winImportFile.appendChild(vb);
Vlayout vlayout = new Vlayout();
@@ -173,10 +174,10 @@ public class FileImportAction implements EventListener
Columns columns = new Columns();
Column column = new Column();
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
columns.appendChild(column);
column = new Column();
- column.setHflex("1");
+ ZKUpdateUtil.setHflex(column, "1");
columns.appendChild(column);
grid.appendChild(columns);
@@ -187,7 +188,7 @@ public class FileImportAction implements EventListener
rows.appendChild(row);
row.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType", true)));
row.appendChild(cboType);
- cboType.setHflex("1");
+ ZKUpdateUtil.setHflex(cboType, "1");
row = new Row();
rows.appendChild(row);
@@ -196,7 +197,7 @@ public class FileImportAction implements EventListener
fCharset.setRows(0);
fCharset.setTooltiptext(Msg.getMsg(Env.getCtx(), "Charset", false));
row.appendChild(fCharset);
- fCharset.setHflex("1");
+ ZKUpdateUtil.setHflex(fCharset, "1");
row = new Row();
rows.appendChild(row);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java
index 8889b02057..b41b7cd6f6 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java
@@ -38,6 +38,7 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Window;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.GridTab;
import org.compiere.model.MQuery;
@@ -95,7 +96,7 @@ public class ReportAction implements EventListener
if(winReport == null)
{
winReport = new Window();
- winReport.setWidth("450px");
+ ZKUpdateUtil.setWidth(winReport, "450px");
winReport.setClosable(true);
winReport.setBorder("normal");
winReport.setStyle("position:absolute");
@@ -140,7 +141,7 @@ public class ReportAction implements EventListener
}
Vbox vb = new Vbox();
- vb.setWidth("100%");
+ ZKUpdateUtil.setWidth(vb, "100%");
winReport.appendChild(vb);
winReport.setSclass("toolbar-popup-window");
vb.setSclass("toolbar-popup-window-cnt");
@@ -151,10 +152,10 @@ public class ReportAction implements EventListener
Columns columns = new Columns();
Column column = new Column();
- column.setHflex("min");
+ ZKUpdateUtil.setHflex(column, "min");
columns.appendChild(column);
column = new Column();
- column.setHflex("1");
+ ZKUpdateUtil.setHflex(column, "1");
columns.appendChild(column);
grid.appendChild(columns);
@@ -165,7 +166,7 @@ public class ReportAction implements EventListener
rows.appendChild(row);
row.appendChild(new Label(Msg.translate(Env.getCtx(), "AD_PrintFormat_ID")));
row.appendChild(cboPrintFormat);
- cboPrintFormat.setHflex("1");
+ ZKUpdateUtil.setHflex(cboPrintFormat, "1");
cboPrintFormat.addEventListener(Events.ON_SELECT, this);
row = new Row();
@@ -177,12 +178,12 @@ public class ReportAction implements EventListener
{
Panel panel = new Panel();
panel.appendChild(chkExport);
- chkExport.setHflex("min");
+ ZKUpdateUtil.setHflex(chkExport, "min");
panel.appendChild(new Space());
chkExport.addEventListener(Events.ON_CHECK, this);
panel.appendChild(cboExportType);
- cboExportType.setHflex("1");
- panel.setHflex("1");
+ ZKUpdateUtil.setHflex(cboExportType, "1");
+ ZKUpdateUtil.setHflex(panel, "1");
row = new Row();
rows.appendChild(row);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java
index 44dc00e36d..92625bcf22 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java
@@ -25,6 +25,7 @@ import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.desktop.TabbedDesktop;
import org.adempiere.webui.panel.IHelpContext;
import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@@ -89,10 +90,10 @@ public class WindowContainer extends AbstractUIPart
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
- tabbox.setWidth("100%");
- tabbox.setHeight("100%");
- tabbox.setVflex("1");
- tabbox.setHflex("1");
+ ZKUpdateUtil.setWidth(tabbox, "100%");
+ ZKUpdateUtil.setHeight(tabbox, "100%");
+ ZKUpdateUtil.setVflex(tabbox, "1");
+ ZKUpdateUtil.setHflex(tabbox, "1");
if (parent != null)
tabbox.setParent(parent);
@@ -228,10 +229,10 @@ public class WindowContainer extends AbstractUIPart
tabpanel = new Tabpanel();
tabpanel.appendChild(comp);
}
- tabpanel.setHeight("100%");
- tabpanel.setWidth("100%");
- tabpanel.setVflex("1");
- tabpanel.setHflex("1");
+ ZKUpdateUtil.setHeight(tabpanel, "100%");
+ ZKUpdateUtil.setWidth(tabpanel, "100%");
+ ZKUpdateUtil.setVflex(tabpanel, "1");
+ ZKUpdateUtil.setHflex(tabpanel, "1");
tabpanel.setSclass("desktop-tabpanel");
if (refTab == null)
@@ -308,7 +309,7 @@ public class WindowContainer extends AbstractUIPart
}
});
popupClose.appendChild(mi);
- popupClose.setWidth("auto");
+ ZKUpdateUtil.setWidth(popupClose, "auto");
popupClose.setPage(tab.getPage());
tab.setContext(popupClose);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java
index 9e2d3b3eb2..d045d8e02b 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java
@@ -45,7 +45,7 @@ public class LogEventInterceptor implements EventInterceptor {
System.out.println("Duplicate Event., event="+event.getName()+",target="+event.getTarget());
} else {
execution.setAttribute(key, Boolean.TRUE);
- String locator = event.getTarget() != null ? event.getTarget().getWidgetAttribute("_zk_locator") : "";
+ String locator = event.getTarget() != null ? event.getTarget().getClientAttribute("_zk_locator") : "";
System.out.println("beforeProcessEvent, event="+event.getName()+",target="+event.getTarget()+",locator="+locator);
}
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZKUpdateUtil.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZKUpdateUtil.java
new file mode 100644
index 0000000000..41f00da120
--- /dev/null
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZKUpdateUtil.java
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * Product: iDempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 2014 T.G.I. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ *****************************************************************************/
+package org.adempiere.webui.util;
+
+import org.zkoss.zk.ui.HtmlBasedComponent;
+import org.zkoss.zul.Grid;
+import org.zkoss.zul.Listbox;
+import org.zkoss.zul.Tree;
+
+/**
+ * @author hieplq
+ *
+ */
+public class ZKUpdateUtil {
+ public static void setHeight (HtmlBasedComponent comp, String value){
+ if (comp.getVflex() != null)
+ comp.setVflex(null);
+ comp.setHeight(value);
+ }
+
+ public static void setWidth (HtmlBasedComponent comp, String value){
+ if (comp.getHflex() != null)
+ comp.setHflex(null);
+ comp.setWidth(value);
+ }
+
+ public static void setHflex (HtmlBasedComponent comp, String value){
+ if (comp.getWidth() != null)
+ comp.setWidth(null);
+ comp.setHflex(value);
+ }
+
+ public static void setVflex (HtmlBasedComponent comp, String value){
+ if (comp.getHeight() != null)
+ comp.setHeight(null);
+ comp.setVflex(value);
+ }
+
+ public static void setVflex (Listbox comp, boolean value){
+ if (comp.getHeight() != null)
+ comp.setHeight(null);
+ comp.setVflex(value);
+ }
+
+ public static void setVflex (Grid comp, boolean value){
+ if (comp.getHeight() != null)
+ comp.setHeight(null);
+ comp.setVflex(value);
+ }
+
+ public static void setVflex (Tree comp, boolean value){
+ if (comp.getHeight() != null)
+ comp.setHeight(null);
+ comp.setVflex(value);
+ }
+
+}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java
index 901ad3f776..2167a55ef7 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java
@@ -44,6 +44,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.FeedbackManager;
+import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.Adempiere;
import org.compiere.model.MUser;
import org.compiere.util.CLogErrorBuffer;
@@ -113,14 +114,14 @@ public class AboutWindow extends Window implements EventListener {
this.setSizable(true);
tabbox = new Tabbox();
- tabbox.setVflex("1");
- tabbox.setHflex("1");
+ ZKUpdateUtil.setVflex(tabbox, "1");
+ ZKUpdateUtil.setHflex(tabbox, "1");
Tabs tabs = new Tabs();
tabs.setParent(tabbox);
tabPanels = new Tabpanels();
tabPanels.setParent(tabbox);
- tabPanels.setHflex("1");
- tabPanels.setVflex("1");
+ ZKUpdateUtil.setHflex(tabPanels, "1");
+ ZKUpdateUtil.setVflex(tabPanels, "1");
initTabs(tabs);
@@ -129,8 +130,8 @@ public class AboutWindow extends Window implements EventListener {
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
- borderlayout.setHflex("1");
- borderlayout.setVflex("1");
+ ZKUpdateUtil.setHflex(borderlayout, "1");
+ ZKUpdateUtil.setVflex(borderlayout, "1");
Center centerPane = new Center();
centerPane.setSclass("dialog-content");
@@ -145,8 +146,8 @@ public class AboutWindow extends Window implements EventListener {
southPane.appendChild(btnOk);
this.setBorder("normal");
- this.setWidth("600px");
- this.setHeight("450px");
+ ZKUpdateUtil.setWidth(this, "600px");
+ ZKUpdateUtil.setHeight(this, "450px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
}
@@ -187,14 +188,14 @@ public class AboutWindow extends Window implements EventListener {
Vbox vbox = new Vbox();
LayoutUtils.addSclass("about-trace-panel", vbox);
vbox.setParent(tabPanel);
- vbox.setHflex("1");
- vbox.setVflex("1");
+ ZKUpdateUtil.setHflex(vbox, "1");
+ ZKUpdateUtil.setVflex(vbox, "1");
Hbox hbox = new Hbox();
hbox.setAlign("center");
hbox.setPack("start");
Label levelLabel = new Label("Trace Level:");
- levelLabel.setHeight("100%");
+ ZKUpdateUtil.setHeight(levelLabel, "100%");
hbox.appendChild(levelLabel);
levelListBox = ListboxFactory.newDropdownListbox();
levelListBox.addEventListener(Events.ON_SELECT, this);
@@ -234,8 +235,8 @@ public class AboutWindow extends Window implements EventListener {
}
}
- hbox.setHflex("1");
- hbox.setVflex("0");
+ ZKUpdateUtil.setHflex(hbox, "1");
+ ZKUpdateUtil.setVflex(hbox, "0");
vbox.appendChild(hbox);
hbox = new Hbox();
@@ -263,8 +264,8 @@ public class AboutWindow extends Window implements EventListener {
LayoutUtils.addSclass("txt-btn", btnViewLog);
btnViewLog.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnViewLog);
- hbox.setHflex("1");
- hbox.setVflex("0");
+ ZKUpdateUtil.setHflex(hbox, "1");
+ ZKUpdateUtil.setVflex(hbox, "0");
vbox.appendChild(hbox);
Vector columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
@@ -275,13 +276,13 @@ public class AboutWindow extends Window implements EventListener {
listHead.setSizable(true);
for (Object obj : columnNames) {
ListHeader header = new ListHeader(obj.toString());
- header.setHflex("1");
+ ZKUpdateUtil.setHflex(header, "1");
listHead.appendChild(header);
}
vbox.appendChild(logTable);
- logTable.setVflex("1");
- logTable.setHflex("1");
+ ZKUpdateUtil.setVflex(logTable, "1");
+ ZKUpdateUtil.setHflex(logTable, "1");
updateLogTable();
@@ -305,7 +306,7 @@ public class AboutWindow extends Window implements EventListener {
Div div = new Div();
LayoutUtils.addSclass("about-info-panel", div);
div.setParent(tabPanel);
- div.setHeight("100%");
+ ZKUpdateUtil.setHeight(div, "100%");
div.setStyle("overflow: auto;");
Pre pre = new Pre();
pre.setParent(div);
@@ -320,8 +321,8 @@ public class AboutWindow extends Window implements EventListener {
Div div = new Div();
LayoutUtils.addSclass("about-credit-panel", div);
div.setParent(tabPanel);
- div.setWidth("100%");
- div.setHeight("100%");
+ ZKUpdateUtil.setWidth(div, "100%");
+ ZKUpdateUtil.setHeight(div, "100%");
div.setStyle("overflow: auto;");
Vbox vbox = new Vbox();
LayoutUtils.addSclass("about-credit-panel-logo", vbox);
@@ -330,7 +331,7 @@ public class AboutWindow extends Window implements EventListener {
caption.setStyle("font-weight: bold;");
caption.setParent(vbox);
ToolBarButton link = new ToolBarButton();
- link.setHeight("72px");
+ ZKUpdateUtil.setHeight(link, "72px");
link.setImage("images/TrekGlobal.jpg");
link.setParent(vbox);
link.setHref("http://www.trekglobal.com");
@@ -342,17 +343,17 @@ public class AboutWindow extends Window implements EventListener {
Div panel = new Div();
LayoutUtils.addSclass("about-credit-panel-sponsors", panel);
panel.setParent(div);
- panel.setWidth("100%");
+ ZKUpdateUtil.setWidth(panel, "100%");
vbox = new Vbox();
LayoutUtils.addSclass("about-credit-panel-sponsors-header", vbox);
- vbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(vbox, "100%");
vbox.setParent(panel);
caption = new Label("Sponsors");
caption.setStyle("font-weight: bold;");
caption.setParent(vbox);
Vbox content = new Vbox();
LayoutUtils.addSclass("about-credit-panel-sponsors-links", content);
- content.setWidth("100%");
+ ZKUpdateUtil.setWidth(content, "100%");
content.setParent(panel);
Grid grid = new Grid();
@@ -373,17 +374,17 @@ public class AboutWindow extends Window implements EventListener {
panel = new Div();
LayoutUtils.addSclass("about-credit-panel-contributors", panel);
panel.setParent(div);
- panel.setWidth("100%");
+ ZKUpdateUtil.setWidth(panel, "100%");
vbox = new Vbox();
LayoutUtils.addSclass("about-credit-panel-contributors-header", vbox);
- vbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(vbox, "100%");
vbox.setParent(panel);
caption = new Label("Contributors");
caption.setStyle("font-weight: bold;");
caption.setParent(vbox);
content = new Vbox();
LayoutUtils.addSclass("about-credit-panel-contributors-links", content);
- content.setWidth("100%");
+ ZKUpdateUtil.setWidth(content, "100%");
content.setParent(panel);
grid = new Grid();
@@ -429,15 +430,15 @@ public class AboutWindow extends Window implements EventListener {
Vbox vb = new Vbox();
LayoutUtils.addSclass("about-main-panel", vb);
- vb.setWidth("100%");
- vb.setHeight("100%");
+ ZKUpdateUtil.setWidth(vb, "100%");
+ ZKUpdateUtil.setHeight(vb, "100%");
vb.setAlign("center");
vb.setPack("center");
vb.setParent(tabPanel);
Vbox vbox = new Vbox();
LayoutUtils.addSclass("about-main-panel-logo", vbox);
- vbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(vbox, "100%");
vbox.setAlign("center");
vbox.setParent(vb);
@@ -446,7 +447,7 @@ public class AboutWindow extends Window implements EventListener {
vbox = new Vbox();
LayoutUtils.addSclass("about-main-panel-version", vbox);
- vbox.setWidth("100%");
+ ZKUpdateUtil.setWidth(vbox, "100%");
vbox.setAlign("center");
vbox.setParent(vb);
@@ -459,7 +460,7 @@ public class AboutWindow extends Window implements EventListener