Search in sources :

Example 46 with ActionSupport

use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.

the class TestDateAttributeFilterAction method testFailureAddRangeDateFilter_2.

public void testFailureAddRangeDateFilter_2() throws Throwable {
    String result = // Data Start inserita
    this.executeSaveRangeDateFilter(// Data Start inserita
    IContentListFilterAction.INSERTED_DATE_FILTER, // Data Start inserita
    "25/09/1972", IContentListFilterAction.INSERTED_DATE_FILTER, // Data End Inserita
    "21/04/1972");
    assertEquals(Action.INPUT, result);
    ActionSupport action = this.getAction();
    Map<String, List<String>> fieldsErrors = action.getFieldErrors();
    assertEquals(1, fieldsErrors.size());
    List<String> dateValueErrors = fieldsErrors.get("dateEnd");
    // dateStart.after(dateEnd)
    assertEquals(1, dateValueErrors.size());
}
Also used : ActionSupport(com.opensymphony.xwork2.ActionSupport) List(java.util.List)

Example 47 with ActionSupport

use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.

the class TestDateAttributeFilterAction method testFailureAddDateValueFilter_1.

public void testFailureAddDateValueFilter_1() throws Throwable {
    // Opzione nessuna Data inserita
    String result = this.executeSaveValueDateFilter(IContentListFilterAction.NO_DATE_FILTER, "");
    assertEquals(Action.INPUT, result);
    ActionSupport action = this.getAction();
    Map<String, List<String>> fieldsErrors = action.getFieldErrors();
    assertEquals(1, fieldsErrors.size());
    List<String> dateValueErrors = fieldsErrors.get("dateValueType");
    assertEquals(1, dateValueErrors.size());
}
Also used : ActionSupport(com.opensymphony.xwork2.ActionSupport) List(java.util.List)

Example 48 with ActionSupport

use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.

the class TestDateAttributeFilterAction method testFailureAddRangeDateFilter_1.

public void testFailureAddRangeDateFilter_1() throws Throwable {
    String result = // Data Start inserita
    this.executeSaveRangeDateFilter(// Data Start inserita
    IContentListFilterAction.INSERTED_DATE_FILTER, // Data Start inserita
    "", IContentListFilterAction.INSERTED_DATE_FILTER, // Data End Inserita
    "25/09/1972");
    assertEquals(Action.INPUT, result);
    ActionSupport action = this.getAction();
    Map<String, List<String>> fieldsErrors = action.getFieldErrors();
    assertEquals(1, fieldsErrors.size());
    List<String> dateValueErrors = fieldsErrors.get("dateStart");
    // required dateStart
    assertEquals(1, dateValueErrors.size());
}
Also used : ActionSupport(com.opensymphony.xwork2.ActionSupport) List(java.util.List)

Example 49 with ActionSupport

use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.

the class TestNumberAttributeFilterAction method testFailureAddRangeNumberFilter_1.

public void testFailureAddRangeNumberFilter_1() throws Throwable {
    String result = this.executeSaveRangeNumberFilter("", "");
    assertEquals(Action.INPUT, result);
    ActionSupport action = this.getAction();
    Map<String, List<String>> fieldsErrors = action.getFieldErrors();
    assertEquals(1, fieldsErrors.size());
    List<String> numberValueErrors = fieldsErrors.get("numberEnd");
    // richiesto uno dei campi
    assertEquals(1, numberValueErrors.size());
}
Also used : ActionSupport(com.opensymphony.xwork2.ActionSupport) List(java.util.List)

Example 50 with ActionSupport

use of com.opensymphony.xwork2.ActionSupport in project entando-core by entando.

the class TestNumberAttributeFilterAction method testFailureAddNumberValueFilter_1.

public void testFailureAddNumberValueFilter_1() throws Throwable {
    String result = this.executeSaveNumberValueFilter("");
    assertEquals(Action.INPUT, result);
    ActionSupport action = this.getAction();
    Map<String, List<String>> fieldsErrors = action.getFieldErrors();
    assertEquals(1, fieldsErrors.size());
    List<String> numberValueErrors = fieldsErrors.get("numberValue");
    assertEquals(1, numberValueErrors.size());
}
Also used : ActionSupport(com.opensymphony.xwork2.ActionSupport) List(java.util.List)

Aggregations

ActionSupport (com.opensymphony.xwork2.ActionSupport)56 List (java.util.List)28 Content (com.agiletec.plugins.jacms.aps.system.services.content.model.Content)14 Widget (com.agiletec.aps.system.services.page.Widget)4 ApsProperties (com.agiletec.aps.util.ApsProperties)4 HashMap (java.util.HashMap)4 WidgetType (org.entando.entando.aps.system.services.widgettype.WidgetType)4 IPage (com.agiletec.aps.system.services.page.IPage)3 ArrayList (java.util.ArrayList)3 IManager (com.agiletec.aps.system.common.IManager)2 IUserProfile (org.entando.entando.aps.system.services.userprofile.model.IUserProfile)2 BooleanAttribute (com.agiletec.aps.system.common.entity.model.attribute.BooleanAttribute)1 MonoListAttribute (com.agiletec.aps.system.common.entity.model.attribute.MonoListAttribute)1 Lang (com.agiletec.aps.system.services.lang.Lang)1 PageMetadata (com.agiletec.aps.system.services.page.PageMetadata)1 PageModel (com.agiletec.aps.system.services.pagemodel.PageModel)1 SymbolicLink (com.agiletec.plugins.jacms.aps.system.services.content.model.SymbolicLink)1 LinkAttribute (com.agiletec.plugins.jacms.aps.system.services.content.model.extraAttribute.LinkAttribute)1 ActionProxyFactory (com.opensymphony.xwork2.ActionProxyFactory)1