English 中文(简体)
如何更新两个或两个以上不相关的部件(成功)?
原标题:Ways for AJAX / remoteFunction to update two or more unrelated divs (on success)?
  • 时间:2012-01-16 04:36:23
  •  标签:
  • grails
最佳回答

你们可以这样做,让你在 j子里发挥Su的作用,确定由此产生的html的html。 http://www.webdeveloperjuice.com/2010/04/01/meetinging-multiples-divs-by-single-ajax-quest-using-jquery/"rel=“nofollow” http://www.webelodevperjuice.com/

不能自动做到。

问题回答

You could call two remote functions separated by semi colon.

<g:select id= releaseVersion  name="releaseVersion" noSelection="[ 0 : --Select-- ]" from= ${new Alarm().constraints.releaseVersion.inList}  onchange="${remoteFunction(controller: alarm , action: updateComponentByRelease ,params:  selectedValue=  + this.value , update: component )};
${remoteFunction(controller: alarm ,action: updateDiscriminatorByComponent , params:  selectedValue=  + this.value ,update: subsystem )};"></g:select>

当非洲复兴开发银行的请求结束时,你可以安排一些活动。 例如:

<g:remoteLink action="show"
          id="1"
          update="success"
          onLoading="showProgress()"
          onComplete="updateContent()">Show Book 1</g:remoteLink>

http://grails.org/doc/2.0.x/guide/single.html#ajax” rel=“nofollow”

It doesn t look like there s a way to automatically update two divs. The only possible way it could do it is by updating both with the same content.





相关问题
grails + gwt request handling via controllers

I am new to gwt. I am trying to integrate gwt+grails.Can anybody provide me a good example for handling the request using grails controllers and not a custom servlet.I will be really thankful if ...

Error loading the grails gwt module xml

I ve installed the plugin from this article by Peter http://www.cacoethes.co.uk/blog/groovyandgrails/the-command-pattern-w.... While compile time its not able to find the module file which is present ...

Sorting Objects Based on Custom Domain Class Methods

I have a domain class, in which I ve defined some methods which give the object a score based on different algorithms (eg. popularity). I now want to retrieve a list of these objects sorted by one of ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

Hibernate/GORM: collection was not processed by flush()

I have an integration test in my Grails application that fails when I try to save an entity of type Member invitingMember.save(flush: true) This raises the following exception org.hibernate....

热门标签