myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "DojoInitializer" by WernerPunz
Date Thu, 20 Apr 2006 07:28:10 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by WernerPunz:
http://wiki.apache.org/myfaces/DojoInitializer

New page:
= s:dojoInitializer =

The dojo initializer is the first of a set of dojo enabled components.
This is not an end user component but should allow the quick testing and hacking of dojo code.

The main reason for this component is, that it is rather complicated and not very well documented
on how to do 
a proper initialisation of the dojo javascript subsystem.
To get a quickstart a initializer tag which takes care of most of the boilerplate details
can be helpful.

Some examples for the dojo initializer used in various stages of page development can be found
in the dojo subdirectory
of the myfaces sandbox examples.

Usage:
{{{
<s:dojoInitializer require="package" provide="package" debug="true/false"  debugAtAllCosts="true/false"
..../>	
TODO add the additional initializer attributes
}}}
Example:
{
 <s:dojoInitializer require="dojo.widget.Editor" debug="true"/>	
 <s:dojoInitializer require="dojo.widget.DebugConsole" debugAtAllCosts="false"/>	
 <s:dojoInitializer require="dojo.widget.ResizeHandle" />	
 <s:dojoInitializer debugConsole="true" expanded="true"/>


{{{ <f:verbatim>
    <script type="text/javascript" >
	function generateSomeDebuggingInfo() {
	  for (var x=0; x<10; x++) {
		dojo.debug(x + ": Here is some debugging info, should be 10 new lines");					
	}
	dojo.debug("also note the usage of the expanded attribute");
	dojo.debug("this attribute set to true loads the expanded version");
	dojo.debug("otherwise the non expanded version is loaded");
						}
   </script>
   </f:verbatim>
<h:form>	
  <h:commandButton id="triggerdojo" onclick="javascript:generateSomeDebuggingInfo();return
false;" value="[Press me for debug infos]"></h:commandButton>
...

}

Mime
View raw message