The result name attribute should be unique per action configuration, so the action is able to return this result.
Using a stream
result type requires to provide a getter for the stream introduced by the inputName
parameter.
The content type returned is text/html
so you need to parse this text via javascript. You can use JSON.parse(data)
. The data
will be available to you if you make an Ajax request to the server like $.ajax()
by providing the URL mapped to the action. On the success
function handler you will get the data
.
For the difference and explanation how to use a stream
result vs json
result to return json string to the client javascript see this answer.