Blog Search
Blog Latest Comments
nice!
by Hunter Eskew on Tuesday, August 16, 2011
Hahaha, not blogging from the iPad. This time it was me trying to do 8 things at once :) But I've since corrected. An...
by TJ Muehleman on Wednesday, May 11, 2011
Blogging from your iPad again, I see :). Great stuff, TJ! It's always so intriguing to hear where our architecture is ...
by kcoleman on Wednesday, May 11, 2011
Interesting stuff TJ! Please immediately come up with a clever acronym for cloud based OEM before Gartner or Forrester ...
by Kevin Fielding on Wednesday, May 11, 2011
Ho ADACarolyn, To further elaborate: any email generated from the community platform (invites, report abuse notificat...
by kcoleman on Thursday, May 05, 2011
Page  of  Total Items: 28

firstprevnextlast

ThePort's Product and Technology blog. We'll share helpful tips about the platform, talk about upcoming releases, and maybe on occasion share a story or two on how awesome the team is here.
Anonymous
Trigger vs. Process Server Module
Posted by Anonymous
Tuesday, May 25, 2010
Comments (1)
Just a quick helpful hint on something I've been asked a few times of late. When executing a server module in our XSLT template system, you can do it one of two ways:

ProcessServerModule or TriggerServerModule

The difference between the two is subtle, especially if you're looking at it from the user's perspective. But under the hood, the different is definitely noteworthy.

ProcessServerModule
You want to use ProcessServerModule in most cases. This logic does the processing at the server and sends the output down as rendered HTML to the client. If you view source, you'll see the HTML of the module

TriggerServerModule
The TriggerServerModule is also rendered on the server, however, instead of sending rendered HTML down to the browser, it sends an AJAX call that can be triggered by some event (onClick, onBlur, etc). So if you do a view source, you'd only see the AJAX call and not the rendered output. This is a handy method to use if you're loading modules hidden behind tabs or other event driven code. 

 
  • Visit Anonymous's profile
    Anonymous: If the parent Div that holds your TriggerServerModule is initially hidden, the ajax will automatically be invoked when that dir becomes visible.
    For example:

    TriggerServerModule (something)

    The processing work for this transform will be off-loaded from the page processing until the ajax call is made which gets "triggered" when "foo" becomes made visible.
    This allows a page filled with tabs or hidden areas to process much faster and only process later (via ajax) on a need by need basis.