So you have a page that has a form, and that submits to an action that
returns JSON? What is the message that you are talking about? Posting
a section of the JSP would also help.

musachy

On Mon, Feb 9, 2009 at 2:31 PM, Christer Gjerstad
<christer.gjers...@gmail.com> wrote:
>
> Hello everyone,
>
> Anyone know how to pass post message information from an action containing a
> form to an action returning JSON result via an JSP page with a DOJO script
> calling the JSON result action? Please see example below. I am loosing the
> post message on the way. One solution could be to get the post message
> parameters from the value stack and then pass them into the DOJO script, but
> this sounds like a non-Struts way to me.
>
> In the book "Practical Apache Struts2 Web 2.0 projects" written by Ian
> Roughley (Great book by the way!), chapter 10, there is an example without
> passing information into the action. I have based my solution on this
> example but cannot get it to work properly.
>
>
> <package name="products" namespace="/products" extends="struts-default">
>
>        <!-- ProductSearch Action -->
>        <action name="productSearch"
> class="com.demand.product.ProductSearch">
>                <result>/jsp/product/productSearch.jsp</result>
>        </action>
>
>        <!-- ProductSearchResult Action -->
>        <action name="productSearchResult"
> class="com.demand.product.BaseProductAction">
>                <result name="input">/jsp/product/productSearch.jsp</result>
>
>                <result>/jsp/product/productSearchJsonResult.jsp</result>
>        </action>
>
> </package>
>
> <package name="jsonProducts" namespace="/json/products"
> extends="json-default">
>        <default-interceptor-ref name="json"/>
>        <action name="productsJsonResult"
> class="com.demand.product.ProductSearchResults">
>                <result type="json">
>                        <param name="root">products</param>
>                </result>
>        </action>
>
> </package>
>
>
> Cheers!
>
> - Christer Gjerstad
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to