Hi, Can any one tell me all the required configuration to use AJAX theme in struts2. When I try to use, I get error message like head.ftl, many other ftls are missing. Where as if I use xhtml theme, everything works fine. But I need to use AJAX theme. Thanks.
I don't have "ajax" folder in WEB-INF\classes\template folder. in the error log it says it cannot find file head.ftl, some more .ftl in ajax folder.
Looks like i need a ajax folder with set of .ftl files. So if i know the basic configurations/requirements/setup to use AJAX theme, i will check my files/folders to make sure i have everything. Thanks for your time.
Yes, you need the <sx:head> tag: see the documentation here, where it states:
The docs wrote:To use the AJAX tags from 2.1 on you must:
* Include the Dojo Plugin distributed with Struts 2 in your /WEB-INF/lib folder.
* Add <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> to your page.
* Include the (dojo) head tag on the page, which can be configured for performance or debugging purposes.
Have you met those requirements?
I'm also not sure if setting the form's theme to "ajax" will work as you believe it will; AFAIK using the <sx:submit> tag is the way to do that in S2.1. You may want to have a quick look at some of the existing documentation before proceeding much further.
James Dutt
Greenhorn
Joined: Apr 16, 2009
Posts: 9
posted
0
Thanks a lot. Will do more research on it. This gives me some direction to move on. If you come across more on this, could you please post under this discussion. Appreciate it.