1 Reply Latest reply on Mar 16, 2009 3:13 PM by judy guglielmin

    Image Upload with seam

    gurpreet singh Newbie
      I am trying to upload Image with <s:fileUpload>, but every time i see null value in my Action.

      web.xml look like this.

                <filter-name>Seam Filter</filter-name>

                <filter-name>Seam Filter</filter-name>

      jspx file

      <ice:form enctype="multipart/form-data">
         <h:panelGrid columns="3" styleClass="viewInfo" columnClasses="leftCol, rightCol">
           <f:facet name="header">
                <h:outputText value="Product : #{product.displayName}" />
          <h:outputText value="#{msg.product_name}"/>
          <h:outputText value="#{msg.product_picture}"/>
          <s:fileUpload data="#{product.data}"/>
           <div class="buttonBox">
                <h:commandButton value="Save" action="#{productAction.save}" />


      Production Action

      public class ProductAction extends BaseAction<Product>
                     java.io.Serializable {

           @In(create = true)
           @Out(required = false)
           private Product product;

           public String save() {
                 if(product.getData != null){
                    //woo hoo, dude u got your image!!!!
                  //Holly shit !!! what i am doing wrong here