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 {
|
||||
private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
|
||||
protected String WIDTH = "500px";
|
||||
protected String HEIGHT = "150px";
|
||||
protected EventBus eventBus;
|
||||
|
@ -152,7 +154,6 @@ public class SingleValueReplacePanel extends FramedPanel {
|
|||
checked = b.toString();
|
||||
} else {
|
||||
if (column.getDataTypeName().compareTo("Date") == 0) {
|
||||
DateTimeFormat sdf= DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
Date d = null;
|
||||
try {
|
||||
d = sdf.parse(rValue);
|
||||
|
@ -160,7 +161,6 @@ public class SingleValueReplacePanel extends FramedPanel {
|
|||
Log.error("Unparseable using " + sdf);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (d != null) {
|
||||
checked = rValue;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
*/
|
||||
public class ReplacePanel extends FramedPanel implements
|
||||
DimensionRowSelectionListener {
|
||||
private DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
|
||||
protected String WIDTH = "500px";
|
||||
protected String HEIGHT = "150px";
|
||||
protected EventBus eventBus;
|
||||
|
@ -63,6 +65,7 @@ public class ReplacePanel extends FramedPanel implements
|
|||
|
||||
protected DimensionRow dimensionRow;
|
||||
|
||||
|
||||
protected ReplaceColumnSession replaceColumnSession;
|
||||
private ComboBox<DimensionRow> comboDimensionType;
|
||||
private FieldLabel comboDimensionTypeLabel;
|
||||
|
@ -132,7 +135,6 @@ public class ReplacePanel extends FramedPanel implements
|
|||
if (column.getDataTypeName().compareTo("Date") == 0) {
|
||||
valueDate = new DateField();
|
||||
Date d = null;
|
||||
DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
Log.debug("Date value: " + cellData.getValue());
|
||||
try {
|
||||
d = sdf.parse(cellData.getValue());
|
||||
|
@ -281,8 +283,8 @@ public class ReplacePanel extends FramedPanel implements
|
|||
UtilsGXT3.alert("Attention", "Insert a valid replace value");
|
||||
return;
|
||||
} else {
|
||||
Long data = d.getTime();
|
||||
rValue = data.toString();
|
||||
String dateS = sdf.format(d);
|
||||
rValue = dateS;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -322,7 +324,6 @@ public class ReplacePanel extends FramedPanel implements
|
|||
} else {
|
||||
if (column.getDataTypeName().compareTo("Date") == 0) {
|
||||
Date d = null;
|
||||
DateTimeFormat sdf = DateTimeFormat.getFormat("yyyy-MM-dd");
|
||||
try {
|
||||
d = sdf.parse(value.getValue());
|
||||
} catch (Exception e) {
|
||||
|
@ -330,8 +331,9 @@ public class ReplacePanel extends FramedPanel implements
|
|||
return null;
|
||||
}
|
||||
if (d != null) {
|
||||
Long data = d.getTime();
|
||||
checked = data.toString();
|
||||
String dateS = sdf.format(d);
|
||||
checked = dateS;
|
||||
|
||||
}
|
||||
} else {
|
||||
if (column.getDataTypeName().compareTo("Geometry") == 0) {
|
||||
|
|
Loading…
Reference in New Issue