title: All form's data are null where the dojo sx:div is refresh
body: <p>In my struts2 web application I have a form which contain dojo sx:div. When I refresh this div all form's data are null. When I click on the button "Refres the Div", the attribute <strong>listIdSelected</strong> in the scope of method <strong>search</strong>, it's null. I saw that in some cases there may be several forms in a JSP page. Is the best solution ? I dontt like this practice, with JSF this cases is easier to manage.</p>
  
  <p>JSP File :</p>
  
  <pre><code>&lt;%@ taglib prefix="s" uri="/struts-tags"%&gt;
  &lt;%@ taglib prefix="sx" uri="/struts-dojo-tags"%&gt;
  
  &lt;link rel="stylesheet"
      href="&lt;s:url value="/css/jquery.multiselect.css"/&gt;" type="text/css" /&gt;
  &lt;link rel="stylesheet"
      href="&lt;s:url value="/css/jquery.multiselect.filter.css"/&gt;"
      type="text/css" /&gt;
  &lt;link rel="stylesheet"
      href="&lt;s:url value="/css/themes/base/jquery.ui.theme.css"/&gt;"
      type="text/css" /&gt;
  &lt;script type="text/javascript"
      src="&lt;s:url value="/js/jquery-1.9.1.min.js" /&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
      src="&lt;s:url value="/js/jquery-ui.min.js" /&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
      src="&lt;s:url value="/js/jquery.multiselect.min.js" /&gt;"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
      src="&lt;s:url value="/js/jquery.multiselect.filter.js" /&gt;"&gt;&lt;/script&gt;
  
  
  &lt;script language="javascript"&gt;
          $(function() {
  
              $("select").multiselect({
                  multiple : true,
                  selectedList : 4,
                  height : 180
              });
  
              $("select").multiselect().multiselectfilter();
  
          });
  
          function refreshDiv() {
              dojo.event.topic.publish("/listTopic", "0", "1");
          }
      &lt;/script&gt;
  
  &lt;s:form id="idForm" action="validationAction.do" name="MyForm"
      theme="simple"&gt;
  
      &lt;div class="contentTable"&gt;
          &lt;div class="tbl"&gt;
  
              &lt;table width="100%"&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;s:select id="idCombo" multiple="true" list="listItems"
                              name="listIdSelected" value="listIdSelected" listKey="id"
                              listValue="label" emptyOption="true" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="contentTable"&gt;
          &lt;div class="tbl"&gt;
  
              &lt;div class="bloc_action"&gt;
                  &lt;input class="btn_action" type="button" onclick="refreshDiv();"
                      value="Refresh the div" /&gt;
              &lt;/div&gt;
  
              &lt;sx:div id="listDiv" href="searchAction.do" formId="listForm"
                  listenTopics="/listTopic" theme="ajax"&gt;
              &lt;/sx:div&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="bloc_action"&gt;
          &lt;s:submit cssClass="btn_action" value="Submit form"&gt;&lt;/s:submit&gt;
      &lt;/div&gt;
  
  &lt;/s:form&gt;
  </code></pre>
  
  <p>The Java file :</p>
  
  <pre><code>package com.omb.controller.report;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.springframework.transaction.annotation.Isolation;
  import org.springframework.transaction.annotation.Propagation;
  import org.springframework.transaction.annotation.Transactional;
  
  import com.omb.ui.item.Item;
  
  import com.opensymphony.xwork2.ActionSupport;
  import com.opensymphony.xwork2.Preparable;
  
  @SuppressWarnings("serial")
  public class MyAction extends ActionSupport implements Preparable {
  
      Log log = LogFactory.getLog(MyAction.class);
  
      private List&lt;Item&gt; listItems = new ArrayList&lt;String&gt;();
      private List&lt;String&gt; listIdSelected;
  
      public void prepare() throws Exception {
          listItems.add(new Item("1", "Item 1"));
          listItems.add(new Item("2", "Item 2"));
          listItems.add(new Item("3", "Item 3"));
          listItems.add(new Item("4", "Item 4"));
      }
  
      @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, readOnly = true)
      public String validation() throws Exception {
          // do validation
          return SUCCES;
      }
  
      @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, readOnly = true)
      public String search() throws Exception {
          log.debug("listIdSelected.size() = " + listIdSelected.size());
          return "displayResultList";
      }
  
      public List&lt;Item&gt; getListItems() {
          return this.listItems;
      }
  
      public void setListItems(List&lt;Item&gt; listItems) {
          this.listItems = listItems;
      }
  
      public List&lt;Integer&gt; getListIdSelected() {
          return this.listIdSelected;
      }
  
      public void setListIdSelected(List&lt;Integer&gt; listIdSelected) {
          this.listIdSelected = listIdSelected;
      }
  
  }
  </code></pre>