Re: [JPP-Devel] Update and refresh layer in run time
You might try: context.getLayerManager().fireFeaturesChanged( features, FeatureEventType.ATTRIBUTES_MODIFIED, layer); Also look into: context.getLayerManager().setFiringEvents(false); //before loop context.getLayerManager().setFiringEvents(true); //after loop Larry On Wed, Jun 30, 2010 at 10:21 PM, Elton Chan wrote: > Hi Larry, > > Thank for your reply. I've tested that view panel can update automatically > when attribute is updated. However, if I continue to update an attribute in > a "for" loop, it seems it cannot refresh. I wonder if the auto update would > be activated immediately after the setAttribute function, or after > completion of the "for" loop or I need to add a later between each update. > > BTW, how can I fire the update event mannually. > > thanks, > Elton > > > > > > > > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Update and refresh layer in run time
Hi Larry, Thank for your reply. I've tested that view panel can update automatically when attribute is updated. However, if I continue to update an attribute in a "for" loop, it seems it cannot refresh. I wonder if the auto update would be activated immediately after the setAttribute function, or after completion of the "for" loop or I need to add a later between each update. BTW, how can I fire the update event mannually. thanks, Elton -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Update and refresh layer in run time
Hi Elton, Usually for these situations update events would fire automatically. If for some reason, they do not, you can fire them manually. regards, Larry On Tue, Jun 29, 2010 at 8:42 AM, Elton Chan wrote: > Hi there, > > Suppose if I have a layer added in the LayerTreePanel, and I also got the > FeatureCollection of the layer, how can I update the layer using program and > refresh it on the view panel. > > Thanks, > Elton > > > > > > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel