Skip to Content

import com.opensymphony.xwork2.Action;

import com.opensymphony.xwork2.Preparable;

public class ProductAction implements Preparable {

  public static final String SUCCESS= “success”;

  public static final String ERROR= “error”;*  </p><p>  public static final String INPUT= “input”;  </p><p>  private CommodityTypeDto cdto = new CommodityTypeDto();  </p><p>  private ProductDto pdto = new ProductDto();  </p><p>  public* String gotoCreateCommodityType() {

    try {

     log.debug(“gotoCreateCommodityType”);

*      return* SUCCESS;

    }

*    catch* (Exception ex) {

     addActionError(ex);

*      return* ERROR;

    }

  }

*  public* String createCommodityType() {

    getCommodityDto().setLoginId(getSessionUserId());

*    try* {

    getCommodityDto().setCommodityType(getProductMgr().createCommodityType(getCommodityDto()));

    getCommodityDto().setId(getCommodityDto().getCommodityType().getUuid());

*    return* SUCCESS;

    }

*    catch* (Exception ex) {return addActionError(ex);  }

  }

*  public* String viewCommodityType() {

    getCommodityDto().setLoginId(getSessionUserId());

*    try* {

    ………

    ………

    }

*    catch* (Exception ex) {return addActionError(ex); }

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply