Skip to content

Commit

Permalink
WW-5283 Fixes outstanding imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Feb 24, 2023
1 parent 511e4ae commit 310cfea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.opensymphony.xwork2.config.RuntimeConfiguration;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
import org.apache.struts2.config.StrutsXmlConfigurationProvider;
import org.apache.struts2.junit.StrutsTestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
package ${package};

import org.apache.struts2.util.StrutsTypeConverter;
import org.apache.struts2.conversion.TypeConversionException;

import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.Map;
import java.util.Date;
import com.opensymphony.xwork2.conversion.TypeConversionException;

public class DateConverter extends StrutsTypeConverter {
public Object convertFromString(Map context, String[] values, Class toClass) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,26 @@

import java.util.Date;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.validator.annotations.Validation;
import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
import com.opensymphony.xwork2.validator.annotations.RequiredFieldValidator;
import com.opensymphony.xwork2.conversion.annotations.Conversion;
import com.opensymphony.xwork2.conversion.annotations.TypeConversion;

@Conversion()
public class HelloWorldAction extends ActionSupport {

private Date now;
private String name;

@TypeConversion(converter = "${package}.DateConverter")
@RequiredFieldValidator(message = "Please enter the date")
public void setDateNow(Date now) { this.now = now; }
public Date getDateNow() { return now; }

@RequiredStringValidator(message = "Please enter a name", trim = true)
public void setName(String name) { this.name = name; }
public String getName() { return this.name; }

public String execute() throws Exception {
return SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<!-- Servlets -->
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
Expand Down

0 comments on commit 310cfea

Please sign in to comment.