IDEMPIERE-17 Value Preference window showing encrypted content to user. Obscure and encrypted field shouldn't have value preference menu.

(transplanted from f3dac9b97af35d9521a989d28c23aca3449ed947)
This commit is contained in:
Heng Sin Low 2011-09-10 18:30:29 +08:00
parent 8c13dbc2fb
commit fd4c1062fc
5 changed files with 15 additions and 10 deletions

View File

@ -428,7 +428,7 @@ public class VDate extends JComponent
// Preference
if (e.getActionCommand().equals(ValuePreference.NAME))
{
if (MRole.getDefault().isShowPreference())
if (MRole.getDefault().isShowPreference() && !m_mField.isEncrypted() && !m_mField.isEncryptedColumn())
ValuePreference.start (m_mField, getValue(), getDisplay());
return;
}
@ -563,7 +563,8 @@ public class VDate extends JComponent
{
m_mField = mField;
if (m_mField != null
&& MRole.getDefault().isShowPreference())
&& MRole.getDefault().isShowPreference()
&& !mField.isEncrypted() && !mField.isEncryptedColumn())
ValuePreference.addMenu (this, popupMenu);
if (m_mField != null)
FieldRecordInfo.addMenu(this, popupMenu);

View File

@ -674,7 +674,8 @@ public class VLookup extends JComponent
{
m_mField = mField;
if (m_mField != null
&& MRole.getDefault().isShowPreference())
&& MRole.getDefault().isShowPreference()
&& !mField.isEncrypted() && !mField.isEncryptedColumn())
ValuePreference.addMenu (this, popupMenu);
if (m_mField != null)
@ -700,7 +701,7 @@ public class VLookup extends JComponent
// Preference
if (e.getActionCommand().equals(ValuePreference.NAME))
{
if (MRole.getDefault().isShowPreference())
if (MRole.getDefault().isShowPreference() && !m_mField.isEncrypted() && !m_mField.isEncryptedColumn())
ValuePreference.start (m_mField, getValue(), getDisplay());
return;
}

View File

@ -549,7 +549,7 @@ public final class VNumber extends JComponent
log.config(e.getActionCommand());
if (ValuePreference.NAME.equals(e.getActionCommand()))
{
if (MRole.getDefault().isShowPreference())
if (MRole.getDefault().isShowPreference() && !m_mField.isEncrypted() && !m_mField.isEncryptedColumn())
ValuePreference.start (m_mField, getValue());
return;
}
@ -758,7 +758,8 @@ public final class VNumber extends JComponent
m_mField = mField;
if (m_mField != null
&& MRole.getDefault().isShowPreference())
&& MRole.getDefault().isShowPreference()
&& !mField.isEncrypted() && !mField.isEncryptedColumn())
ValuePreference.addMenu (this, popupMenu);
if (m_mField != null)

View File

@ -263,7 +263,7 @@ public final class VString extends CTextField
{
if (e.getActionCommand().equals(ValuePreference.NAME))
{
if (MRole.getDefault().isShowPreference())
if (MRole.getDefault().isShowPreference() && !m_mField.isEncrypted() && !m_mField.isEncryptedColumn())
ValuePreference.start (m_mField, getValue());
return;
}
@ -298,7 +298,8 @@ public final class VString extends CTextField
{
m_mField = mField;
if (m_mField != null
&& MRole.getDefault().isShowPreference())
&& MRole.getDefault().isShowPreference()
&& !mField.isEncrypted() && !mField.isEncryptedColumn())
ValuePreference.addMenu (this, popupMenu);
if (m_mField != null)
FieldRecordInfo.addMenu(this, popupMenu);

View File

@ -372,7 +372,7 @@ public class VURL extends JComponent
{
if (e.getActionCommand().equals(ValuePreference.NAME))
{
if (MRole.getDefault().isShowPreference())
if (MRole.getDefault().isShowPreference() && !m_mField.isEncrypted() && !m_mField.isEncryptedColumn())
ValuePreference.start (m_mField, getValue());
return;
}
@ -436,7 +436,8 @@ public class VURL extends JComponent
{
m_mField = mField;
if (m_mField != null
&& MRole.getDefault().isShowPreference())
&& MRole.getDefault().isShowPreference()
&& !mField.isEncrypted() && !mField.isEncryptedColumn())
ValuePreference.addMenu (this, popupMenu);
if (m_mField != null)
FieldRecordInfo.addMenu(this, popupMenu);