1. How can I create a cancel/reset button using Struts2Jquery plugin?
2. If I use <sj:submit> then below html is getting generated.
If I create any element after <sj:submit> then it is getting displayed under submit button. I want it to be displayed just adjacent to submit button. Which is the best place/approach to modify this default behavior?
1) I dont think there is a cancel/reset tag with the jquery plugin. I think you have to create it yourself
2) You probably need to change your theme to simple and you will need to handle the creation of the div tags and styles ... from the code you posted it looks like you have the xhtml theme on which is the default
You dont see the labels because like I said you have to handle the div and styles yourself. All I'm saying is that you need to write the HTML yourself if you use simple theme. However you get to more easily IMO control the look and feel of how the html gets rendered. On the other hand I think (im not 100% sure) that you can specify simple theme on a tag by tag basis which will let you put a reset button next to your submit button.
Joined: Sep 15, 2010
I tried to apply theme to each input in the form.
I found a theme option for <s:textfield> but could not find the same for <sj:select> and <sj:submit>.
Both are having attribute template directory and template. So I modified them as below.
then i got error
I created subfolder under KUTheme and placed select.ftl in that. Still same error.
I am not sure what should be the correct file and folder for template and teplateDir. and also what file should be pointed to template attribute.
Well I looked at the supported attributes and it doesnt have theme attribute. So just download the source and modify it or stop using this plugin ... Maybe submit a request to update it to support theme ... If I was in your shoes I'd be using simple theme throught the application so I'd put that in the struts.xml. If whatever you are trying to do wasnt solved by doing that then I'd modify the plugin code/compile and deploy my own version ....