* [ 1631888 ] Lazy loading of tab
This commit is contained in:
parent
5142683b28
commit
e373dbce82
|
@ -432,7 +432,7 @@ public class GridFieldVO implements Serializable
|
||||||
|
|
||||||
|
|
||||||
// Create Lookup, if not ID
|
// Create Lookup, if not ID
|
||||||
if (DisplayType.isLookup(displayType))
|
if (DisplayType.isLookup(displayType) && IsDisplayed)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
{
|
{
|
||||||
vo.Fields = new ArrayList<GridFieldVO>(); // dummy
|
vo.Fields = new ArrayList<GridFieldVO>(); // dummy
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
createFields (vo);
|
createFields (vo);
|
||||||
|
@ -72,7 +73,7 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
CLogger.get().log(Level.SEVERE, "No Fields");
|
CLogger.get().log(Level.SEVERE, "No Fields");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
return vo;
|
return vo;
|
||||||
} // create
|
} // create
|
||||||
|
|
||||||
|
@ -270,6 +271,9 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
CLogger.get().log(Level.SEVERE, "", e);
|
CLogger.get().log(Level.SEVERE, "", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mTabVO.initFields = true;
|
||||||
|
|
||||||
return mTabVO.Fields.size() != 0;
|
return mTabVO.Fields.size() != 0;
|
||||||
} // createFields
|
} // createFields
|
||||||
|
|
||||||
|
@ -380,8 +384,15 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
public int onlyCurrentDays = 0;
|
public int onlyCurrentDays = 0;
|
||||||
|
|
||||||
/** Fields contain MFieldVO entities */
|
/** Fields contain MFieldVO entities */
|
||||||
public ArrayList<GridFieldVO> Fields = null;
|
private ArrayList<GridFieldVO> Fields = null;
|
||||||
|
|
||||||
|
private boolean initFields = false;
|
||||||
|
|
||||||
|
public ArrayList<GridFieldVO> getFields()
|
||||||
|
{
|
||||||
|
if (!initFields) createFields(this);
|
||||||
|
return Fields;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Context including contained elements
|
* Set Context including contained elements
|
||||||
|
@ -390,11 +401,14 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
public void setCtx (Properties newCtx)
|
public void setCtx (Properties newCtx)
|
||||||
{
|
{
|
||||||
ctx = newCtx;
|
ctx = newCtx;
|
||||||
|
if (Fields != null)
|
||||||
|
{
|
||||||
for (int i = 0; i < Fields.size() ; i++)
|
for (int i = 0; i < Fields.size() ; i++)
|
||||||
{
|
{
|
||||||
GridFieldVO field = (GridFieldVO)Fields.get(i);
|
GridFieldVO field = (GridFieldVO)Fields.get(i);
|
||||||
field.setCtx(newCtx);
|
field.setCtx(newCtx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // setCtx
|
} // setCtx
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue