IDEMPIERE-1101 Found issues on management of callouts and dynamicdisplay

This commit is contained in:
Carlos Ruiz 2013-06-23 17:27:04 -05:00
parent a13e69fbef
commit a35ac9ea7c
4 changed files with 17 additions and 10 deletions

View File

@ -987,8 +987,9 @@ public class GridController extends CPanel
if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") "
+ columnName + " - Dependents=" + dependants.size());
// No Dependents and no Callout - Set just Background
if (dependants.size() == 0 && changedField.getCallout().length() > 0)
{
if ( ! ( dependants.size() > 0
|| changedField.getCallout().length() > 0
|| Core.findCallout(m_mTab.getTableName(), columnName).size() > 0)) {
Component[] comp = vPanel.getComponentsRecursive();
for (int i = 0; i < comp.length; i++)
{
@ -1284,8 +1285,10 @@ public class GridController extends CPanel
if (e.getPropertyName().equals("S_ResourceAssignment_ID"))
{
GridField mField = m_mTab.getField(col);
if (mField != null && mField.getCallout().length() > 0)
if (mField != null && (mField.getCallout().length() > 0
|| Core.findCallout(m_mTab.getTableName(), mField.getColumnName()).size()>0)) {
m_mTab.processFieldChange(mField); // Dependencies & Callout
}
}
if (newValues != null && newValues.length > 0)

View File

@ -679,8 +679,9 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
ArrayList<?> dependants = gridTab.getDependantFields(columnName);
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") "
+ columnName + " - Dependents=" + dependants.size());
if (dependants.size() == 0 && changedField.getCallout().length() > 0)
{
if ( ! ( dependants.size() > 0
|| changedField.getCallout().length() > 0
|| Core.findCallout(gridTab.getTableName(), columnName).size() > 0)) {
return;
}
}

View File

@ -22,6 +22,7 @@ import java.util.Properties;
import javax.swing.table.AbstractTableModel;
import org.adempiere.base.Core;
import org.adempiere.model.MTabCustomization;
import org.adempiere.util.GridRowCtx;
import org.adempiere.webui.apps.AEnv;
@ -717,8 +718,9 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
GridField changedField = gridTab.getField(col);
String columnName = changedField.getColumnName();
ArrayList<?> dependants = gridTab.getDependantFields(columnName);
if (dependants.size() == 0 && changedField.getCallout().length() > 0)
{
if ( ! ( dependants.size() > 0
|| changedField.getCallout().length() > 0
|| Core.findCallout(gridTab.getTableName(), columnName).size() > 0)) {
return;
}
}

View File

@ -15,6 +15,7 @@ package org.adempiere.webui.util;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.base.Core;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.event.ValueChangeEvent;
@ -127,10 +128,10 @@ public class GridTabDataBinder implements ValueChangeListener {
if ( e.getPropertyName().equals("S_ResourceAssignment_ID") )
{
GridField mField = gridTab.getField(col);
if (mField != null && mField.getCallout().length() > 0)
{
if (mField != null && (mField.getCallout().length() > 0
|| Core.findCallout(gridTab.getTableName(), mField.getColumnName()).size()>0)) {
gridTab.processFieldChange(mField); // Dependencies & Callout
}
}
}
if (newValues != null && newValues.length > 0)