You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Donyee <xy...@gmail.com> on 2008/05/29 13:26:07 UTC
[T5] StreamResponse causes java.lang.IllegalStateException
when i click to submit the form, i got java.lang.IllegalStateException.
I search the web and found that wes because the wrong use of
response.getOutputStream(); and response.getWriter();
Is this a bug?
how to fix this?
In my java code:
StreamResponse onSuccess() {
return new TextStreamResponse("text/json", "{key:'"+test+"'}");
}
In my page .tml:
<t:form t:id="testForm">
<table>
<tr>
<td>
test
</td>
<td>
<t:textField t:id="test" value="test">
</t:textField>
</td>
<td>
<a href="#" onclick="processForm();">submit</a>
</td>
</tr>
</table>
</t:form>
<script>
var processForm = function(){
alert('click');
ele = jQuery('#testForm');
var options = {
dataType: 'json',
success: function(data){
alert(data.key);
}
};
ele.ajaxSubmit(options);
};
</script>
--
Yet Another Java EE Developer!