struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: [S2] Ajax error
Date Wed, 10 Sep 2008 12:30:29 GMT
--- On Wed, 9/10/08, ManiKanta G wrote:
> Yes, from action class I m returning entire jsp page.

Well, that would explain why you're seeing an entire page in the div, then.

> How can I return HTML fragment? you mean another jsp page
> which contains only that html fragment?

Yes, if you're loading the div with HTML.

> If it is the case I may have to create many small jsps, 
> which may in the order of 100s.

That's what Ajax does (loosely speaking): returns HTML fragments (or data as JSON, XML, etc.).
That's the point of it--so you don't have to return entire pages and refresh the entire window.

> And is there any way to substitute the <s:submit...> with <s:a..>.
> I've  tried with this, but only submit is making request to action.

Examples of using <s:a...> to both populate a div and to submit a form, inside or outside
said form, are given in the documentation for both S2 versions. If you have specific questions
it'll be easier to help.

Dave


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


Mime
View raw message