Permalink
Browse files

updates

  • Loading branch information...
1 parent de350fb commit 714bb6fdfdc2786ed8c3d315c55b50ee86459613 @vahidhedayati committed Mar 2, 2014
Showing with 4,809 additions and 203 deletions.
  1. +187 −0 .classpath
  2. +32 −0 .project
  3. +104 −0 grails-app/controllers/ajaxdependancyselectexample/DocumentsController.groovy
  4. +104 −0 grails-app/controllers/ajaxdependancyselectexample/MyShopsController.groovy
  5. +104 −0 grails-app/controllers/ajaxdependancyselectexample/OfficesController.groovy
  6. +9 −0 grails-app/domain/ajaxdependancyselectexample/Documents.groovy
  7. +9 −0 grails-app/domain/ajaxdependancyselectexample/Offices.groovy
  8. +46 −0 grails-app/views/departments/index.gsp
  9. +20 −0 grails-app/views/documents/_form.gsp
  10. +38 −0 grails-app/views/documents/create.gsp
  11. +41 −0 grails-app/views/documents/edit.gsp
  12. +50 −0 grails-app/views/documents/index.gsp
  13. +53 −0 grails-app/views/documents/show.gsp
  14. +50 −0 grails-app/views/employee/index.gsp
  15. +46 −0 grails-app/views/myBorough/index.gsp
  16. +50 −0 grails-app/views/myCity/index.gsp
  17. +11 −9 grails-app/views/myContinent/customexample.gsp
  18. +164 −97 grails-app/views/myContinent/example.gsp
  19. +24 −20 grails-app/views/myContinent/example2.gsp
  20. +683 −0 grails-app/views/myContinent/filteringExample1.gsp
  21. +21 −18 grails-app/views/myContinent/filteringExamples.gsp
  22. +14 −16 grails-app/views/myContinent/norefselection.gsp
  23. +15 −17 grails-app/views/myContinent/norefselectionext.gsp
  24. +17 −18 grails-app/views/myContinent/select-filtering.gsp
  25. +7 −8 grails-app/views/myContinent/selectautoComplete.gsp
  26. +58 −0 grails-app/views/myCountry/index.gsp
  27. +20 −0 grails-app/views/myShops/_form.gsp
  28. +38 −0 grails-app/views/myShops/create.gsp
  29. +41 −0 grails-app/views/myShops/edit.gsp
  30. +50 −0 grails-app/views/myShops/index.gsp
  31. +53 −0 grails-app/views/myShops/show.gsp
  32. +12 −0 grails-app/views/offices/_form.gsp
  33. +38 −0 grails-app/views/offices/create.gsp
  34. +41 −0 grails-app/views/offices/edit.gsp
  35. +46 −0 grails-app/views/offices/index.gsp
  36. +44 −0 grails-app/views/offices/show.gsp
  37. +50 −0 grails-app/views/streets/index.gsp
  38. +1,045 −0 target/stacktrace.log
  39. BIN .../work/plugin-classes/ajaxdependancyselection/AutoCompleteService$_selectSecondary_closure12.class
  40. BIN target/work/plugin-classes/ajaxdependancyselection/AutoCompleteService.class
  41. +146 −0 test/unit/ajaxdependancyselectexample/DepartmentsControllerSpec.groovy
  42. +146 −0 test/unit/ajaxdependancyselectexample/DocumentsControllerSpec.groovy
  43. +20 −0 test/unit/ajaxdependancyselectexample/DocumentsSpec.groovy
  44. +146 −0 test/unit/ajaxdependancyselectexample/EmployeeControllerSpec.groovy
  45. +146 −0 test/unit/ajaxdependancyselectexample/MyBoroughControllerSpec.groovy
  46. +146 −0 test/unit/ajaxdependancyselectexample/MyCityControllerSpec.groovy
  47. +146 −0 test/unit/ajaxdependancyselectexample/MyCountryControllerSpec.groovy
  48. +146 −0 test/unit/ajaxdependancyselectexample/MyShopsControllerSpec.groovy
  49. +20 −0 test/unit/ajaxdependancyselectexample/MyShopsSpec.groovy
  50. +146 −0 test/unit/ajaxdependancyselectexample/OfficesControllerSpec.groovy
  51. +20 −0 test/unit/ajaxdependancyselectexample/OfficesSpec.groovy
  52. +146 −0 test/unit/ajaxdependancyselectexample/StreetsControllerSpec.groovy
