Commit 98757fb8 authored by dkasliwal's avatar dkasliwal

Add method for date format DD-MMM-YY in Type 8


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104706 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c7e12b75
......@@ -239,6 +239,10 @@ public class FilterCreator extends Composite
{
creatDropDown(filterInfo, popUpVPnl, fltrParmtrArray);
}
if (filterInfo.getFiltrType().equals("8"))
{
createDatePikrMMMFormat(filterInfo, popUpVPnl, fltrParmtrArray);
}
/* ended */
}
}
......@@ -314,7 +318,6 @@ public class FilterCreator extends Composite
@Override
public void onClick(ClickEvent event)
{
CommonUtils.printOnConsole("******** filterList ******** :"+filterList);
getFltrSelectedData(filterList, mainPopupPnl);
}
});
......@@ -974,8 +977,15 @@ public class FilterCreator extends Composite
{
if (!fltrDateBox.toString().isEmpty())
{
//CommonUtils.printOnConsole("******************* "+fltrInfo.filtrType);
if ("8".equalsIgnoreCase(fltrInfo.filtrType))
{
popUpSendDtatList.add(DateTimeFormat.getFormat("dd-MMM-yy").format(fltrDateBox.getValue()));
popUpSendDtatListDtl.add(DateTimeFormat.getFormat("dd-MMM-yy").format(fltrDateBox.getValue()));
}else{
popUpSendDtatList.add(DateTimeFormat.getFormat("dd/MM/yyyy").format(fltrDateBox.getValue()));
popUpSendDtatListDtl.add(DateTimeFormat.getFormat("dd/MM/yyyy").format(fltrDateBox.getValue()));
}
fltrDateBox.hideDatePicker();
} else
{
......@@ -1079,7 +1089,6 @@ public class FilterCreator extends Composite
GWTDashBoardReport.metaDataJsnObjGlobl = metaDataJsnObj;
setTitleOnFilterSubmit(popUpSendDtatList, metaDataJsnObj);
CommonUtils.printOnConsole("************ metaDataJsnObj :"+metaDataJsnObj);
E12DashBoardPage.initaliseGraphNGrid(popUpSendDtatList,"",metaDataJsnObj);
}
}
......@@ -1183,7 +1192,7 @@ public class FilterCreator extends Composite
//if(subTitle.trim().length()>0)
else if ((title.size() == 1 && (subTitle != "") || (!subTitle.equals("")) || (!subTitle.equalsIgnoreCase(""))))
{
titleLbl.setText(subTitle + " - " + getMonth(reportHeading));
titleLbl.setText(subTitle );//+ " - " + getMonth(reportHeading));
} else
{
/*Added Code for Remove Colon for no Filter by Dhanendra on 31-07-15*/
......@@ -1325,6 +1334,46 @@ public class FilterCreator extends Composite
}
/*ended new method for drop down box by swati 23 sep 2015*/
private void createDatePikrMMMFormat(final FilterInfo filterInfo, final VerticalPanel popUpHPnl, final String[] fltrParmtrArray)
{
Label columnNameLbl = null;
DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd-MMM-yy");
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yy");
DateBox dateBox = new DateBox();
dateBox.setFormat(new DateBox.DefaultFormat(dateFormat));
dateBox.setTitle(filterInfo.getColDescr());
dateBox.getElement().setId(filterInfo.getFieldName());
dateBox.setStylePrimaryName("textBoxCss");
VerticalPanel outerVPanel = new VerticalPanel();
HorizontalPanel hPanel = new HorizontalPanel();
VerticalPanel vPanel = new VerticalPanel();
columnNameLbl = new Label("" + filterInfo.getColDescr());
vPanel.add(columnNameLbl);
columnNameLbl.setStyleName("filterHeaderLabel");
vPanel.setStyleName("filterHeaderPanel");
hPanel.add(dateBox);
outerVPanel.add(vPanel);
outerVPanel.add(hPanel);
if (fltrParmtrArray != null)
{
for (int arrayCnt = 0; arrayCnt < fltrParmtrArray.length; arrayCnt++)
{
Date date = null;
try
{
date = formatter.parse(fltrParmtrArray[arrayCnt]);
} catch (Exception e)
{
Window.alert("Exception in Date" + e.getMessage());
}
dateBox.setValue(date);
}
}
//Added By Prashant Chavan on 27-Apr-15 For setting the value in date box End
addEnterKeyHandler(dateBox);
popUpHPnl.add(outerVPanel);
}
private void createDatePikr(final FilterInfo filterInfo, final VerticalPanel popUpHPnl, final String[] fltrParmtrArray)
{
Label columnNameLbl = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment