Skip to content

Instantly share code, notes, and snippets.

View aruizca's full-sized avatar

Angel Ruiz aruizca

View GitHub Profile
@aruizca
aruizca / gist:5079302
Created March 4, 2013 01:29
Ajaxify form with AjaxAnywhere
<form action="${action}" method="post" aa-refresh-zones="aaZone1Example1, aaZone2Example1">
@aruizca
aruizca / gist:5079390
Created March 4, 2013 01:59
Ajaxify submit elements within a form
<form ....>
...
<div>
<button type="submit" aa-refresh-zones="aaZone1Example2" class="btn btn-primary" name="refreshTextButton" value="Refresh Text">Refresh Text</button>
<input type="image"aa-refresh-zones="aaZone1Example2" src="<c:url value="/img/refresh.png"/>" name="refreshTextButton" value="Refresh Text"/>
<input type="submit" aa-refresh-zones="aaZone2Example2" class="btn btn-info" name="showCodeButton" value="Show Code"/>
</div>
</form>
@aruizca
aruizca / gist:5079417
Last active December 14, 2015 11:29
Ajaxify select element
<form ...>
...
<sf:select path="continentCode" aa-refresh-zones="countryZone, capitalZone" id="continentCode">
<sf:option value="">-- Select One --</sf:option>
<sf:options items="${countryForm.continentsSet}" itemLabel="value" itemValue="key"/>
</sf:select>
...
</form>
@aruizca
aruizca / gist:5079674
Created March 4, 2013 03:21
Ajaxify link elements
<a href="<c:url value="/action/examples/4?data=whatever"/>" aa-refresh-zones="codeLayer4">Show Code</a>
@aruizca
aruizca / gist:5079807
Created March 4, 2013 03:57
AjaxAnywhere taglib declaration
<%@ taglib uri="http://com.nerderg/ajaxanywhere" prefix="aa" %>
@aruizca
aruizca / gist:5079843
Created March 4, 2013 04:10
Mark refresh zones in JSP
<aa:zone id="myZone">
<!-- Zone Content -->
...
</aa:zone>
@aruizca
aruizca / gist:5079938
Last active December 14, 2015 11:29
AjaxAnywhere Maven dependency
<dependency>
<groupId>com.nerderg.ajaxanywhere</groupId>
<artifactId>ajaxanywhere</artifactId>
<version>2.0</version>
</dependency>
@aruizca
aruizca / gist:5080030
Created March 4, 2013 04:51
AjaxAnywhere filter registration
<filter>
<filter-name>AjaxAnywhere</filter-name>
<filter-class>com.nerderg.ajaxanywhere.AAFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AjaxAnywhere</filter-name>
<servlet-name>MyServlet</servlet-name>
</filter-mapping>
@aruizca
aruizca / gist:5080080
Created March 4, 2013 05:05
Import javascript libraries
<script src="<c:url value="/js/jquery/jquery-1.9.1.min.js"/>"></script>
<script src="<c:url value="/js/jquery-aa.js"/>"></script>
@aruizca
aruizca / gist:5080167
Created March 4, 2013 05:33
AjaxAnywhere static file resolution
<servlet>
<servlet-name>AAResourcesServlet</servlet-name>
<servlet-class>com.nerderg.ajaxanywhere.servlet.StaticResourcesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AAResourcesServlet</servlet-name>
<url-pattern>/js/jquery-aa.js</url-pattern>
</servlet-mapping>