Fix [2987531] Cannot search on Posted field - Thanks to Paul
reverted revision 12035 implemented new patch submitted by Paul peer reviewed and tested (swing and zkwebui) added migration script to fix some dictionary errors on Posted columns Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2987531
This commit is contained in:
parent
1d539373ab
commit
95c5b756be
|
@ -116,7 +116,7 @@ public final class Find extends CDialog
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6414604433732835411L;
|
||||
private static final long serialVersionUID = -5064336990363669996L;
|
||||
private int m_AD_Tab_ID;
|
||||
|
||||
/**
|
||||
|
@ -209,8 +209,6 @@ public final class Find extends CDialog
|
|||
public static final int FIELDLENGTH = 20;
|
||||
/** Reference ID for Yes/No */
|
||||
public static final int AD_REFERENCE_ID_YESNO = 319;
|
||||
/** Reference ID for Posted */
|
||||
public static final int AD_REFERENCE_ID_POSTED = 234;
|
||||
|
||||
|
||||
//
|
||||
|
@ -491,25 +489,27 @@ public final class Find extends CDialog
|
|||
mField = ynfield;
|
||||
}
|
||||
|
||||
// Make Posted searchable
|
||||
if ( mField.getVO().displayType == DisplayType.Button && "Posted".equals(mField.getColumnName()) )
|
||||
// Make Buttons searchable
|
||||
if ( mField.getVO().displayType == DisplayType.Button )
|
||||
{
|
||||
GridFieldVO vo = mField.getVO();
|
||||
GridFieldVO postedvo = vo.clone(vo.ctx, vo.WindowNo, vo.TabNo, vo.AD_Window_ID, vo.AD_Tab_ID, vo.tabReadOnly);
|
||||
postedvo.IsDisplayed = true;
|
||||
postedvo.displayType = DisplayType.List;
|
||||
postedvo.AD_Reference_Value_ID = AD_REFERENCE_ID_POSTED;
|
||||
if ( vo.AD_Reference_Value_ID > 0 )
|
||||
{
|
||||
GridFieldVO postedvo = vo.clone(vo.ctx, vo.WindowNo, vo.TabNo, vo.AD_Window_ID, vo.AD_Tab_ID, vo.tabReadOnly);
|
||||
postedvo.IsDisplayed = true;
|
||||
postedvo.displayType = DisplayType.List;
|
||||
|
||||
postedvo.lookupInfo = MLookupFactory.getLookupInfo (postedvo.ctx, postedvo.WindowNo, postedvo.AD_Column_ID, postedvo.displayType,
|
||||
Env.getLanguage(postedvo.ctx), postedvo.ColumnName, postedvo.AD_Reference_Value_ID,
|
||||
postedvo.IsParent, postedvo.ValidationCode);
|
||||
postedvo.lookupInfo.InfoFactoryClass = postedvo.InfoFactoryClass;
|
||||
|
||||
GridField postedfield = new GridField(postedvo);
|
||||
postedvo.lookupInfo = MLookupFactory.getLookupInfo (postedvo.ctx, postedvo.WindowNo, postedvo.AD_Column_ID, postedvo.displayType,
|
||||
Env.getLanguage(postedvo.ctx), postedvo.ColumnName, postedvo.AD_Reference_Value_ID,
|
||||
postedvo.IsParent, postedvo.ValidationCode);
|
||||
postedvo.lookupInfo.InfoFactoryClass = postedvo.InfoFactoryClass;
|
||||
|
||||
// replace the original field by the Posted List field
|
||||
m_findFields[i] = postedfield;
|
||||
mField = postedfield;
|
||||
GridField postedfield = new GridField(postedvo);
|
||||
|
||||
// replace the original field by the Posted List field
|
||||
m_findFields[i] = postedfield;
|
||||
mField = postedfield;
|
||||
}
|
||||
}
|
||||
|
||||
if (columnName.equals("Value"))
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
-- Apr 19, 2010 5:37:09 PM COT
|
||||
-- 2987531_Cannot search on Posted field
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=234,Updated=TO_DATE('2010-04-19 17:37:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56347
|
||||
;
|
||||
|
||||
-- Apr 19, 2010 5:43:13 PM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=28, AD_Reference_Value_ID=234,Updated=TO_DATE('2010-04-19 17:43:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=57934
|
||||
;
|
||||
|
||||
-- Apr 19, 2010 5:44:04 PM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=17, AD_Reference_Value_ID=234,Updated=TO_DATE('2010-04-19 17:44:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=58179
|
||||
;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
-- Apr 19, 2010 5:37:09 PM COT
|
||||
-- 2987531_Cannot search on Posted field
|
||||
UPDATE AD_Column SET AD_Reference_Value_ID=234,Updated=TO_TIMESTAMP('2010-04-19 17:37:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56347
|
||||
;
|
||||
|
||||
-- Apr 19, 2010 5:43:13 PM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=28, AD_Reference_Value_ID=234,Updated=TO_TIMESTAMP('2010-04-19 17:43:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=57934
|
||||
;
|
||||
|
||||
-- Apr 19, 2010 5:44:04 PM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=17, AD_Reference_Value_ID=234,Updated=TO_TIMESTAMP('2010-04-19 17:44:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=58179
|
||||
;
|
||||
|
|
@ -514,6 +514,29 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
|||
mField = ynfield;
|
||||
}
|
||||
|
||||
// Make Buttons searchable
|
||||
if ( mField.getVO().displayType == DisplayType.Button )
|
||||
{
|
||||
GridFieldVO vo = mField.getVO();
|
||||
if ( vo.AD_Reference_Value_ID > 0 )
|
||||
{
|
||||
GridFieldVO postedvo = vo.clone(vo.ctx, vo.WindowNo, vo.TabNo, vo.AD_Window_ID, vo.AD_Tab_ID, vo.tabReadOnly);
|
||||
postedvo.IsDisplayed = true;
|
||||
postedvo.displayType = DisplayType.List;
|
||||
|
||||
postedvo.lookupInfo = MLookupFactory.getLookupInfo (postedvo.ctx, postedvo.WindowNo, postedvo.AD_Column_ID, postedvo.displayType,
|
||||
Env.getLanguage(postedvo.ctx), postedvo.ColumnName, postedvo.AD_Reference_Value_ID,
|
||||
postedvo.IsParent, postedvo.ValidationCode);
|
||||
postedvo.lookupInfo.InfoFactoryClass = postedvo.InfoFactoryClass;
|
||||
|
||||
GridField postedfield = new GridField(postedvo);
|
||||
|
||||
// replace the original field by the Posted List field
|
||||
m_findFields[i] = postedfield;
|
||||
mField = postedfield;
|
||||
}
|
||||
}
|
||||
|
||||
if (columnName.equals("Value"))
|
||||
hasValue = true;
|
||||
else if (columnName.equals("Name"))
|
||||
|
|
Loading…
Reference in New Issue