[ adempiere-Bugs-1891037 ] Tab: if initially grid mode, then no data is displayed
This commit is contained in:
parent
213ff5826a
commit
8340239975
|
@ -939,9 +939,9 @@ public class GridController extends CPanel
|
||||||
*/
|
*/
|
||||||
if (comp instanceof VString){
|
if (comp instanceof VString){
|
||||||
VString vs = (VString)comp;
|
VString vs = (VString)comp;
|
||||||
if ((vs.getVFormat() != null && mField.getVFormat() == null)
|
if ((vs.getVFormat() != null && vs.getVFormat().length() > 0 && mField.getVFormat() == null)
|
||||||
|| (vs.getVFormat() == null && mField.getVFormat() != null)
|
|| (vs.getVFormat() == null && mField.getVFormat() != null && mField.getVFormat().length() > 0)
|
||||||
|| (vs.getVFormat() != null && !vs.getVFormat().equals(mField.getVFormat()))) {
|
|| (vs.getVFormat() != null && mField.getVFormat() != null && !vs.getVFormat().equals(mField.getVFormat()))) {
|
||||||
vs.setVFormat(mField.getVFormat());
|
vs.setVFormat(mField.getVFormat());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,7 +276,11 @@ public final class VString extends CTextField
|
||||||
} catch(ClassCastException ex ){
|
} catch(ClassCastException ex ){
|
||||||
log.fine("VString.setVFormat - No caret Listeners");
|
log.fine("VString.setVFormat - No caret Listeners");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//hengsin: [ adempiere-Bugs-1891037 ], preserve current data before change of format
|
||||||
|
String s = getText();
|
||||||
setDocument(new MDocString(m_VFormat, m_fieldLength, this));
|
setDocument(new MDocString(m_VFormat, m_fieldLength, this));
|
||||||
|
setText(s);
|
||||||
} // setVFormat
|
} // setVFormat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue