struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Simons (JIRA)" <>
Subject [jira] Created: (WW-2835) Dojo and file input
Date Fri, 10 Oct 2008 04:50:37 GMT
Dojo and file input

                 Key: WW-2835
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Dojo Tags
    Affects Versions:
         Environment: Mac OSX 10.4.11, java 1.5
            Reporter: Jeroen Simons

Using the code below everything works as expected. On form submission an ajax call is made
to the alert() method which simply forwards to alert.jsp which alerts the filled in text and
a dom reference of the form.

As soon as i add a <input type="file"> or <s:file> to my form, alert.jsp does
not have a reference to the form anymore and the 2nd alert fails.

This is my code:

@Namespace(value = "/ajax")
    @Result(name = "success", value = "test.jsp"),
    @Result(name = "alert", value = "alert.jsp")
public class TestAction extends ActionSupport {

    public String alert() throws Exception {
        return "alert";

    private String text;

    public String getText() {
        return text;

    public void setText(String text) {
        this.text = text;


<script type="text/javascript">


<%@ taglib prefix="s" uri="/struts-tags"%>
    <s:head theme="ajax" />

    <s:form id="testForm" name="testForm" onsubmit="dojo.event.topic.publish('alert_text');return
false;"  enctype="multipart/form-data">
        Text: <s:textfield name="text" />
        <br />
        <%--<s:file name="file" />--%>
        <s:submit  />

    <s:url id="url" action="test" method="alert" namespace="/ajax" />
    <s:div executeScripts="true" showLoadingText="false" id="testdiv" href="%{url}" theme="ajax"
           listenTopics="alert_text" formId="testForm" />


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message