diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp index 2ae63f42..5ca99d7f 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowExercise.jsp @@ -5,6 +5,8 @@ Getting Started with Spring Web Flow: Creating Your First Web Flow " type="text/css" /> " type="text/css" /> + " type="text/css" /> + " type="text/css" /> @@ -68,12 +70,14 @@
  • Go ahead and create a start.jsp in your flow directory and paste in the following:
    +			
         <html>
             <head>
                 <title>Hello world!</title>
             </head>
             <h1>Hello world!</h1>
         </html>
    +    		
     			
  • @@ -89,27 +93,35 @@
  • Next, try transitioning your flow from one state to another to implement a navigation rule. In your helloworld flow, add the following transition to your start view-state:
    +			
         <transition on="submit" to="page2" />
    +    		
     			
    Then define your page2 view-state:
    +			
         <view-state id="page2">
         </view-state>
    +    		
     			
    And the corresponding page2.jsp:
    +			
         <html>
             <head>
                 <title>Hello world!</title>
             </head>
             <h1>This is page 2!</h1>
         </html>
    +    		
     			
    Finally, create a button on your start.jsp that raises the submit event to trigger the state transition:
    +			
         <form method="post">
             <input type="submit" name="_eventId_submit" value="Submit" />
         </form>
    +    		
     			
    Click the button and you should be taken to page 2.
  • @@ -125,6 +137,7 @@ Try implementing a dynamic navigation rule by first adding a bound checkbox to your start.jsp. Do this by replacing its contents with the following snippet:
    +			
         <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
         <html>
             <head>
    @@ -136,11 +149,13 @@
                 <input type="submit" name="_eventId_submit" value="Submit" />
             </form:form>		
         </html>
    +    		
     			
  • Next, create a HelloWorldForm class in the org.springframework.webflow.samples.helloworld package with the following code:
    +			
         package org.springframework.webflow.samples.helloworld;
     		
         import java.io.Serializable;
    @@ -156,16 +171,21 @@
                 this.selected = selected;
             }
         }
    +    		
     			
  • At the top of your helloworld-flow, declare the HelloWorldForm as a flow variable:
    +			
         <var name="helloWorldForm" class="org.springframework.webflow.samples.helloworld.HelloWorldForm" />
    +    		
     			
    Then update your start view-state to use this variable as its data model, enabling automatic model binding and validation:
    -    <view-state id="start" model="helloWorldForm"> ...	
    +			
    +    <view-state id="start" model="helloWorldForm"> ...
    +    			
     			

    Refresh your flow and the checkbox should render checked since the default value for the HelloWorldForm selected property is true. @@ -174,7 +194,8 @@

  • Now insert a decision state that says if the checkbox is selected goto page2, else goto a new page3: -
    	
    +			
    +			
         <decision-state id="isSelected">
             <if test="helloWorldForm.selected" then="page2" else="page3" />
         </decision-state>
    @@ -183,13 +204,16 @@
         </view-state>	
     	    
         <view-state id="page3">
    -    </view-state>	
    +    </view-state>
    +    			
     			
    Be sure to update your start view-state to transition to the isSelected decision state instead of page2 directly:
    +			
         <view-state id="start">
             <transition on="submit" to="isSelected" />
    -    </view-state>		
    +    </view-state>
    +    				
     			
    Click the Submit button with the checkbox selected and you should be taken to page2. Click the button with the checkbox de-selected and you should be taken to page3 (you'll need to create a JSP or you'll get a 404). @@ -202,15 +226,21 @@
  • Finish up your helloworld flow by adding another button on the start.jsp that ends the flow:
    +			
         <input type="submit" name="_eventId_finish" value="Finish" />
    +    		
     			
    In your start view-state, declare the finish transition:
    +			
         <transition on="finish" to="finished" />
    +    		
     			
    And finally define the end-state:
    +			
         <end-state id="finished" view="externalRedirect:welcome" />
    +    		
     			
    Click the Finish button and you should be taken back to the application welcome screen.
  • @@ -233,5 +263,11 @@ } })); }).style('display','none'); + + dojo.require("dojox.highlight.languages.xml"); + dojo.addOnLoad(function(){ + dojo.query("code").forEach(dojox.highlight.init); + }); + \ No newline at end of file diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp index 6218e976..6533b679 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp @@ -5,6 +5,8 @@ Getting Started with Spring Web Flow: Setting up Web Flow in a Spring Web Application " type="text/css" /> " type="text/css" /> + " type="text/css" /> + " type="text/css" /> @@ -28,7 +30,8 @@ If you prefer to go right to implementing your first flow, you can +
    +	
         <!-- The front controller of this Spring MVC application, responsible for handling all application requests -->
         <servlet>
             <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    @@ -47,6 +50,7 @@ If you prefer to go right to implementing your first flow, you can 
    -	
    +	
    +	
         /webapp
             /WEB-INF
                 /spring
    @@ -69,6 +74,7 @@ If you prefer to go right to implementing your first flow, you can 
    -	
    +	
    +	
         <!-- Scans within the base package of the application for @Components to configure as beans -->
         <context:component-scan base-package="org.springframework.webflow.samples.gettingstarted" />
    +    
     	

    With this technique, your Spring configuration is setup once and you generally never have to update your configuration files again as new components are added to your application. @@ -95,11 +103,13 @@ If you prefer to go right to implementing your first flow, you can +

    +	
         <!-- Registers the web flows that can be executed -->	
         <webflow:flow-registry id="flowRegistry" base-path="/WEB-INF/">
             <webflow:flow-location-pattern value="**/*-flow.xml" />
         </webflow:flow-registry>
    +    
     	

    The example above scans /WEB-INF looking for -flow.xml files and registers them. @@ -107,14 +117,17 @@ If you prefer to go right to implementing your first flow, you can +

    +	
         <!-- Configures the engine that executes web flows in this application -->
         <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry" />
    +    
     	

    Finally, in mvc-config.xml plug in adapters to hook the flow-executor into the Spring MVC DispatcherServlet request processing pipeline:

    -
    +	
    +	
         <!-- Maps requests to flows in the flowRegistry -->
         <bean id="flowMappings" class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
             <property name="order" value="0" />
    @@ -125,12 +138,15 @@ If you prefer to go right to implementing your first flow, you can 
     	

    We also recommend you turn on development mode while developing so you never have to redeploy your application to test changes:

    -
    +	
    +	
         <webflow:flow-builder-services id="flowBuilderServices" development="true" />
    +    
     	
    @@ -149,7 +165,8 @@ If you prefer to go right to implementing your first flow, you can +
    +	
         <!-- Maps requests to flows in the flowRegistry; for example, a request for resource /hotels/booking maps to a flow with id "hotels/booking"
              If no flow is found with that id, Spring MVC proceeds to the next HandlerMapping (order=1 below). -->
         <bean id="flowMappings" class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
    @@ -161,21 +178,24 @@ If you prefer to go right to implementing your first flow, you can 
     	

    Once a request has been mapped to a handler object such as a @Controller of web flow, the DispatcherServlet uses the HandlerAdapter registered for that kind of handler to invoke it. This decouples the DispatcherServlet from specific handler implementations, which allows Spring MVC to support different controller technologies in an extensible manner. As a one-time configuration step, a typical Spring web application registers HandlerAdapters that know how to invoke @Controllers and web flows when they are mapped:

    -
    +	
    +	
         <!-- Enables annotated @Controllers; responsible for invoking an annotated POJO @Controller when one is mapped. -->
         <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
         
         <!-- Enables web flows; responsible for calling the Spring Web Flow system to execute a flow when one is mapped. -->
         <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter">
             <property name="flowExecutor" ref="flowExecutor" />
    -    </bean>	
    +    </bean>
    +    	
     	

    To illustrate a typical DispatcherServlet pipeline, the following graphic illustrates the sequence of events that happen in this application when the /tutorial resource is requested, which is handled by the web flow you are interacting with right now:
    @@ -215,5 +235,10 @@ If you prefer to go right to implementing your first flow, you can
    \ No newline at end of file diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowWhatsNext.jsp b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowWhatsNext.jsp index 1dc90fea..e78f9a2e 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowWhatsNext.jsp +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowWhatsNext.jsp @@ -83,7 +83,13 @@

    Spring Security is a comprehensive and portable Java security framework, and Web Flow provides native support for securing flows with this technology.

    -
  • + +
  • +

    Spring BlazeDS Integration

    +

    + The Spring BlazeDS Integration project makes it easy to connect a Flex client to a Spring-powered server using Adobe's BlazeDS and LiveCycle DS technologies. +

    +
  • We sincerely hope you enjoyed this tutorial. We wish you great success and lots of fun getting results with Spring Web Flow on your development projects! diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight.js b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight.js new file mode 100644 index 00000000..59c6003f --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight.js @@ -0,0 +1,12 @@ +/* + Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dojox.highlight"]){ +dojo._hasResource["dojox.highlight"]=true; +dojo.provide("dojox.highlight"); +dojo.require("dojox.highlight._base"); +} diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/README b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/README new file mode 100644 index 00000000..cdaed125 --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/README @@ -0,0 +1,31 @@ +------------------------------------------------------------------------------- +dojox.highlight +------------------------------------------------------------------------------- +Version 1.0 +Release date: 11/25/2007 +------------------------------------------------------------------------------- +Project state: +beta +------------------------------------------------------------------------------- +Credits + Ivan Sagalaev (softwaremaniacs.org) Author + Peter Higgins (dante) Dojo port +------------------------------------------------------------------------------- +Project description + +A syntax highlighting engine for the Dojo Toolkit +------------------------------------------------------------------------------- +Dependencies: + +dojo base only. +------------------------------------------------------------------------------- +Documentation + +------------------------------------------------------------------------------- +Installation instructions + +simply get the dojox/highlight folder (and dojox/highlight.js) from the +dojox SVN repository, and include in your page via + +dojo.require("dojox.highlight"); + diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/_base.js b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/_base.js new file mode 100644 index 00000000..91041c6c --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/_base.js @@ -0,0 +1,326 @@ +/* + Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dojox.highlight._base"]){ +dojo._hasResource["dojox.highlight._base"]=true; +dojo.provide("dojox.highlight._base"); +(function(){ +var dh=dojox.highlight,_2="\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)"; +dh.constants={IDENT_RE:"[a-zA-Z][a-zA-Z0-9_]*",UNDERSCORE_IDENT_RE:"[a-zA-Z_][a-zA-Z0-9_]*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:_2,APOS_STRING_MODE:{className:"string",begin:"'",end:"'",illegal:"\\n",contains:["escape"],relevance:0},QUOTE_STRING_MODE:{className:"string",begin:"\"",end:"\"",illegal:"\\n",contains:["escape"],relevance:0},BACKSLASH_ESCAPE:{className:"escape",begin:"\\\\.",end:"^",relevance:0},C_LINE_COMMENT_MODE:{className:"comment",begin:"//",end:"$",relevance:0},C_BLOCK_COMMENT_MODE:{className:"comment",begin:"/\\*",end:"\\*/"},HASH_COMMENT_MODE:{className:"comment",begin:"#",end:"$"},C_NUMBER_MODE:{className:"number",begin:_2,end:"^",relevance:0}}; +function esc(_3){ +return _3.replace(/&/gm,"&").replace(//gm,">"); +}; +function verifyText(_4){ +return dojo.every(_4.childNodes,function(_5){ +return _5.nodeType==3||String(_5.nodeName).toLowerCase()=="br"; +}); +}; +function blockText(_6){ +var _7=[]; +dojo.forEach(_6.childNodes,function(_8){ +if(_8.nodeType==3){ +_7.push(_8.nodeValue); +}else{ +if(String(_8.nodeName).toLowerCase()=="br"){ +_7.push("\n"); +}else{ +throw "Complex markup"; +} +} +}); +return _7.join(""); +}; +function buildKeywordGroups(_9){ +if(!_9.keywordGroups){ +for(var _a in _9.keywords){ +var kw=_9.keywords[_a]; +if(kw instanceof Object){ +_9.keywordGroups=_9.keywords; +}else{ +_9.keywordGroups={keyword:_9.keywords}; +} +break; +} +} +}; +function buildKeywords(_c){ +if(_c.defaultMode&&_c.modes){ +buildKeywordGroups(_c.defaultMode); +dojo.forEach(_c.modes,buildKeywordGroups); +} +}; +var _d=function(_e,_f){ +this.langName=_e; +this.lang=dh.languages[_e]; +this.modes=[this.lang.defaultMode]; +this.relevance=0; +this.keywordCount=0; +this.result=[]; +if(!this.lang.defaultMode.illegalRe){ +this.buildRes(); +buildKeywords(this.lang); +} +try{ +this.highlight(_f); +this.result=this.result.join(""); +} +catch(e){ +if(e=="Illegal"){ +this.relevance=0; +this.keywordCount=0; +this.partialResult=this.result.join(""); +this.result=esc(_f); +}else{ +throw e; +} +} +}; +dojo.extend(_d,{buildRes:function(){ +dojo.forEach(this.lang.modes,function(_10){ +if(_10.begin){ +_10.beginRe=this.langRe("^"+_10.begin); +} +if(_10.end){ +_10.endRe=this.langRe("^"+_10.end); +} +if(_10.illegal){ +_10.illegalRe=this.langRe("^(?:"+_10.illegal+")"); +} +},this); +this.lang.defaultMode.illegalRe=this.langRe("^(?:"+this.lang.defaultMode.illegal+")"); +},subMode:function(_11){ +var _12=this.modes[this.modes.length-1].contains; +if(_12){ +var _13=this.lang.modes; +for(var i=0;i<_12.length;++i){ +var _15=_12[i]; +for(var j=0;j<_13.length;++j){ +var _17=_13[j]; +if(_17.className==_15&&_17.beginRe.test(_11)){ +return _17; +} +} +} +} +return null; +},endOfMode:function(_18){ +for(var i=this.modes.length-1;i>=0;--i){ +var _1a=this.modes[i]; +if(_1a.end&&_1a.endRe.test(_18)){ +return this.modes.length-i; +} +if(!_1a.endsWithParent){ +break; +} +} +return 0; +},isIllegal:function(_1b){ +var _1c=this.modes[this.modes.length-1].illegalRe; +return _1c&&_1c.test(_1b); +},langRe:function(_1d,_1e){ +var _1f="m"+(this.lang.case_insensitive?"i":"")+(_1e?"g":""); +return new RegExp(_1d,_1f); +},buildTerminators:function(){ +var _20=this.modes[this.modes.length-1],_21={}; +if(_20.contains){ +dojo.forEach(this.lang.modes,function(_22){ +if(dojo.indexOf(_20.contains,_22.className)>=0){ +_21[_22.begin]=1; +} +}); +} +for(var i=this.modes.length-1;i>=0;--i){ +var m=this.modes[i]; +if(m.end){ +_21[m.end]=1; +} +if(!m.endsWithParent){ +break; +} +} +if(_20.illegal){ +_21[_20.illegal]=1; +} +var t=[]; +for(i in _21){ +t.push(i); +} +_20.terminatorsRe=this.langRe("("+t.join("|")+")"); +},eatModeChunk:function(_26,_27){ +var _28=this.modes[this.modes.length-1]; +if(!_28.terminatorsRe){ +this.buildTerminators(); +} +_26=_26.substr(_27); +var _29=_28.terminatorsRe.exec(_26); +if(!_29){ +return {buffer:_26,lexeme:"",end:true}; +} +return {buffer:_29.index?_26.substr(0,_29.index):"",lexeme:_29[0],end:false}; +},keywordMatch:function(_2a,_2b){ +var _2c=_2b[0]; +if(this.lang.case_insensitive){ +_2c=_2c.toLowerCase(); +} +for(var _2d in _2a.keywordGroups){ +if(_2c in _2a.keywordGroups[_2d]){ +return _2d; +} +} +return ""; +},buildLexemes:function(_2e){ +var _2f={}; +dojo.forEach(_2e.lexems,function(_30){ +_2f[_30]=1; +}); +var t=[]; +for(var i in _2f){ +t.push(i); +} +_2e.lexemsRe=this.langRe("("+t.join("|")+")",true); +},processKeywords:function(_33){ +var _34=this.modes[this.modes.length-1]; +if(!_34.keywords||!_34.lexems){ +return esc(_33); +} +if(!_34.lexemsRe){ +this.buildLexemes(_34); +} +_34.lexemsRe.lastIndex=0; +var _35=[],_36=0,_37=_34.lexemsRe.exec(_33); +while(_37){ +_35.push(esc(_33.substr(_36,_37.index-_36))); +var _38=this.keywordMatch(_34,_37); +if(_38){ +++this.keywordCount; +_35.push(""+esc(_37[0])+""); +}else{ +_35.push(esc(_37[0])); +} +_36=_34.lexemsRe.lastIndex; +_37=_34.lexemsRe.exec(_33); +} +_35.push(esc(_33.substr(_36,_33.length-_36))); +return _35.join(""); +},processModeInfo:function(_39,_3a,end){ +var _3c=this.modes[this.modes.length-1]; +if(end){ +this.result.push(this.processKeywords(_3c.buffer+_39)); +return; +} +if(this.isIllegal(_3a)){ +throw "Illegal"; +} +var _3d=this.subMode(_3a); +if(_3d){ +_3c.buffer+=_39; +this.result.push(this.processKeywords(_3c.buffer)); +if(_3d.excludeBegin){ +this.result.push(_3a+""); +_3d.buffer=""; +}else{ +this.result.push(""); +_3d.buffer=_3a; +} +this.modes.push(_3d); +this.relevance+=typeof _3d.relevance=="number"?_3d.relevance:1; +return; +} +var _3e=this.endOfMode(_3a); +if(_3e){ +_3c.buffer+=_39; +if(_3c.excludeEnd){ +this.result.push(this.processKeywords(_3c.buffer)+""+_3a); +}else{ +this.result.push(this.processKeywords(_3c.buffer+_3a)+""); +} +while(_3e>1){ +this.result.push(""); +--_3e; +this.modes.pop(); +} +this.modes.pop(); +this.modes[this.modes.length-1].buffer=""; +return; +} +},highlight:function(_3f){ +var _40=0; +this.lang.defaultMode.buffer=""; +do{ +var _41=this.eatModeChunk(_3f,_40); +this.processModeInfo(_41.buffer,_41.lexeme,_41.end); +_40+=_41.buffer.length+_41.lexeme.length; +}while(!_41.end); +if(this.modes.length>1){ +throw "Illegal"; +} +}}); +function replaceText(_42,_43,_44){ +if(String(_42.tagName).toLowerCase()=="code"&&String(_42.parentNode.tagName).toLowerCase()=="pre"){ +var _45=document.createElement("div"),_46=_42.parentNode.parentNode; +_45.innerHTML="

    "+_44+"
    "; +_46.replaceChild(_45.firstChild,_42.parentNode); +}else{ +_42.className=_43; +_42.innerHTML=_44; +} +}; +function highlightStringLanguage(_47,str){ +var _49=new _d(_47,str); +return {result:_49.result,langName:_47,partialResult:_49.partialResult}; +}; +function highlightLanguage(_4a,_4b){ +var _4c=highlightStringLanguage(_4b,blockText(_4a)); +replaceText(_4a,_4a.className,_4c.result); +}; +function highlightStringAuto(str){ +var _4e="",_4f="",_50=2,_51=str; +for(var key in dh.languages){ +if(!dh.languages[key].defaultMode){ +continue; +} +var _53=new _d(key,_51),_54=_53.keywordCount+_53.relevance,_55=0; +if(!_4e||_54>_55){ +_55=_54; +_4e=_53.result; +_4f=_53.langName; +} +} +return {result:_4e,langName:_4f}; +}; +function highlightAuto(_56){ +var _57=highlightStringAuto(blockText(_56)); +if(_57.result){ +replaceText(_56,_57.langName,_57.result); +} +}; +dh.processString=function(str,_59){ +return _59?highlightStringLanguage(_59,str):highlightStringAuto(str); +}; +dh.init=function(_5a){ +if(dojo.hasClass(_5a,"no-highlight")){ +return; +} +if(!verifyText(_5a)){ +return; +} +var _5b=_5a.className.split(/\s+/),_5c=dojo.some(_5b,function(_5d){ +if(_5d.charAt(0)!="_"&&dh.languages[_5d]){ +highlightLanguage(_5a,_5d); +return true; +} +return false; +}); +if(!_5c){ +highlightAuto(_5a); +} +}; +dh.Code=function(_5e,_5f){ +dh.init(_5f); +}; +})(); +} diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/languages/pygments/xml.js b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/languages/pygments/xml.js new file mode 100644 index 00000000..9cabf40e --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/languages/pygments/xml.js @@ -0,0 +1,14 @@ +/* + Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dojox.highlight.languages.pygments.xml"]){ +dojo._hasResource["dojox.highlight.languages.pygments.xml"]=true; +dojo.provide("dojox.highlight.languages.pygments.xml"); +dojo.require("dojox.highlight._base"); +dojox.highlight.languages.pygments.xml={a:1}; +dojox.highlight.languages.xml={defaultMode:{contains:["name entity","comment","comment preproc","_tag"]},modes:[{className:"comment",begin:""},{className:"comment preproc",begin:"\\<\\!\\[CDATA\\[",end:"\\]\\]\\>"},{className:"comment preproc",begin:"\\<\\!",end:"\\>"},{className:"comment preproc",begin:"\\<\\?",end:"\\?\\>",relevance:5},{className:"string",begin:"'",end:"'",illegal:"\\n",relevance:0},{className:"string",begin:"\"",end:"\"",illegal:"\\n",relevance:0},{className:"name entity",begin:"\\&[a-z]+;",end:"^"},{className:"name tag",begin:"\\b[a-z0-9_\\:\\-]+\\b",end:"^"},{className:"name attribute",begin:"\\b[a-z0-9_\\:\\-]+=",end:"^",relevance:0},{className:"_tag",begin:"\\<",end:"\\>",contains:["name tag","name attribute","string"]},{className:"_tag",begin:"\\",contains:["name tag"]}]}; +} diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/languages/xml.js b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/languages/xml.js new file mode 100644 index 00000000..e628e78c --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/languages/xml.js @@ -0,0 +1,19 @@ +/* + Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + + +if(!dojo._hasResource["dojox.highlight.languages.xml"]){ +dojo._hasResource["dojox.highlight.languages.xml"]=true; +dojo.provide("dojox.highlight.languages.xml"); +dojo.require("dojox.highlight._base"); +(function(){ +var _1={className:"comment",begin:""}; +var _2={className:"attribute",begin:" [a-zA-Z-]+=",end:"^",contains:["value"]}; +var _3={className:"value",begin:"\"",end:"\""}; +var dh=dojox.highlight,_5=dh.constants; +dh.languages.xml={defaultMode:{contains:["pi","comment","cdata","tag"]},case_insensitive:true,modes:[{className:"pi",begin:"<\\?",end:"\\?>",relevance:10},_1,{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>"},{className:"tag",begin:"",contains:["title","tag_internal"],relevance:1.5},{className:"title",begin:"[A-Za-z:_][A-Za-z0-9\\._:-]+",end:"^",relevance:0},{className:"tag_internal",begin:"^",endsWithParent:true,contains:["attribute"],relevance:0,illegal:"[\\+\\.]"},_2,_3],XML_COMMENT:_1,XML_ATTR:_2,XML_VALUE:_3}; +})(); +} diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/resources/highlight.css b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/resources/highlight.css new file mode 100644 index 00000000..45a61a31 --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/resources/highlight.css @@ -0,0 +1,51 @@ + +.string, +.function .title, +.class .title, +.tag .attribute .value, +.css .rules .value, +.preprocessor, +.ruby .symbol, +.ruby .instancevar, +.ruby .class .parent, +.built_in, +.sql .aggregate, +.django .template_tag, +.django .variable, +.smalltalk .class { + color: #800; +} +.comment, +.java .annotation, +.template_comment { + color: #888; +} +.number, +.regexp, +.javascript .literal, +.smalltalk .symbol, +.smalltalk .char { + color: #080; +} +.javadoc, +.ruby .string, +.python .decorator, +.django .filter .argument, +.smalltalk .localvars, +.smalltalk .array, +.css .attr_selector, +.xml .pi { + color: #88F; +} +.keyword, +.css .id, +.phpdoc, +.function .title, +.class .title, +.vbscript .built_in, +.sql .aggregate, +.rsl .built_in, +.smalltalk .class, +.xml .tag .title { + font-weight: bold; +} diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/resources/pygments/ide.css b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/resources/pygments/ide.css new file mode 100644 index 00000000..0b5c4f73 --- /dev/null +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/dojox/highlight/resources/pygments/ide.css @@ -0,0 +1,78 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov + +*/ + +pre code { + display: block; + border:1px dashed #aaaaaa; + overflow:auto; + background-color: #f4f4f4; + color:#444444; + padding:3px; + whitespace:pre; +} + +.subst, .title { + font-weight: normal; + color: #000; +} + +.comment, .template_comment, .javadoc, .diff .header { + color: #808080; + font-style: italic; +} + +.annotation, .decorator, .preprocessor, .doctype, .pi, .chunk, .shebang, .apache .cbracket { + color: #808000; +} + +.tag, .pi { + background: #f4f4f4; +} + +.tag .title, .id, .attr_selector, .literal, .keyword, .hexcolor, .css .function, .ini .title, .css .class, .list .title { + font-weight: bold; + color: #000080; +} + +.attribute, .rules .keyword, .number, .date, .regexp { + font-weight: bold; + color: #0000ff; +} + +.number, .regexp { + font-weight: normal; +} + +.string, .value, .filter .argument, .css .function .params, .apache .tag { + color: #008000; + font-weight: bold; +} + +.symbol, .char { + color: #000; + background: #d0eded; + font-style: italic; +} + +.phpdoc, .javadoctag { + text-decoration: underline; +} + +.variable, .envvar, .apache .sqbracket { + color: #660e7a; +} + +.addition { + background: #baeeba; +} + +.deletion { + background: #ffc8bd; +} + +.diff .change { + background: #bccff9; +}