diff --git a/migration/i1.0a-release/oracle/201212192345_IDEMPIERE-362_ConnectionProfile.sql b/migration/i1.0a-release/oracle/201212192345_IDEMPIERE-362_ConnectionProfile.sql new file mode 100644 index 0000000000..7dbaa85214 --- /dev/null +++ b/migration/i1.0a-release/oracle/201212192345_IDEMPIERE-362_ConnectionProfile.sql @@ -0,0 +1,18 @@ +-- Dec 19, 2012 11:41:02 PM COT +-- Drop deprecated connection profile +UPDATE AD_Field SET IsDisplayed='N', IsActive='N',Updated=TO_DATE('2012-12-19 23:41:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12640 +; + +-- Dec 19, 2012 11:41:44 PM COT +-- Drop deprecated connection profile +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-12-19 23:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14619 +; + +-- Dec 19, 2012 11:43:43 PM COT +-- Drop deprecated connection profile +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-12-19 23:43:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14618 +; + +SELECT register_migration_script('201212192345_IDEMPIERE-362_ConnectionProfile.sql') FROM dual +; + diff --git a/migration/i1.0a-release/postgresql/201212192345_IDEMPIERE-362_ConnectionProfile.sql b/migration/i1.0a-release/postgresql/201212192345_IDEMPIERE-362_ConnectionProfile.sql new file mode 100644 index 0000000000..efd872fc65 --- /dev/null +++ b/migration/i1.0a-release/postgresql/201212192345_IDEMPIERE-362_ConnectionProfile.sql @@ -0,0 +1,18 @@ +-- Dec 19, 2012 11:41:02 PM COT +-- Drop deprecated connection profile +UPDATE AD_Field SET IsDisplayed='N', IsActive='N',Updated=TO_TIMESTAMP('2012-12-19 23:41:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12640 +; + +-- Dec 19, 2012 11:41:44 PM COT +-- Drop deprecated connection profile +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-12-19 23:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14619 +; + +-- Dec 19, 2012 11:43:43 PM COT +-- Drop deprecated connection profile +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-12-19 23:43:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14618 +; + +SELECT register_migration_script('201212192345_IDEMPIERE-362_ConnectionProfile.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/db/CConnection.java b/org.adempiere.base/src/org/compiere/db/CConnection.java index 58594c7d11..cfed43be0b 100644 --- a/org.adempiere.base/src/org/compiere/db/CConnection.java +++ b/org.adempiere.base/src/org/compiere/db/CConnection.java @@ -32,7 +32,6 @@ import org.compiere.interfaces.Server; import org.compiere.interfaces.Status; import org.compiere.util.CLogger; import org.compiere.util.Ini; -import org.compiere.util.ValueNamePair; /** * Adempiere Connection Descriptor @@ -44,34 +43,15 @@ import org.compiere.util.ValueNamePair; public class CConnection implements Serializable, Cloneable { /** - * + * */ - private static final long serialVersionUID = -7893119456331485444L; + private static final long serialVersionUID = -858558852550858165L; + /** Connection */ private volatile static CConnection s_cc = null; /** Logger */ private static CLogger log = CLogger.getCLogger (CConnection.class); - /** Connection profiles */ - @Deprecated - public static ValueNamePair[] CONNECTIONProfiles = new ValueNamePair[]{ - new ValueNamePair("L", "LAN")}; - - /** Connection Profile LAN */ - @Deprecated - public static final String PROFILE_LAN = "L"; - /** - * Connection Profile Terminal Server - * @deprecated - **/ - public static final String PROFILE_TERMINAL = "T"; - /** Connection Profile VPM */ - @Deprecated - public static final String PROFILE_VPN = "V"; - /** Connection Profile WAN */ - @Deprecated - public static final String PROFILE_WAN = "W"; - /** * Get/Set default client/server Connection * @return Connection Descriptor @@ -98,7 +78,6 @@ public class CConnection implements Serializable, Cloneable if (apps_host != null && Adempiere.isWebStartClient()) { cc = new CConnection(apps_host); - cc.setConnectionProfile(CConnection.PROFILE_LAN); if (cc.testAppsServer() == null) { s_cc = cc; @@ -553,77 +532,6 @@ public class CConnection implements Serializable, Cloneable return false; } // isRMIoverHTTP - /** - * Set Connection Profile - * @param connectionProfile connection profile - * @deprecated - */ - public void setConnectionProfile (ValueNamePair connectionProfile) - { - if (connectionProfile != null) - setConnectionProfile(PROFILE_LAN); - } // setConnectionProfile - - /** - * Set Connection Profile - * @param connectionProfile connection profile - * @deprecated - */ - public void setConnectionProfile (String connectionProfile) - { - } // setConnectionProfile - - /** - * Get Connection Profile - * @return connection profile - * @deprecated - */ - public String getConnectionProfile () - { - return PROFILE_LAN; - } // getConnectionProfile - - /** - * Get Connection Profile Text - * @param connectionProfile - * @return connection profile text - * @deprecated - */ - public String getConnectionProfileText (String connectionProfile) - { - for (int i = 0; i < CONNECTIONProfiles.length; i++) - { - if (CONNECTIONProfiles[i].getValue().equals(connectionProfile)) - return CONNECTIONProfiles[i].getName(); - } - return CONNECTIONProfiles[0].getName(); - } // getConnectionProfileText - - /** - * Get Connection Profile Text - * @return connection profile text - * @deprecated - */ - public String getConnectionProfileText () - { - return getConnectionProfileText(getConnectionProfile()); - } // getConnectionProfileText - - /** - * Get Connection Profile - * @return connection profile - * @deprecated - */ - public ValueNamePair getConnectionProfilePair () - { - for (int i = 0; i < CONNECTIONProfiles.length; i++) - { - if (CONNECTIONProfiles[i].getValue().equals(getConnectionProfile())) - return CONNECTIONProfiles[i]; - } - return CONNECTIONProfiles[0]; - } // getConnectionProfilePair - /** * Should objects be created on Server ? * @return true if client and VPN/WAN diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_Role.java b/org.adempiere.base/src/org/compiere/model/I_AD_Role.java index 699776a047..9d8ddbda51 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_Role.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_Role.java @@ -258,19 +258,6 @@ public interface I_AD_Role */ public int getConfirmQueryRecords(); - /** Column name ConnectionProfile */ - public static final String COLUMNNAME_ConnectionProfile = "ConnectionProfile"; - - /** Set Connection Profile. - * How a Java Client connects to the server(s) - */ - public void setConnectionProfile (String ConnectionProfile); - - /** Get Connection Profile. - * How a Java Client connects to the server(s) - */ - public String getConnectionProfile(); - /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_User.java b/org.adempiere.base/src/org/compiere/model/I_AD_User.java index 1baffac23b..80dbbdcd97 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_User.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_User.java @@ -192,19 +192,6 @@ public interface I_AD_User */ public String getComments(); - /** Column name ConnectionProfile */ - public static final String COLUMNNAME_ConnectionProfile = "ConnectionProfile"; - - /** Set Connection Profile. - * How a Java Client connects to the server(s) - */ - public void setConnectionProfile (String ConnectionProfile); - - /** Get Connection Profile. - * How a Java Client connects to the server(s) - */ - public String getConnectionProfile(); - /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_Role.java b/org.adempiere.base/src/org/compiere/model/X_AD_Role.java index b702b7d5c4..ff899d9807 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_Role.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_Role.java @@ -32,7 +32,7 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent /** * */ - private static final long serialVersionUID = 20121031L; + private static final long serialVersionUID = 20121219L; /** Standard Constructor */ public X_AD_Role (Properties ctx, int AD_Role_ID, String trxName) @@ -518,34 +518,6 @@ public class X_AD_Role extends PO implements I_AD_Role, I_Persistent return ii.intValue(); } - /** ConnectionProfile AD_Reference_ID=364 */ - public static final int CONNECTIONPROFILE_AD_Reference_ID=364; - /** LAN = L */ - public static final String CONNECTIONPROFILE_LAN = "L"; - /** Terminal Server = T */ - public static final String CONNECTIONPROFILE_TerminalServer = "T"; - /** VPN = V */ - public static final String CONNECTIONPROFILE_VPN = "V"; - /** WAN = W */ - public static final String CONNECTIONPROFILE_WAN = "W"; - /** Set Connection Profile. - @param ConnectionProfile - How a Java Client connects to the server(s) - */ - public void setConnectionProfile (String ConnectionProfile) - { - - set_Value (COLUMNNAME_ConnectionProfile, ConnectionProfile); - } - - /** Get Connection Profile. - @return How a Java Client connects to the server(s) - */ - public String getConnectionProfile () - { - return (String)get_Value(COLUMNNAME_ConnectionProfile); - } - /** Set Days Approval Accumulated. @param DaysApprovalAccum The days approval indicates the days to take into account to verify the accumulated approval amount. diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_User.java b/org.adempiere.base/src/org/compiere/model/X_AD_User.java index a429eb4f5f..f2b2342aee 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_User.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_User.java @@ -31,7 +31,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent /** * */ - private static final long serialVersionUID = 20121031L; + private static final long serialVersionUID = 20121219L; /** Standard Constructor */ public X_AD_User (Properties ctx, int AD_User_ID, String trxName) @@ -306,34 +306,6 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent return (String)get_Value(COLUMNNAME_Comments); } - /** ConnectionProfile AD_Reference_ID=364 */ - public static final int CONNECTIONPROFILE_AD_Reference_ID=364; - /** LAN = L */ - public static final String CONNECTIONPROFILE_LAN = "L"; - /** Terminal Server = T */ - public static final String CONNECTIONPROFILE_TerminalServer = "T"; - /** VPN = V */ - public static final String CONNECTIONPROFILE_VPN = "V"; - /** WAN = W */ - public static final String CONNECTIONPROFILE_WAN = "W"; - /** Set Connection Profile. - @param ConnectionProfile - How a Java Client connects to the server(s) - */ - public void setConnectionProfile (String ConnectionProfile) - { - - set_Value (COLUMNNAME_ConnectionProfile, ConnectionProfile); - } - - /** Get Connection Profile. - @return How a Java Client connects to the server(s) - */ - public String getConnectionProfile () - { - return (String)get_Value(COLUMNNAME_ConnectionProfile); - } - /** Set Date Account Locked. @param DateAccountLocked Date Account Locked */ public void setDateAccountLocked (Timestamp DateAccountLocked) diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 99b9eca9bf..f5985be606 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -157,9 +157,6 @@ public class Login private static CLogger log = CLogger.getCLogger(Login.class); /** Context */ private Properties m_ctx = null; - /** Connection Profile */ - private String m_connectionProfile = null; - /** * (Test) Client Login. @@ -409,18 +406,6 @@ public class Login Ini.setProperty(Ini.P_UID, ""); if (Ini.isPropertyBool(Ini.P_STORE_PWD) && MSystem.isSwingRememberPasswordAllowed()) Ini.setProperty(Ini.P_PWD, app_pwd); - - m_connectionProfile = rs.getString(4); // User Based - if (m_connectionProfile != null) - { - CConnection cc = CConnection.get(); - if (!cc.getConnectionProfile().equals(m_connectionProfile)) - { - cc.setConnectionProfile(m_connectionProfile); - Ini.setProperty(Ini.P_CONNECTION, cc.toStringLong()); - Ini.saveProperties(false); - } - } } do // read all roles @@ -508,20 +493,6 @@ public class Login // User Level Env.setContext(m_ctx, "#User_Level", rs.getString(1)); // Format 'SCO' - // ConnectionProfile - CConnection cc = CConnection.get(); - if (m_connectionProfile == null) // No User Based - { - m_connectionProfile = rs.getString(2); // Role Based - if (m_connectionProfile != null - && !cc.getConnectionProfile().equals(m_connectionProfile)) - { - cc.setConnectionProfile(m_connectionProfile); - Ini.setProperty(Ini.P_CONNECTION, cc.toStringLong()); - Ini.saveProperties(false); - } - } - // load Clients do { @@ -615,18 +586,6 @@ public class Login Ini.setProperty(Ini.P_ROLE, rol.getName()); // User Level Env.setContext(m_ctx, "#User_Level", rs.getString(1)); // Format 'SCO' - // ConnectionProfile - CConnection cc = CConnection.get(); - if (m_connectionProfile == null) // No User Based - { - m_connectionProfile = rs.getString(2); // Role Based - if (m_connectionProfile != null && !cc.getConnectionProfile().equals(m_connectionProfile)) - { - cc.setConnectionProfile(m_connectionProfile); - Ini.setProperty(Ini.P_CONNECTION, cc.toStringLong()); - Ini.saveProperties(false); - } - } // load Orgs do{ diff --git a/org.adempiere.ui.swing-feature/adempiere-client.bat b/org.adempiere.ui.swing-feature/adempiere-client.bat index 2c866c60a9..7dcda7188f 100644 --- a/org.adempiere.ui.swing-feature/adempiere-client.bat +++ b/org.adempiere.ui.swing-feature/adempiere-client.bat @@ -17,4 +17,4 @@ goto START @Echo Starting Adempiere Client ... @Echo ======================================= -@"%JAVA%" -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dosgi.compatibility.bootdelegation=true -XX:MaxPermSize=192m -jar plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -application org.adempiere.ui.swing.client +@"%JAVA%" -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dosgi.compatibility.bootdelegation=true -XX:MaxPermSize=192m -jar plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.ui.swing.client diff --git a/org.adempiere.ui.swing-feature/adempiere-client.sh b/org.adempiere.ui.swing-feature/adempiere-client.sh index f43afa5d5b..4ce7899eb8 100644 --- a/org.adempiere.ui.swing-feature/adempiere-client.sh +++ b/org.adempiere.ui.swing-feature/adempiere-client.sh @@ -1,5 +1,9 @@ #!/bin/sh # +# script parameters are used as VM args. e.g.: +# ./adempiere-client.sh -DPropertyFile=/home/tbayen/idempiere-conf2.properties +# -- tbayen + if [ $JAVA_HOME ]; then JAVA=$JAVA_HOME/bin/java else @@ -13,4 +17,4 @@ echo =================================== echo Starting Adempiere Client echo =================================== -$JAVA -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dosgi.compatibility.bootdelegation=true -XX:MaxPermSize=192m -jar plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -application org.adempiere.ui.swing.client +$JAVA -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dosgi.compatibility.bootdelegation=true $@ -XX:MaxPermSize=192m -jar plugins/org.eclipse.equinox.launcher_ 1.*.jar -application org.adempiere.ui.swing.client diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java b/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java index 78efa35901..3b8b12219f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/Preference.java @@ -49,7 +49,6 @@ import javax.swing.table.DefaultTableModel; import org.adempiere.plaf.AdempierePLAF; import org.adempiere.plaf.PLAFEditorPanel; -import org.compiere.db.CConnection; import org.compiere.grid.ed.VDate; import org.compiere.minigrid.MiniTable; import org.compiere.model.MRole; @@ -93,7 +92,7 @@ public final class Preference extends CDialog /** * */ - private static final long serialVersionUID = -8923143271736597338L; + private static final long serialVersionUID = -4691368295400769754L; /** * Standard Constructor @@ -165,8 +164,6 @@ public final class Preference extends CDialog private CPrinter fPrinter = new CPrinter(); private CLabel lDate = new CLabel(); private VDate fDate = new VDate(); - private CComboBox connectionProfile = new CComboBox(CConnection.CONNECTIONProfiles); - private CLabel connectionProfileLabel = new CLabel(); private CPanel errorPane = new CPanel(); private BorderLayout errorLayout = new BorderLayout(); private JScrollPane errorScrollPane = new JScrollPane(); @@ -239,7 +236,6 @@ public final class Preference extends CDialog showAcct.setToolTipText(Msg.getMsg(Env.getCtx(), "ShowAcctTab", false)); showAdvanced.setText(Msg.getMsg(Env.getCtx(), "ShowAdvancedTab", true)); showAdvanced.setToolTipText(Msg.getMsg(Env.getCtx(), "ShowAdvancedTab", false)); - connectionProfileLabel.setText(Msg.getElement(Env.getCtx(), "ConnectionProfile")); cacheWindow.setText(Msg.getMsg(Env.getCtx(), "CacheWindow", true)); cacheWindow.setToolTipText(Msg.getMsg(Env.getCtx(), "CacheWindow", false)); lPrinter.setText(Msg.getMsg(Env.getCtx(), "Printer")); @@ -288,10 +284,6 @@ public final class Preference extends CDialog CPanel connPanel = new CPanel(); connPanel.setBorder(BorderFactory.createTitledBorder(Msg.getMsg(Env.getCtx(), "Connection"))); connPanel.setLayout(new GridBagLayout()); - connPanel.add(connectionProfileLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0)); - connPanel.add(connectionProfile, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0)); connPanel.add(validateConnectionOnStartup, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 0), 0, 0)); customizePane.add(connPanel, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0 @@ -505,17 +497,6 @@ public final class Preference extends CDialog showTrl.setSelected(Ini.isPropertyBool(Ini.P_SHOW_TRL)); showAdvanced.setSelected(Ini.isPropertyBool(Ini.P_SHOW_ADVANCED)); - // Connection Profile - MUser user = MUser.get(Env.getCtx()); - String cp = user.getConnectionProfile(); - if (cp == null) - cp = MRole.getDefault().getConnectionProfile(); - if (cp != null) - { - CConnection.get().setConnectionProfile(cp); - connectionProfile.setReadWrite(false); - } - connectionProfile.setSelectedItem(CConnection.get().getConnectionProfilePair()); cacheWindow.setSelected(Ini.isCacheWindow()); // Print Preview @@ -594,14 +575,6 @@ public final class Preference extends CDialog Ini.setProperty(Ini.P_SHOW_ADVANCED, (showAdvanced.isSelected())); Env.setContext(Env.getCtx(), "#ShowAdvanced", (showAdvanced.isSelected())); - // ConnectionProfile - ValueNamePair ppNew = (ValueNamePair)connectionProfile.getSelectedItem(); - String cpNew = ppNew.getValue(); - String cpOld = CConnection.get().getConnectionProfile(); - CConnection.get().setConnectionProfile(cpNew); - if (!cpNew.equals(cpOld) - && (cpNew.equals(CConnection.PROFILE_WAN) || cpOld.equals(CConnection.PROFILE_WAN))) - ADialog.info(0, this, "ConnectionProfileChange"); Ini.setProperty(Ini.P_CACHE_WINDOW, cacheWindow.isSelected()); // Print Preview 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 aa32d6df9a..ba45d4e829 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 @@ -276,25 +276,23 @@ public class ValuePreference extends Window implements EventListener rows.setParent(setLayout); Row row = new Row(); - row.setSpans("1, 4, 1"); Div div = new Div(); div.setStyle("text-align: right"); div.appendChild(lAttribute); - row.appendChild(div); - row.appendChild(fAttribute); + row.appendCellChild(div, 1); + row.appendCellChild(fAttribute, 4); fAttribute.setWidth("100%"); - row.appendChild(lAttributeValue); + row.appendCellChild(lAttributeValue, 1); rows.appendChild(row); row = new Row(); - row.setSpans("1, 4, 1"); div = new Div(); div.setStyle("text-align: right"); div.appendChild(lValue); - row.appendChild(div); - row.appendChild(fValue); + row.appendCellChild(div, 1); + row.appendCellChild(fValue, 4); fValue.setWidth("100%"); - row.appendChild(lValueValue); + row.appendCellChild(lValueValue, 1); rows.appendChild(row); row = new Row(); @@ -309,9 +307,8 @@ public class ValuePreference extends Window implements EventListener rows.appendChild(row); row = new Row(); - row.setSpans("1, 5"); - row.appendChild(new Space()); - row.appendChild(lExplanation); + row.appendCellChild(new Space(), 1); + row.appendCellChild(lExplanation, 5); rows.appendChild(row); // 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 8bf26b8cd0..310157a55e 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 @@ -76,6 +76,7 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Button; +import org.zkoss.zul.Cell; import org.zkoss.zul.Center; import org.zkoss.zul.DefaultTreeNode; import org.zkoss.zul.Div; @@ -454,7 +455,10 @@ DataStatusListener, IADTabpanel, IdSpace else { Group rowg = new Group(fieldGroup); - rowg.setSpans(numColsS); + Cell cell = new Cell(); + cell.setColspan(numCols); + rowg.appendChild(cell); + allCollapsibleGroups.add(rowg); if (X_AD_FieldGroup.FIELDGROUPTYPE_Tab.equals(field.getFieldGroupType()) || field.getIsCollapsedByDefault()) { @@ -502,7 +506,7 @@ DataStatusListener, IADTabpanel, IdSpace editorComps.add(editor.getComponent()); if (paintLabel) { Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); Label label = editor.getLabel(); div.appendChild(label); if (label.getDecorator() != null) @@ -556,7 +560,7 @@ DataStatusListener, IADTabpanel, IdSpace //display just a label if we are "heading only" Label label = new Label(field.getHeader()); Div div = new Div(); - div.setAlign("center"); + div.setStyle("text-align: center;"); row.appendCellChild(createSpacer()); div.appendChild(label); row.appendCellChild(div); 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 7b60526a4b..4b17b4d42a 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 @@ -288,7 +288,7 @@ public class ProcessParameterPanel extends Panel implements m_wEditors.add(editor); // add to Editors Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); org.adempiere.webui.component.Label label = editor.getLabel(); div.appendChild(label); if (label.getDecorator() != null) 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 5dddbf4193..4efe074587 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 @@ -194,12 +194,11 @@ public class WAllocation extends Allocation row.appendChild(organizationPick.getComponent()); row = rows.newRow(); - row.appendChild(currencyLabel.rightAlign()); - row.appendChild(currencyPick.getComponent()); - row.appendChild(multiCurrency); - row.appendChild(new Space()); - row.appendChild(new Space()); - row.setSpans("1,1,2,1,1"); + row.appendCellChild(currencyLabel.rightAlign(),1); + row.appendCellChild(currencyPick.getComponent(),1); + row.appendCellChild(multiCurrency,2); + row.appendCellChild(new Space(),1); + row.appendCellChild(new Space(),1); row = rows.newRow(); row.appendChild(new Space()); 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 8aaed1568d..6891698f36 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 @@ -231,90 +231,82 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis Row row = new Row(); rows.appendChild(row); - row.setSpans("3"); row.setAlign("right"); - row.appendChild(reportField); + row.appendCellChild(reportField, 3); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(processLabel); - row.appendChild(div); - row.appendChild(processField); + row.appendCellChild(div, 1); + row.appendCellChild(processField, 2); processField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(bPartnerLabel); - row.appendChild(div); - row.appendChild(bPartnerField.getComponent()); + row.appendCellChild(div, 1); + row.appendCellChild(bPartnerField.getComponent(), 2); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(tableLabel); - row.appendChild(div); - row.appendChild(tableField); + row.appendCellChild(div, 1); + row.appendCellChild(tableField, 2); tableField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(nameQLabel); - row.appendChild(div); - row.appendChild(nameQField); + row.appendCellChild(div, 1); + row.appendCellChild(nameQField, 2); nameQField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(descriptionQLabel); - row.appendChild(div); - row.appendChild(descriptionQField); + row.appendCellChild(div, 1); + row.appendCellChild(descriptionQField, 2); descriptionQField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(helpQLabel); - row.appendChild(div); - row.appendChild(helpQField); + row.appendCellChild(div, 1); + row.appendCellChild(helpQField, 2); helpQField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(createdByQLabel); - row.appendChild(div); - row.appendChild(createdByQField); + row.appendCellChild(div, 1); + row.appendCellChild(createdByQField, 2); createdByQField.setWidth("100%"); row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(createdQLabel); row.appendChild(div); row.appendChild(createdQFrom); row.appendChild(createdQTo); div = new Div(); - div.setAlign("center"); + div.setStyle("text-align: center;"); div.appendChild(gridQuery); Tabpanel tabQueryPanel = new Tabpanel(); @@ -335,87 +327,76 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis row = new Row(); rows.appendChild(row); - row.setSpans("1, 2, 1"); div = new Div(); - div.setAlign("left"); + div.setStyle("text-align: left;"); div.appendChild(bBack); - row.appendChild(div); + row.appendCellChild(div, 1); div = new Div(); - div.setAlign("center"); + div.setStyle("text-align: center;"); div.appendChild(positionInfo); - row.appendChild(div); + row.appendCellChild(div, 2); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(bNext); - row.appendChild(div); + row.appendCellChild(div, 1); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(createdByLabel); + row.appendCellChild(createdByLabel, 4); createdByLabel.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(createdByField); + row.appendCellChild(createdByField, 4); createdByField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(createdField); - row.appendChild(div); + row.appendCellChild(div, 4); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(nameLabel); + row.appendCellChild(nameLabel, 4); nameLabel.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(nameField); + row.appendCellChild(nameField, 4); nameField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(descriptionLabel); + row.appendCellChild(descriptionLabel, 4); descriptionLabel.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(descriptionField); + row.appendCellChild(descriptionField, 4); descriptionField.setRows(3); descriptionField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(helpLabel); + row.appendCellChild(helpLabel, 4); helpLabel.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); - row.appendChild(helpField); + row.appendCellChild(helpField, 4); helpField.setRows(3); helpField.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("4"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(deleteArchive); div.appendChild(bRefresh); - div.appendChild(updateArchive); - row.appendChild(div); + div.appendChild(updateArchive); + row.appendCellChild(div, 4); createdByField.setReadonly(true); createdField.getDatebox().setReadonly(true); 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 a806d3c995..466285ec6a 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 @@ -122,46 +122,42 @@ public class WAttributeGrid extends ADForm implements EventListener Row row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(attributeLabel1); - row.appendChild(div); - row.appendChild(attributeCombo1); + row.appendCellChild(div, 1); + row.appendCellChild(attributeCombo1, 2); attributeCombo1.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(attributeLabel2); - row.appendChild(div); - row.appendChild(attributeCombo2); + row.appendCellChild(div, 1); + row.appendCellChild(attributeCombo2, 2); attributeCombo2.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(labelPriceList); - row.appendChild(div); - row.appendChild(pickPriceList); + row.appendCellChild(div, 1); + row.appendCellChild(pickPriceList, 2); pickPriceList.setWidth("100%"); row = new Row(); rows.appendChild(row); - row.setSpans("1, 2"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(labelWarehouse); - row.appendChild(div); - row.appendChild(pickWarehouse); + row.appendCellChild(div, 1); + row.appendCellChild(pickWarehouse, 2); pickWarehouse.setWidth("100%"); div = new Div(); - div.setAlign("center"); + div.setStyle("text-align: center;"); div.appendChild(gridSelection); Tabpanel tabSelectionPanel = new Tabpanel(); @@ -172,7 +168,7 @@ public class WAttributeGrid extends ADForm implements EventListener tabs.appendChild(tabSelection); div = new Div(); - div.setAlign("center"); + div.setStyle("text-align: center;"); div.appendChild(modeLabel); div.appendChild(modeCombo); modeCombo.addEventListener(Events.ON_CHANGE, this); @@ -456,7 +452,7 @@ public class WAttributeGrid extends ADForm implements EventListener if (xValues != null) { Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(new Label(m_attributes[indexAttr1].getName())); descr.appendChild(div); } @@ -470,7 +466,7 @@ public class WAttributeGrid extends ADForm implements EventListener if (xValue != null) { Div div = new Div(); - div.setAlign("center"); + div.setStyle("text-align: center;"); div.appendChild(new Label(xValue.getName())); row.appendChild(div); } 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 46d398169b..7e26cd357d 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 @@ -273,7 +273,7 @@ public class WCharge extends Charge implements IFormController, EventListener, Va Center center = new Center(); center.setStyle("border: none"); contentPane.appendChild(center); + gridPanel.setHflex("true"); + gridPanel.setVflex("true"); center.appendChild(gridPanel); - center.setFlex(true); South south = new South(); south.setStyle("border: none"); contentPane.appendChild(south); 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 0dded799de..b0597605c1 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 @@ -118,8 +118,7 @@ public class WSQLProcess extends ADForm implements EventListener m_txbResultField.setRows(noResultRows); m_txbResultField.setReadonly(true); - rwBottom.appendChild(m_txbResultField); - rwBottom.setSpans("3"); + rwBottom.appendCellChild(m_txbResultField, 3); rwBottom.setAlign("center"); rows.appendChild(rwBottom); 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 6e9ffd5dcf..bdefcbfe35 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 @@ -188,7 +188,6 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe // set size in percentage per column leaving a MARGIN on right Columns columns = new Columns(); form.appendChild(columns); - String numColsS=String.valueOf(numCols); int equalWidth = 98 / numCols; for (int h=0;h Row row = new Row(); rows.appendChild(row); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lNode); row.appendChild(div); row.appendChild(fNode); @@ -166,7 +166,7 @@ public class WWFActivity extends ADForm implements EventListener rows.appendChild(row); row.setValign("top"); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lDesctiption); row.appendChild(div); row.appendChild(fDescription); @@ -177,7 +177,7 @@ public class WWFActivity extends ADForm implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lHelp); row.appendChild(div); row.appendChild(fHelp); @@ -190,7 +190,7 @@ public class WWFActivity extends ADForm implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lHistory); row.appendChild(div); row.appendChild(fHistory); @@ -199,7 +199,7 @@ public class WWFActivity extends ADForm implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lAnswer); row.appendChild(div); Hbox hbox = new Hbox(); @@ -214,7 +214,7 @@ public class WWFActivity extends ADForm implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lTextMsg); row.appendChild(div); row.appendChild(fTextMsg); @@ -225,7 +225,7 @@ public class WWFActivity extends ADForm implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lForward); row.appendChild(div); hbox = new Hbox(); 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 fb53e2ea7d..0587abd727 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 @@ -125,7 +125,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo row.appendChild(cbTable); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(bExport); row = rows.newRow(); 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 adf062fdd3..0a7cbe5692 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 @@ -240,7 +240,7 @@ public class CustomizeGridViewPanel extends Panel south.setStyle("border: none; margin: none"); Panel southPanel = new Panel(); south.setHeight("35px"); - southPanel.setAlign("Right"); + south.setStyle("text-align: right;"); southPanel.setStyle("margin-top: 2px; margin-right: 4px"); @SuppressWarnings("unused") String label = Msg.getMsg(Env.getCtx(), "save"); 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 18693dc216..f4c631ce0a 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 @@ -213,11 +213,11 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(serNoLabel); row.appendChild(div); row.appendChild(serNoField.getComponent()); @@ -187,7 +188,7 @@ public class InfoPAttributePanel extends Window implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lotLabel); row.appendChild(div); row.appendChild(lotField.getComponent()); @@ -196,7 +197,7 @@ public class InfoPAttributePanel extends Window implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lotLabel2); row.appendChild(div); row.appendChild(lotSelection); @@ -206,7 +207,7 @@ public class InfoPAttributePanel extends Window implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(guaranteeDateSelection); row.appendChild(div); row.appendChild(guaranteeDateField); @@ -250,14 +251,18 @@ public class InfoPAttributePanel extends Window implements EventListener { Row row = new Row(); rows.appendChild(row); - row.setSpans("2"); + Cell cell = new Cell(); + cell.setColspan(2); + row.appendCellChild(cell); Label group = new Label(Msg.translate(Env.getCtx(), "IsInstanceAttribute")); row.appendChild(group); rows.appendChild(row); row = new Row(); rows.appendChild(row); - row.setSpans("2"); + cell = new Cell(); + cell.setColspan(2); + row.appendCellChild(cell); Separator separator = new Separator(); separator.setBar(true); row.appendChild(separator); @@ -275,7 +280,7 @@ public class InfoPAttributePanel extends Window implements EventListener label.setTooltiptext(description); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(label); row.appendChild(div); @@ -318,7 +323,7 @@ public class InfoPAttributePanel extends Window implements EventListener row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(new Label("-")); row.appendChild(div); row.appendChild(fieldTo); @@ -352,14 +357,18 @@ public class InfoPAttributePanel extends Window implements EventListener if (isGuarantee || isSerial || isLot) { Row row = new Row(); rows.appendChild(row); - row.setSpans("2"); + Cell cell = new Cell(); + cell.setColspan(2); + row.appendCellChild(cell); Label group = new Label(Msg.translate(Env.getCtx(), "IsInstanceAttribute")); row.appendChild(group); rows.appendChild(row); row = new Row(); rows.appendChild(row); - row.setSpans("2"); + cell = new Cell(); + cell.setColspan(2); + row.appendCellChild(cell); Separator separator = new Separator(); separator.setBar(true); row.appendChild(separator); 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 18f67b22cc..f04c9e5303 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 @@ -212,24 +212,22 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, row.appendChild(fIsReceipt); row = new Row(); - row.setSpans("3, 2"); - rows.appendChild(row); - row.appendChild(lDateFrom.rightAlign()); + row.appendCellChild(lDateFrom.rightAlign(), 3); Hbox hbox = new Hbox(); hbox.appendChild(fDateFrom); hbox.appendChild(lDateTo); hbox.appendChild(fDateTo); - row.appendChild(hbox); + row.appendCellChild(hbox, 2); + rows.appendChild(row); row = new Row(); - row.setSpans("3, 2"); - rows.appendChild(row); - row.appendChild(lAmtFrom.rightAlign()); + row.appendCellChild(lAmtFrom.rightAlign(), 3); hbox = new Hbox(); hbox.appendChild(fAmtFrom); hbox.appendChild(lAmtTo); hbox.appendChild(fAmtTo); - row.appendChild(hbox); + row.appendCellChild(hbox, 2); + rows.appendChild(row); layout = new Borderlayout(); layout.setWidth("100%"); 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 9a84c27867..c77ac30891 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 @@ -80,6 +80,7 @@ import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Borderlayout; +import org.zkoss.zul.Cell; import org.zkoss.zul.Center; import org.zkoss.zul.North; import org.zkoss.zul.South; @@ -332,17 +333,17 @@ public class InfoProductPanel extends InfoPanel implements EventListener row.appendChild(m_InfoPAttributeButton); row = new Row(); - row.setSpans("1, 1, 1, 1, 1, 1, 1, 2"); - rows.appendChild(row); - row.appendChild(lblName.rightAlign()); - row.appendChild(fieldName); + row.appendCellChild(lblName.rightAlign()); + row.appendCellChild(fieldName); fieldName.setHflex("1"); - row.appendChild(lblSKU.rightAlign()); - row.appendChild(fieldSKU); + row.appendCellChild(lblSKU.rightAlign()); + row.appendCellChild(fieldSKU); fieldSKU.setHflex("1"); - row.appendChild(lblVendor.rightAlign()); - row.appendChild(fieldVendor); + row.appendCellChild(lblVendor.rightAlign()); + row.appendCellChild(fieldVendor); + rows.appendChild(row); fieldVendor.setHflex("1"); + // row = new Row(); @@ -357,7 +358,9 @@ public class InfoProductPanel extends InfoPanel implements EventListener row = new Row(); rows.appendChild(row); row.appendChild(statusBar); - row.setSpans("6"); + Cell cell = new Cell(); + cell.setColspan(6); + row.appendCellChild(cell); statusBar.setEastVisibility(false); statusBar.setWidth("100%"); 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 f050a84ed1..301fa09ed1 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 @@ -117,7 +117,7 @@ public class ExportAction implements EventListener Hbox hb = new Hbox(); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType"))); hb.appendChild(div); hb.appendChild(cboType); 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 e0a1bc1ed2..25825d4845 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 @@ -146,7 +146,7 @@ public class FileImportAction implements EventListener Hbox hb = new Hbox(); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType"))); hb.appendChild(div); hb.appendChild(cboType); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index b7dcca971a..f82ab70caf 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -60,6 +60,7 @@ import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Borderlayout; +import org.zkoss.zul.Cell; import org.zkoss.zul.Center; import org.zkoss.zul.North; import org.zkoss.zul.South; @@ -224,15 +225,17 @@ public final class WAccountDialog extends Window North nRegion = new North(); nRegion.setParent(layout); - nRegion.setFlex(false); + northPanel.setHflex("false"); + northPanel.setVflex("false"); nRegion.appendChild(northPanel); nRegion.setStyle("background-color: transparent; border: none"); northPanel.setStyle("background-color: transparent;"); Center cRegion = new Center(); cRegion.setParent(layout); + m_adTabPanel.setHflex("true"); + m_adTabPanel.setVflex("true"); cRegion.appendChild(m_adTabPanel); - cRegion.setFlex(true); South sRegion = new South(); sRegion.setParent(layout); @@ -424,8 +427,10 @@ public final class WAccountDialog extends Window m_newRow = true; Row row = new Row(); f_Description.setStyle("font-decoration: italic;"); - row.appendChild(f_Description); - row.setSpans("4"); + Cell cell = new Cell(); + cell.setColspan(4); + cell.appendChild(f_Description); + row.appendChild(cell); row.setStyle("background-color: transparent;"); m_rows.appendChild(row); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java index 30b4305122..00cb9fba13 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java @@ -170,8 +170,7 @@ public class WAssignmentDialog extends Window implements EventListener rows.appendChild(row); row = new Row(); - row.setSpans("1, 2"); - row.appendChild(LayoutUtils.makeRightAlign(lDate)); + row.appendCellChild(LayoutUtils.makeRightAlign(lDate), 1); Div div = new Div(); div.setHflex("1"); div.appendChild(fDateFrom); @@ -179,7 +178,7 @@ public class WAssignmentDialog extends Window implements EventListener div.appendChild(fTimeFrom); fTimeFrom.setCols(10); fTimeFrom.setStyle("margin-left: 1px"); - row.appendChild(div); + row.appendCellChild(div, 2); rows.appendChild(row); row = new Row(); @@ -189,29 +188,25 @@ public class WAssignmentDialog extends Window implements EventListener rows.appendChild(row); row = new Row(); - row.setSpans("1, 2"); - row.appendChild(LayoutUtils.makeRightAlign(lName)); - row.appendChild(fName); + row.appendCellChild(LayoutUtils.makeRightAlign(lName), 1); + row.appendCellChild(fName, 2); fName.setStyle("width: 100%"); rows.appendChild(row); row = new Row(); - row.setSpans("1, 2"); - row.appendChild(LayoutUtils.makeRightAlign(lDescription)); - row.appendChild(fDescription); + row.appendCellChild(LayoutUtils.makeRightAlign(lDescription), 1); + row.appendCellChild(fDescription, 2); fDescription.setMultiline(true); fDescription.setRows(3); fDescription.setStyle("width: 100%"); rows.appendChild(row); row = new Row(); - row.setSpans("3"); - row.appendChild(new Label(" ")); + row.appendCellChild(new Label(" "), 3); rows.appendChild(row); row = new Row(); - row.setSpans("3"); - row.appendChild(confirmPanel); + row.appendCellChild(confirmPanel, 3); rows.appendChild(row); // } // jbInit diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java index fd7c45f6ce..d7f27db5d9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java @@ -137,8 +137,9 @@ public class WChat extends Window implements EventListener, DialogEvents // Center center = new Center(); + messageTree.setHflex("true"); + messageTree.setVflex("true"); center.appendChild(messageTree); - center.setFlex(true); center.setAutoscroll(true); mainPanel.appendChild(center); // diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java index 4fee9ee274..102b671692 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java @@ -206,7 +206,7 @@ public class WEMailDialog extends Window implements EventListener, ValueC Row row = new Row(); rows.appendChild(row); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lFrom); row.appendChild(div); row.appendChild(fFrom); @@ -215,7 +215,7 @@ public class WEMailDialog extends Window implements EventListener, ValueC row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lTo); row.appendChild(div); row.appendChild(fUser.getComponent()); @@ -230,7 +230,7 @@ public class WEMailDialog extends Window implements EventListener, ValueC row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lCc); row.appendChild(div); row.appendChild(fCcUser.getComponent()); @@ -244,13 +244,12 @@ public class WEMailDialog extends Window implements EventListener, ValueC row = new Row(); rows.appendChild(row); - row.setSpans("2"); - row.appendChild(new Separator()); + row.appendCellChild(new Separator(), 2); row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lSubject); row.appendChild(div); row.appendChild(fSubject); @@ -258,13 +257,12 @@ public class WEMailDialog extends Window implements EventListener, ValueC row = new Row(); rows.appendChild(row); - row.setSpans("2"); - row.appendChild(new Separator()); + row.appendCellChild(new Separator(), 2); row = new Row(); rows.appendChild(row); div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(lAttachment); row.appendChild(div); row.appendChild(fAttachment); @@ -272,8 +270,7 @@ public class WEMailDialog extends Window implements EventListener, ValueC row = new Row(); rows.appendChild(row); - row.setSpans("2"); - row.appendChild(fMessage); + row.appendCellChild(fMessage, 2); fMessage.setHflex("1"); fMessage.setRows(10); @@ -285,10 +282,11 @@ public class WEMailDialog extends Window implements EventListener, ValueC layout.setStyle("background-color: white; position: absolute; margin:0; border:0; padding:0"); Center center = new Center(); + grid.setHflex("true"); + grid.setVflex("true"); center.appendChild(grid); layout.appendChild(center); center.setStyle("background-color: white; border: 0"); - center.setFlex(true); South south = new South(); Div southDiv = new Div(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java index e37efed42f..1c8868e501 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java @@ -138,12 +138,12 @@ public class WFieldRecordInfo extends Window implements EventListener Center center = new Center(); center.setParent(layout); - center.setFlex(true); if (showTable) { + table.setHflex("true"); + table.setVflex("true"); center.appendChild(table); table.setWidth("100%"); - table.setVflex(true); } // South south = new South(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java index 547d96b3cb..cfc401b4db 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java @@ -137,7 +137,8 @@ public class WImageDialog extends Window implements EventListener parameterPanel.appendChild((fileButton)); Center center = new Center(); - center.setFlex(true); + image.setHflex("true"); + image.setVflex("true"); center.setParent(mainLayout); center.appendChild(image); center.setStyle("background-color: transparent"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java index ce4aee7799..e204426e81 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java @@ -171,7 +171,8 @@ public class WMediaDialog extends Window implements EventListener Center centerPane = new Center(); centerPane.setAutoscroll(true); - centerPane.setFlex(true); + previewPanel.setHflex("true"); + previewPanel.setVflex("true"); mainPanel.appendChild(centerPane); centerPane.appendChild(previewPanel); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java index e1e40d37a7..65f35f5649 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java @@ -205,7 +205,8 @@ public class WPAttributeDialog extends Window implements EventListener Center center = new Center(); center.setParent(mainLayout); - center.setFlex(true); + centerPanel.setHflex("true"); + centerPanel.setVflex("true"); center.appendChild(centerPanel); South south = new South(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java index fac5a1b82e..ef45ddd9bd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java @@ -145,7 +145,8 @@ public class WPAttributeInstance extends Window implements EventListener // Center Center center = new Center(); center.setParent(mainLayout); - center.setFlex(true); + m_table.setHflex("true"); + m_table.setVflex("true"); center.appendChild(m_table); // South diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java index 77293b5a6b..496a7a7c8e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordAccessDialog.java @@ -208,11 +208,10 @@ public class WRecordAccessDialog extends Window implements EventListener row = new Row(); rows.appendChild(row); - row.setSpans("7"); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(confirmPanel); - row.appendChild(div); + row.appendCellChild(div, 7); bUp.addEventListener(Events.ON_CLICK, this); bDown.addEventListener(Events.ON_CLICK, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java index 38597e31b8..feb035dcb9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WRecordInfo.java @@ -154,9 +154,10 @@ public class WRecordInfo extends Window implements EventListener Center center = new Center(); center.setParent(layout); - center.setFlex(true); if (showTable) { + table.setHflex("true"); + table.setVflex("true"); North north = new North(); north.setParent(layout); north.appendChild(div); @@ -167,6 +168,8 @@ public class WRecordInfo extends Window implements EventListener } else { + div.setHflex("true"); + div.setVflex("true"); center.appendChild(div); } // diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java index 6a0c5fc048..3df44ee21b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WTask.java @@ -173,8 +173,9 @@ public class WTask extends Window implements EventListener Div div = new Div(); div.setStyle("width: 100%; height:100%; overflow: auto"); div.appendChild(info); + div.setHflex("true"); + div.setVflex("true"); center.appendChild(div); - center.setFlex(true); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java index 42517f1534..6182be78f5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java @@ -82,9 +82,10 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl north.appendChild(toolbar); Center center = new Center(); - center.setFlex(true); layout.appendChild(center); iframe = new Iframe(); + iframe.setHflex("true"); + iframe.setVflex("true"); iframe.setId("reportFrame"); iframe.setHeight("100%"); iframe.setWidth("100%"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 8a9239dc8c..db1e35a3b5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -316,9 +316,10 @@ public class ZkReportViewer extends Window implements EventListener, ITab north.appendChild(toolBar); Center center = new Center(); - center.setFlex(true); layout.appendChild(center); iframe = new Iframe(); + iframe.setHflex("true"); + iframe.setVflex("true"); iframe.setId("reportFrame"); center.appendChild(iframe); @@ -806,7 +807,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab Hbox hb = new Hbox(); Div div = new Div(); - div.setAlign("right"); + div.setStyle("text-align: right;"); div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType"))); hb.appendChild(div); hb.appendChild(cboType);