[ 2167775 ] datetime field not readable when readonly
[ 2166709 ] FR: Info BP not managing users [ 2165569 ] FR: InfoInvoicePanel not managing installments [ 2165216 ] Product field showing New (BP) with right-click * InfoPanel: change field visibility from package to protected
This commit is contained in:
parent
402e32717a
commit
0cff991941
|
@ -15,6 +15,7 @@ package org.adempiere.webui.component;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
@ -39,9 +40,10 @@ public class DatetimeBox extends Panel {
|
|||
}
|
||||
|
||||
private void initComponents() {
|
||||
dateBox.setStyle("display: inline");
|
||||
timeBox.setStyle("display: inline");
|
||||
dateBox.setStyle("display: inline;");
|
||||
timeBox.setStyle("display: inline;");
|
||||
timeBox.setButtonVisible(false);
|
||||
timeBox.setZclass(dateBox.getZclass());
|
||||
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
style = style + ";white-space:nowrap";
|
||||
|
@ -97,8 +99,8 @@ public class DatetimeBox extends Panel {
|
|||
* @param readWrite
|
||||
*/
|
||||
public void setEnabled(boolean readWrite) {
|
||||
dateBox.setDisabled(!readWrite);
|
||||
timeBox.setDisabled(!readWrite);
|
||||
dateBox.setReadonly(!readWrite);
|
||||
timeBox.setReadonly(!readWrite);
|
||||
dateBox.setButtonVisible(readWrite);
|
||||
}
|
||||
|
||||
|
|
|
@ -147,23 +147,24 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
|||
{
|
||||
|
||||
columnName = this.getColumnName();
|
||||
popupMenu = new WEditorPopupMenu(true, true, true, true);
|
||||
|
||||
(getComponent().getTextBox()).setContext(popupMenu.getId());
|
||||
// getComponent().setContext(popupMenu.getId());
|
||||
|
||||
|
||||
if (columnName.equals("C_BPartner_ID"))
|
||||
{
|
||||
popupMenu = new WEditorPopupMenu(true, true, true, true);
|
||||
getComponent().setButtonImage("/images/BPartner10.png");
|
||||
}
|
||||
else if (columnName.equals("M_Product_ID"))
|
||||
{
|
||||
popupMenu = new WEditorPopupMenu(true, true, true, false);
|
||||
getComponent().setButtonImage("/images/Product10.png");
|
||||
}
|
||||
else
|
||||
{
|
||||
popupMenu = new WEditorPopupMenu(true, true, true, false);
|
||||
getComponent().setButtonImage("/images/PickOpen10.png");
|
||||
}
|
||||
|
||||
(getComponent().getTextBox()).setContext(popupMenu.getId());
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @return WHERE clause
|
||||
*/
|
||||
|
||||
String getSQLWhere()
|
||||
protected String getSQLWhere()
|
||||
{
|
||||
StringBuffer sql = new StringBuffer();
|
||||
|
||||
|
@ -283,7 +283,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @throws SQLException
|
||||
*/
|
||||
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
|
||||
|
@ -337,7 +337,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* Show History
|
||||
*/
|
||||
|
||||
void showHistory()
|
||||
protected void showHistory()
|
||||
{
|
||||
log.info( "InfoAsset.showHistory");
|
||||
} // showHistory
|
||||
|
@ -347,7 +347,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @return true
|
||||
*/
|
||||
|
||||
boolean hasHistory()
|
||||
protected boolean hasHistory()
|
||||
{
|
||||
return false;
|
||||
} // hasHistory
|
||||
|
@ -377,7 +377,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @return true
|
||||
*/
|
||||
|
||||
boolean hasZoom()
|
||||
protected boolean hasZoom()
|
||||
{
|
||||
return true;
|
||||
} // hasZoom
|
||||
|
@ -386,7 +386,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* Customize
|
||||
*/
|
||||
|
||||
void customize()
|
||||
protected void customize()
|
||||
{
|
||||
log.info( "InfoAsset.customize");
|
||||
} // customize
|
||||
|
@ -396,7 +396,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @return false
|
||||
*/
|
||||
|
||||
boolean hasCustomize()
|
||||
protected boolean hasCustomize()
|
||||
{
|
||||
return false; // for now
|
||||
} // hasCustomize
|
||||
|
|
|
@ -256,7 +256,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* @return WHERE clause
|
||||
*/
|
||||
|
||||
String getSQLWhere()
|
||||
protected String getSQLWhere()
|
||||
{
|
||||
StringBuffer sql = new StringBuffer();
|
||||
|
||||
|
@ -293,7 +293,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* @throws SQLException
|
||||
*/
|
||||
|
||||
void setParameters (PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters (PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* To be overwritten by concrete classes
|
||||
*/
|
||||
|
||||
void showHistory()
|
||||
protected void showHistory()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* @return true if it has history (default false)
|
||||
*/
|
||||
|
||||
boolean hasHistory()
|
||||
protected boolean hasHistory()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* To be overwritten by concrete classes
|
||||
*/
|
||||
|
||||
void customize()
|
||||
protected void customize()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* @return true if it has customize (default false)
|
||||
*/
|
||||
|
||||
boolean hasCustomize()
|
||||
protected boolean hasCustomize()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* @return true if it has zoom (default false)
|
||||
*/
|
||||
|
||||
boolean hasZoom()
|
||||
protected boolean hasZoom()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
* To be overwritten by concrete classes
|
||||
*/
|
||||
|
||||
void saveSelectionDetail()
|
||||
protected void saveSelectionDetail()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -480,8 +480,7 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl
|
|||
int C_BPartner_Location_ID = 0;
|
||||
|
||||
|
||||
AD_User_ID = ((KeyNamePair)contentPanel.getValueAt(contentPanel.getSelectedIndex(), 3)).getKey();
|
||||
//AD_User_ID = contentPanel.getSelectedRowKey();
|
||||
AD_User_ID = ((KeyNamePair)contentPanel.getValueAt(row, 3)).getKey();
|
||||
|
||||
if (m_C_BPartner_Location_ID_index != -1)
|
||||
{
|
||||
|
|
|
@ -314,7 +314,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
|||
* @return sql where clause
|
||||
*/
|
||||
|
||||
String getSQLWhere()
|
||||
protected String getSQLWhere()
|
||||
{
|
||||
StringBuffer sql = new StringBuffer();
|
||||
|
||||
|
@ -382,7 +382,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
|||
* @throws SQLException
|
||||
*/
|
||||
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
if (fName.getText().length() > 0)
|
||||
|
|
|
@ -391,7 +391,7 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener
|
|||
}
|
||||
|
||||
@Override
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @return where clause
|
||||
*/
|
||||
|
||||
String getSQLWhere()
|
||||
protected String getSQLWhere()
|
||||
{
|
||||
StringBuffer sql = new StringBuffer();
|
||||
|
||||
|
@ -322,7 +322,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @throws SQLException
|
||||
*/
|
||||
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
|
||||
|
@ -387,7 +387,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
* @return true
|
||||
*/
|
||||
|
||||
boolean hasZoom()
|
||||
protected boolean hasZoom()
|
||||
{
|
||||
return true;
|
||||
} // hasZoom
|
||||
|
|
|
@ -395,7 +395,7 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
|||
}
|
||||
|
||||
@Override
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
if (txtDocumentNo.getText().length() > 0)
|
||||
|
@ -541,4 +541,26 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveSelectionDetail() {
|
||||
// publish for Callout to read
|
||||
Integer ID = getSelectedRowKey();
|
||||
Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "C_Invoice_ID", ID == null ? "0" : ID.toString());
|
||||
//
|
||||
int C_InvoicePaySchedule_ID = 0;
|
||||
int row = contentPanel.getSelectedRow();
|
||||
if (row >= 0)
|
||||
{
|
||||
Object value = contentPanel.getValueAt(row, INDEX_PAYSCHEDULE);
|
||||
if (value != null && value instanceof KeyNamePair)
|
||||
C_InvoicePaySchedule_ID = ((KeyNamePair)value).getKey();
|
||||
}
|
||||
if (C_InvoicePaySchedule_ID <= 0) // not selected
|
||||
Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "C_InvoicePaySchedule_ID", "0");
|
||||
else
|
||||
Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "C_InvoicePaySchedule_ID", String.valueOf(C_InvoicePaySchedule_ID));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.WrongValueException;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Separator;
|
||||
import org.zkoss.zul.Vbox;
|
||||
|
@ -356,7 +355,7 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
|
|||
}
|
||||
|
||||
@Override
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
if (txtDocumentNo.getText().length() > 0)
|
||||
|
|
|
@ -680,7 +680,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
* Get Table name Synonym
|
||||
* @return table name
|
||||
*/
|
||||
String getTableName()
|
||||
protected String getTableName()
|
||||
{
|
||||
return p_tableName;
|
||||
} // getTableName
|
||||
|
@ -689,7 +689,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
* Get Key Column Name
|
||||
* @return column name
|
||||
*/
|
||||
String getKeyColumn()
|
||||
protected String getKeyColumn()
|
||||
{
|
||||
return p_keyColumn;
|
||||
} // getKeyColumn
|
||||
|
@ -705,7 +705,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
* To be overwritten by concrete classes
|
||||
* @return WHERE clause
|
||||
*/
|
||||
abstract String getSQLWhere();
|
||||
protected abstract String getSQLWhere();
|
||||
|
||||
/**
|
||||
* Set Parameters for Query
|
||||
|
@ -714,7 +714,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
* @param forCount for counting records
|
||||
* @throws SQLException
|
||||
*/
|
||||
abstract void setParameters (PreparedStatement pstmt, boolean forCount)
|
||||
protected abstract void setParameters (PreparedStatement pstmt, boolean forCount)
|
||||
throws SQLException;
|
||||
/**
|
||||
* notify to search editor of a value change in the selection info
|
||||
|
@ -722,35 +722,35 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
*
|
||||
*/
|
||||
|
||||
void showHistory() {}
|
||||
protected void showHistory() {}
|
||||
/**
|
||||
* Has History (false)
|
||||
* To be overwritten by concrete classes
|
||||
* @return true if it has history (default false)
|
||||
*/
|
||||
boolean hasHistory() {return false;}
|
||||
protected boolean hasHistory() {return false;}
|
||||
/**
|
||||
* Customize dialog
|
||||
* To be overwritten by concrete classes
|
||||
*/
|
||||
void customize() {}
|
||||
protected void customize() {}
|
||||
/**
|
||||
* Has Customize (false)
|
||||
* To be overwritten by concrete classes
|
||||
* @return true if it has customize (default false)
|
||||
*/
|
||||
boolean hasCustomize() {return false;}
|
||||
protected boolean hasCustomize() {return false;}
|
||||
/**
|
||||
* Has Zoom (false)
|
||||
* To be overwritten by concrete classes
|
||||
* @return true if it has zoom (default false)
|
||||
*/
|
||||
boolean hasZoom() {return false;}
|
||||
protected boolean hasZoom() {return false;}
|
||||
/**
|
||||
* Save Selection Details
|
||||
* To be overwritten by concrete classes
|
||||
*/
|
||||
void saveSelectionDetail() {}
|
||||
protected void saveSelectionDetail() {}
|
||||
|
||||
/**
|
||||
* Get Zoom Window
|
||||
|
|
|
@ -294,7 +294,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
* @return sql where clause
|
||||
*/
|
||||
|
||||
String getSQLWhere()
|
||||
protected String getSQLWhere()
|
||||
{
|
||||
StringBuffer sql = new StringBuffer();
|
||||
|
||||
|
@ -347,7 +347,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
* @throws SQLException
|
||||
*/
|
||||
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
|
||||
|
@ -442,7 +442,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
* @return true
|
||||
*/
|
||||
|
||||
boolean hasZoom()
|
||||
protected boolean hasZoom()
|
||||
{
|
||||
return true;
|
||||
} // hasZoom
|
||||
|
|
|
@ -543,7 +543,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
* @param forCount for counting records
|
||||
* @throws SQLException
|
||||
*/
|
||||
void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
protected void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||
{
|
||||
int index = 1;
|
||||
|
||||
|
@ -651,7 +651,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
/**
|
||||
* Show History
|
||||
*/
|
||||
void showHistory()
|
||||
protected void showHistory()
|
||||
{
|
||||
/*log.info("");
|
||||
Integer M_Product_ID = getSelectedRowKey();
|
||||
|
@ -674,7 +674,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
*
|
||||
* @return true (has history)
|
||||
*/
|
||||
boolean hasHistory()
|
||||
protected boolean hasHistory()
|
||||
{
|
||||
return true;
|
||||
} // hasHistory
|
||||
|
@ -683,7 +683,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
* Has Zoom
|
||||
* @return (has zoom)
|
||||
*/
|
||||
boolean hasZoom()
|
||||
protected boolean hasZoom()
|
||||
{
|
||||
return true;
|
||||
} // hasZoom
|
||||
|
@ -691,7 +691,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
/**
|
||||
* Customize
|
||||
*/
|
||||
void customize()
|
||||
protected void customize()
|
||||
{
|
||||
log.info("");
|
||||
} // customize
|
||||
|
@ -700,7 +700,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
* Has Customize
|
||||
* @return false (no customize)
|
||||
*/
|
||||
boolean hasCustomize()
|
||||
protected boolean hasCustomize()
|
||||
{
|
||||
return false; // for now
|
||||
} // hasCustomize
|
||||
|
@ -708,7 +708,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
/**
|
||||
* Save Selection Settings for PriceList
|
||||
*/
|
||||
void saveSelectionDetail()
|
||||
protected void saveSelectionDetail()
|
||||
{
|
||||
// publish for Callout to read
|
||||
Integer ID = getSelectedRowKey();
|
||||
|
|
Loading…
Reference in New Issue