|
Answer» The struts2 jquery plugin is used to:
- It provides the user with an easy integration of ajax and widgets.
- It reduces the number of code to be written by a coder.
For example:
<div id="result">Result Div</div>
<s:url id="ajax" value="/ajax1.action"/>
<sj:a id="ajaxlink" href="%{ajax}" indicator="indicator" targets="result" effect="highlight">
Run AJAX Action
</sj:a>
<img id="indicator" src="images/indicator.gif" alt="LOADING..." style="DISPLAY:none"/>
The advantages of USING it are:
- It reduces the number of code to be written dramatically.
- It also supports ajax form validation.
- The code becomes much easier to READ and HENCE prevents errors from occurring and is easy to debug.
The struts2 jquery plugin is used to: For example: <div id="result">Result Div</div>
<s:url id="ajax" value="/ajax1.action"/>
<sj:a id="ajaxlink" href="%{ajax}" indicator="indicator" targets="result" effect="highlight">
Run AJAX Action
</sj:a>
<img id="indicator" src="images/indicator.gif" alt="Loading..." style="display:none"/> The advantages of using it are:
|