@Test public void toFormString() throws Exception { DateClass dateClass = new DateClass(); dateClass.setDateFormat("MMMM yyyy"); when(localizationContext.getCurrentLocale()).thenReturn(new Locale("ro")); DateProperty property = new DateProperty(); property.setValue(new SimpleDateFormat("MM/yyyy").parse("10/2015")); assertEquals("octombrie 2015", dateClass.toFormString(property)); }
public String toFormString(BaseProperty property) { return property.getValue() == null ? "" : new SimpleDateFormat(getDateFormat(), getCurrentLocale()) .format(property.getValue()); }
DateClass extends PropertyClass { public String toFormString(BaseProperty property) { return property.getValue() == null ? "" : new SimpleDateFormat(getDateFormat(), getCurrentLocale()) .format(property.getValue()); } }
DateClass extends PropertyClass { public String toFormString(BaseProperty property) { return property.getValue() == null ? "" : new SimpleDateFormat(getDateFormat(), getCurrentLocale()) .format(property.getValue()); } DateClass(PropertyMetaClass metaClass);  DateClass(); }
DateClass extends PropertyClass { public String toFormString(BaseProperty property) { return property.getValue() == null ? "" : new SimpleDateFormat(getDateFormat(), getCurrentLocale()) .format(property.getValue()); } DateClass(PropertyMetaClass metaClass);  DateClass(); int getPicker(); void setPicker(int picker); int getSize(); void setSize(int size); int getEmptyIsToday(); void setEmptyIsToday(int emptyIsToday); String getDateFormat(); void setDateFormat(String format); @Override BaseProperty fromString(String value); @Override BaseProperty newProperty(); String toFormString(BaseProperty property); @Override BaseProperty newPropertyfromXML(Element element); }
DateClass extends PropertyClass { public String toFormString(BaseProperty property) { return property.getValue() == null ? "" : new SimpleDateFormat(getDateFormat(), getCurrentLocale()) .format(property.getValue()); } DateClass(PropertyMetaClass metaClass);  DateClass(); int getPicker(); void setPicker(int picker); int getSize(); void setSize(int size); int getEmptyIsToday(); void setEmptyIsToday(int emptyIsToday); String getDateFormat(); void setDateFormat(String format); @Override BaseProperty fromString(String value); @Override BaseProperty newProperty(); String toFormString(BaseProperty property); @Override BaseProperty newPropertyfromXML(Element element);  }