Skip to Content

   <!–  Include webwork defaults (from WebWork JAR). > <br />   <include file=”webwork-default.xml” /> <br />   <package name=”default” extends=”webwork-default”><br />     <interceptors><br />        <interceptor name=”chain” <br />        class=”com.opensymphony.xwork.interceptor.ChainingInterceptor” /> <br />        <interceptor name=”fileUpload”<br />        class=”com.opensymphony.webwork.interceptor.FileUploadInterceptor” /> <br />        <interceptor name=”validation” <br />        class=”com.opensymphony.xwork.validator.ValidationInterceptor”/><br />        <interceptor-stack name=”basicInterceptor”>   <br />          <interceptor-ref name=”chain” /> <br />          <interceptor-ref name=”validation” /> <br />        </interceptor-stack><br />        <!  Interceptor for file Uploading   > <br />        <interceptor-stack name=”fileUploadStack”><br />          <interceptor-ref name=”fileUpload”><br />            <param name=”allowedTypes”>image/png,image/gif,image/jpeg</param> <br />          </interceptor-ref><br />        </interceptor-stack><br />        <interceptor-stack name=”defaultInterceptor”> <br />          <interceptor-ref name=”basicInterceptor” /> <br />        </interceptor-stack><br />      </interceptors> <br />      <default-interceptor-ref name=”defaultInterceptor” /> <br />      <global-results><br />        <result name=”error” type=”chain”><br />          <param name=”namespace”>/error</param> <br />          <param name=”actionName”>generalError</param> <br />        </result><br />      </global-results><br />    </package></pre><pre>    <!  Include application modules–> public class ProductAction extends ActionSupport {  

  public static final String SUCCESS= "success";

  public static final String ERROR= "error"; 

  public static final String INPUT= "input"; 

  private CommodityTypeDto cdto = new CommodityTypeDto(); 

  private ProductDto pdto = new ProductDto(); 

  *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() {

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