View
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="src/groovy"/>
+ <classpathentry kind="src" path="grails-app/conf"/>
+ <classpathentry kind="src" path="grails-app/controllers"/>
+ <classpathentry kind="src" path="grails-app/domain"/>
+ <classpathentry kind="src" path="grails-app/services"/>
+ <classpathentry kind="src" path="grails-app/taglib"/>
+ <classpathentry kind="src" path="grails-app/utils"/>
+ <classpathentry kind="src" path="test/integration"/>
+ <classpathentry kind="src" path="test/unit"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path=".link_to_grails_plugins/cache-1.1.1/grails-app/conf">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/cache-1.1.1/grails-app/services">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/cache-1.1.1/grails-app/taglib">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/cache-1.1.1/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/cache-1.1.1/src/java">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path=".link_to_grails_plugins/database-migration-1.3.8/grails-app/conf">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/database-migration-1.3.8/grails-app/controllers">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/database-migration-1.3.8/grails-app/views">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/database-migration-1.3.8/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/hibernate-3.6.10.6/grails-app/i18n">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/hibernate-3.6.10.6/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/hibernate-3.6.10.6/src/java">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path=".link_to_grails_plugins/jquery-1.10.2.2/grails-app/conf">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/jquery-1.10.2.2/grails-app/services">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/jquery-1.10.2.2/grails-app/taglib">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/jquery-1.10.2.2/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path=".link_to_grails_plugins/jquery-ui-1.10.3/grails-app/conf">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/jquery-ui-1.10.3/grails-app/taglib">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/release-3.0.1/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/release-3.0.1/src/java">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path=".link_to_grails_plugins/resources-1.2.1/grails-app/conf">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/resources-1.2.1/grails-app/i18n">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/resources-1.2.1/grails-app/resourceMappers">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/resources-1.2.1/grails-app/taglib">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/resources-1.2.1/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/resources-1.2.1/src/java">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/rest-client-builder-1.0.3/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/scaffolding-2.0.1/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/scaffolding-2.0.1/src/java">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/tomcat-7.0.47/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/tomcat-7.0.47/src/java">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="BuildConfig.groovy|*DataSource.groovy|UrlMappings.groovy|Config.groovy|BootStrap.groovy|spring/resources.groovy" kind="src" path=".link_to_grails_plugins/webxml-1.4.1/grails-app/conf">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path=".link_to_grails_plugins/webxml-1.4.1/src/groovy">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry exported="true" kind="src" path="/ajaxdependancyselection">
+ <attributes>
+ <attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.grails.ide.eclipse.core.CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target-eclipse/classes"/>
+</classpath>
View
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ajaxdependancyselectexample</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.grails.ide.eclipse.core.nature</nature>
+ <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>.link_to_grails_plugins</name>
+ <type>2</type>
+ <location>/home/mx1/workspace-gitpublish/ajaxdependancyselectexample/target/work/plugins</location>
+ </link>
+ </linkedResources>
+</projectDescription>
@@ -0,0 +1,104 @@
+package ajaxdependancyselectexample
+
+
+
+import static org.springframework.http.HttpStatus.*
+import grails.transaction.Transactional
+
+@Transactional(readOnly = true)
+class DocumentsController {
+
+ static allowedMethods = [save: "POST", update: "PUT", delete: "DELETE"]
+
+ def index(Integer max) {
+ params.max = Math.min(max ?: 10, 100)
+ respond Documents.list(params), model:[documentsInstanceCount: Documents.count()]
+ }
+
+ def show(Documents documentsInstance) {
+ respond documentsInstance
+ }
+
+ def create() {
+ respond new Documents(params)
+ }
+
+ @Transactional
+ def save(Documents documentsInstance) {
+ if (documentsInstance == null) {
+ notFound()
+ return
+ }
+
+ if (documentsInstance.hasErrors()) {
+ respond documentsInstance.errors, view:'create'
+ return
+ }
+
+ documentsInstance.save flush:true
+
+ request.withFormat {
+ form {
+ flash.message = message(code: 'default.created.message', args: [message(code: 'documentsInstance.label', default: 'Documents'), documentsInstance.id])
+ redirect documentsInstance
+ }
+ '*' { respond documentsInstance, [status: CREATED] }
+ }
+ }
+
+ def edit(Documents documentsInstance) {
+ respond documentsInstance
+ }
+
+ @Transactional
+ def update(Documents documentsInstance) {
+ if (documentsInstance == null) {
+ notFound()
+ return
+ }
+
+ if (documentsInstance.hasErrors()) {
+ respond documentsInstance.errors, view:'edit'
+ return
+ }
+
+ documentsInstance.save flush:true
+
+ request.withFormat {
+ form {
+ flash.message = message(code: 'default.updated.message', args: [message(code: 'Documents.label', default: 'Documents'), documentsInstance.id])
+ redirect documentsInstance
+ }
+ '*'{ respond documentsInstance, [status: OK] }
+ }
+ }
+
+ @Transactional
+ def delete(Documents documentsInstance) {
+
+ if (documentsInstance == null) {
+ notFound()
+ return
+ }
+
+ documentsInstance.delete flush:true
+
+ request.withFormat {
+ form {
+ flash.message = message(code: 'default.deleted.message', args: [message(code: 'Documents.label', default: 'Documents'), documentsInstance.id])
+ redirect action:"index", method:"GET"
+ }
+ '*'{ render status: NO_CONTENT }
+ }
+ }
+
+ protected void notFound() {
+ request.withFormat {
+ form {
+ flash.message = message(code: 'default.not.found.message', args: [message(code: 'documentsInstance.label', default: 'Documents'), params.id])
+ redirect action: "index", method: "GET"
+ }
+ '*'{ render status: NOT_FOUND }
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit 714bb6f

Please sign in to comment.