public final class PollwikiIn extends TheatreInitializer0 implements EntryPointS
// Crossforum Theatre stage.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// module.css and gwt.js must load before boot script nocache.js
// http://reluk.ca/project/votorola/_/javadoc/votorola/s/gwt/pollwiki/PollwikiIn.html
if( $.client.profile().name != 'msie' ) // all but IE [1]
{
var context = 'CONTEXT';
document.write( "<link href='" + context // [2]
+ "/mediawiki/module.css' rel='stylesheet' type='text/css'/>" );
document.write( "<script src='" + context // [3]
+ "/w/publicConfig/gwt.js' type='text/javascript'></script>" );
document.write( "<script src='" + context // [3]
+ "/votorola.s.gwt.pollwiki.PollwikiIn/votorola.s.gwt.pollwiki.PollwikiIn.nocache.js'"
+ " type='text/javascript'></script>" );
}
//
// NOTES
//
// [1] IE excluded by conditional compilation in MediaWiki 16 and earlier, thus:
//
// /*@cc_on @if( false ) @*/
// /*@end @*/
//
// And by JQuery in MediaWiki 17 and later, thus:
//
// if( $.client.profile().name != 'msie' )
//
// [2] For MediaWiki 16 and earlier, would ordinarily use: importStylesheetURI( URL )
// For MediaWiki 17 and later: mw.loader.load( URL, 'text/css' )
// http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_%28users%29
//
// But instead write to ensure CSS link element precedes script element, else layout
// may be unstable: http://mail.zelea.com/list/votorola/2012-November/001540.html
//
// [3] Scripts might instead be inject asynchronously using MediaWiki's mw.loader or
// importScriptURI. We are no longer using the old cross-site linker ('xs') that
// writes to the document. But asynchronous injection has not been tested yet.
//
EntryPointS.U| Constructor and Description |
|---|
PollwikiIn() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Called after all modules are loaded provided the call was previously scheduled.
|
void |
initFrom(Stage stage,
boolean _isReferencePending)
Here the prop or other component initializes its own properties by reference to a
previously initialized stage.
|
void |
initTo(Stage stage)
Here the prop or other component initializes the properties of the stage.
|
void |
initTo(Stage stage,
TheatrePage _referrer)
Here the prop or other component initializes the properties of the stage.
|
void |
onModuleLoad()
Called first during the load of any module M that declares an
entry-point in its declaration file M.gwt.xml, this
method (a) finalizes the configuration of any other modules
on which this one depends, and (b) ensures that any views are solidly placed that
might affect the position or size of already placed views, such as those of an
embedding page or those previously attached by other modules. |
initFromComplete, initToComplete, initUltimatelypublic PollwikiIn()
public final void onModuleLoad()
EntryPointSentry-point in its declaration file M.gwt.xml, this
method (a) finalizes the configuration of any other modules
on which this one depends, and (b) ensures that any views are solidly placed that
might affect the position or size of already placed views, such as those of an
embedding page or those previously attached by other modules. This is to ensure
that the page content does not jitter from late attachments. Otherwise this
method depends as little as possible on other application
modules, as they might not be fully functional yet.
This method may also (c) schedule the invocation of the execute method.
onModuleLoad in interface EntryPointonModuleLoad in interface EntryPointSpublic void execute()
EntryPointSexecute in interface Scheduler.ScheduledCommandexecute in interface EntryPointSEntryPointS.onModuleLoad()public void initFrom(Stage stage, boolean _isReferencePending)
TheatreInitializerThe equivalent JavaScript callback is the global function
voGWTConfig.s_gwt_stage_Stage_initFrom. It may be defined in the
gwt.js configuration script, for
example.
initFrom in interface TheatreInitializerinitFrom in class TheatreInitializer0_isReferencePending - whether the referrer (if any) remains to be resolved. If this
flag is true, then initialization will eventually complete at initUltimately; otherwise it will
complete earlier at initFromComplete.public void initTo(Stage stage)
TheatreInitializerThe equivalent JavaScript callback is the global function
voGWTConfig.s_gwt_stage_Stage_initTo. It may be defined in the
gwt.js configuration script, for
example.
initTo in interface TheatreInitializerinitTo in class TheatreInitializer0public void initTo(Stage stage, TheatrePage _referrer)
TheatreInitializerr parameter. The prop will also provide a means of selecting other
differences and of re-selecting the original one, such that the user need never
navigate back and re-transit the link for this purpose.
A prop ought generally to avoid transferring a given property from a referrer when it already has a non-default value on the destination, whether set by the scene or by another prop. By the same token, an initializer that sets a default value for a property, such as actor name, will typically null the ordinary value to ensure that the default is immediately exhibited. It is recommended however that defaults be set earlier, e.g. during module initialization.
The equivalent JavaScript callback is the global function
voGWTConfig.s_gwt_stage_Stage_initTo. It may be defined in the
gwt.js configuration script, for
example.
initTo in interface TheatreInitializerinitTo in class TheatreInitializer0_referrer - the theatre page that linked to this page (referrer), or null if
there was none.