Using the Geocode Field in Templates

To help the template developers retrieve geocoded articles, the plug-in ships with some struts Action and ActionForm.

com.escenic.geocode.publication.struts.GeoArticleSearchAction: the Action class that can be used to search for geocoded Articles

com.escenic.geocode.publication.struts.GeoArticleSearchForm: the ActionForm used by the action class mentioned above.

The form and the action class can be configured in your struts-config.xml as follows:

<struts-config>
  <form-beans>
    <form-bean name="com.escenic.geocode.presentation.struts.GeoArticleSearchForm"
               type="com.escenic.geocode.presentation.struts.GeoArticleSearchForm"/>
  </form-beans>
  <action-mappings>
    <action path="/geoArticleSearch"
            type="com.escenic.geocode.presentation.struts.GeoArticleSearchAction"
            name="com.escenic.geocode.presentation.struts.GeoArticleSearchForm"
            scope="request"
            validate="false"
            parameter="actionCommand">
      <forward name="success" path="/template/common.jsp"/>
      <forward name="error" path="/template/common.jsp"/>
    </action>
  </action-mappings>
  <message-resources parameter="com.escenic.geocode.Resources"/>
</struts-config>