Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@96390 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
58b1a982f5
commit
675aa821ec
|
@ -35,6 +35,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SingleValueReplacePanel extends FramedPanel {
|
public class SingleValueReplacePanel extends FramedPanel {
|
||||||
|
private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
protected String WIDTH = "500px";
|
protected String WIDTH = "500px";
|
||||||
protected String HEIGHT = "150px";
|
protected String HEIGHT = "150px";
|
||||||
protected EventBus eventBus;
|
protected EventBus eventBus;
|
||||||
|
@ -152,7 +154,6 @@ public class SingleValueReplacePanel extends FramedPanel {
|
||||||
checked = b.toString();
|
checked = b.toString();
|
||||||
} else {
|
} else {
|
||||||
if (column.getDataTypeName().compareTo("Date") == 0) {
|
if (column.getDataTypeName().compareTo("Date") == 0) {
|
||||||
DateTimeFormat sdf= DateTimeFormat.getFormat("yyyy-MM-dd");
|
|
||||||
Date d = null;
|
Date d = null;
|
||||||
try {
|
try {
|
||||||
d = sdf.parse(rValue);
|
d = sdf.parse(rValue);
|
||||||
|
@ -160,7 +161,6 @@ public class SingleValueReplacePanel extends FramedPanel {
|
||||||
Log.error("Unparseable using " + sdf);
|
Log.error("Unparseable using " + sdf);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
checked = rValue;
|
checked = rValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
*/
|
*/
|
||||||
public class ReplacePanel extends FramedPanel implements
|
public class ReplacePanel extends FramedPanel implements
|
||||||
DimensionRowSelectionListener {
|
DimensionRowSelectionListener {
|
||||||
|
private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
protected String WIDTH = "500px";
|
protected String WIDTH = "500px";
|
||||||
protected String HEIGHT = "150px";
|
protected String HEIGHT = "150px";
|
||||||
protected EventBus eventBus;
|
protected EventBus eventBus;
|
||||||
|
@ -63,6 +65,7 @@ public class ReplacePanel extends FramedPanel implements
|
||||||
|
|
||||||
protected DimensionRow dimensionRow;
|
protected DimensionRow dimensionRow;
|
||||||
|
|
||||||
|
|
||||||
protected ReplaceColumnSession replaceColumnSession;
|
protected ReplaceColumnSession replaceColumnSession;
|
||||||
private ComboBox<DimensionRow> comboDimensionType;
|
private ComboBox<DimensionRow> comboDimensionType;
|
||||||
private FieldLabel comboDimensionTypeLabel;
|
private FieldLabel comboDimensionTypeLabel;
|
||||||
|
@ -132,7 +135,6 @@ public class ReplacePanel extends FramedPanel implements
|
||||||
if (column.getDataTypeName().compareTo("Date") == 0) {
|
if (column.getDataTypeName().compareTo("Date") == 0) {
|
||||||
valueDate = new DateField();
|
valueDate = new DateField();
|
||||||
Date d = null;
|
Date d = null;
|
||||||
DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
|
||||||
Log.debug("Date value: " + cellData.getValue());
|
Log.debug("Date value: " + cellData.getValue());
|
||||||
try {
|
try {
|
||||||
d = sdf.parse(cellData.getValue());
|
d = sdf.parse(cellData.getValue());
|
||||||
|
@ -281,8 +283,8 @@ public class ReplacePanel extends FramedPanel implements
|
||||||
UtilsGXT3.alert("Attention", "Insert a valid replace value");
|
UtilsGXT3.alert("Attention", "Insert a valid replace value");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
Long data = d.getTime();
|
String dateS = sdf.format(d);
|
||||||
rValue = data.toString();
|
rValue = dateS;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -322,7 +324,6 @@ public class ReplacePanel extends FramedPanel implements
|
||||||
} else {
|
} else {
|
||||||
if (column.getDataTypeName().compareTo("Date") == 0) {
|
if (column.getDataTypeName().compareTo("Date") == 0) {
|
||||||
Date d = null;
|
Date d = null;
|
||||||
DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
|
||||||
try {
|
try {
|
||||||
d = sdf.parse(value.getValue());
|
d = sdf.parse(value.getValue());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -330,8 +331,9 @@ public class ReplacePanel extends FramedPanel implements
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
Long data = d.getTime();
|
String dateS = sdf.format(d);
|
||||||
checked = data.toString();
|
checked = dateS;
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (column.getDataTypeName().compareTo("Geometry") == 0) {
|
if (column.getDataTypeName().compareTo("Geometry") == 0) {
|
||||||
|
|
Loading…
Reference in New Issue