<?xml version="1.0"?>

<st-source>
<time-stamp>From Squeak3.9 on 24 July 2007 at 3:13:37 pm</time-stamp>
<version>SeasideAssistants-mb.12.mcz      24 July 2007 3:13:27 pm</version>

<class>
<name>WAAssistantsCanvasRenderer</name>
<environment>Seaside</environment>
<super>Seaside.WARenderCanvas</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>shouldRaiseNestedFormErrors shouldSilentlyDiscardNestedForms shouldRaiseDuplicateCssIdErrors</inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WAAssistantsRenderer</name>
<environment>Seaside</environment>
<super>Seaside.WAHtmlRenderer</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>shouldRaiseNestedFormErrors shouldSilentlyDiscardNestedForms shouldRaiseDuplicateCssIdErrors</inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WADuplicateIdTest</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>shouldRaiseDuplicateCssIdErrors</inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WADuplicateIdCanvasTest</name>
<environment>Seaside</environment>
<super>Seaside.WADuplicateIdTest</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WAManyTests</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>allTests</inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WAManyClassicTests</name>
<environment>Seaside</environment>
<super>Seaside.WAManyTests</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WAMoreTests</name>
<environment>Seaside</environment>
<super>Seaside.WAFrameComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WAMoreClassicTests</name>
<environment>Seaside</environment>
<super>Seaside.WAMoreTests</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WANestedTagTest</name>
<environment>Seaside</environment>
<super>Seaside.WAComponent</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>isNested shouldRaiseNestedFormErrors shouldSilentlyDiscardNestedForms name nickName</inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WANestedTagCanvasTest</name>
<environment>Seaside</environment>
<super>Seaside.WANestedTagTest</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Tests</category>
<attributes>
<package>SeasideAssistants-Tests</package>
</attributes>
</class>

<class>
<name>WASmartHtmlDocument</name>
<environment>Seaside</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>document tagStack cssIds</inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>SeasideAssistants-Core</category>
<attributes>
<package>SeasideAssistants-Core</package>
</attributes>
</class>
<methods>
<class-id>Seaside.WAHtmlDocument class</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">newWithSmartDecoration
	^Seaside.WASmartHtmlDocument on: self basicNew</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlDocument class</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">root: anHtmlRoot
	^self newWithSmartDecoration initializeWithRoot: anHtmlRoot </body>
</methods>
<methods>
<class-id>Seaside.WAPrettyPrintedDocument class</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">renderer: aRenderer
	^ self newWithSmartDecoration initializeWithRenderer: aRenderer</body>
</methods>
<methods>
<class-id>Seaside.WAAbstractHtmlBuilder</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">openTag: aString 
	self document
		openTag: aString
		attributes: self attributes
		renderer: self.
	attributeBuffer := nil</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlRenderer</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">form: aBlock 
	((self document isWithinTag: 'form') not or: 
			[self shouldRaiseNestedFormErrors not 
				and: [self shouldSilentlyDiscardNestedForms not]]) 
		ifTrue: 
			[self 
				formWithMethod: 'post'
				action: context actionUrl urlString
				do: 
					[self div: 
							[context actionUrl parameters keysAndValuesDo: 
									[:k :v | 
									self 
										inputWithType: 'hidden'
										named: k
										value: v].
							aBlock value]]]
		ifFalse: 
			[self shouldRaiseNestedFormErrors 
				ifTrue: [self error: 'Nested &lt;form&gt; !']
				ifFalse: [aBlock value]]
</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlRenderer</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">shouldRaiseDuplicateCssIdErrors
	"Answer true to raise an error in case of duplicate CSS id in page
	Can be subclassed"
	^false
</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlRenderer</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">shouldRaiseNestedFormErrors
	"Answer true to raise an error in case of nested form tags
	Can be subclassed"
	^false
</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlRenderer</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">shouldSilentlyDiscardNestedForms
	"Answer true to ignore nested form tags
	Can be subclassed"
	^true
</body>
</methods>
<methods>
<class-id>Seaside.WATagBrush</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">openTag
	self document openTag: self tag attributes: attributes renderer: canvas.</body>
</methods>
<methods>
<class-id>Seaside.WAFormTag</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">isWithinForm

	^ self document isWithinTag: self tag</body>
</methods>
<methods>
<class-id>Seaside.WAFormTag</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">with: aBlock 
	(self isWithinForm not or: 
			[canvas shouldRaiseNestedFormErrors not 
				and: [canvas shouldSilentlyDiscardNestedForms not]]) 
		ifTrue: [super with: aBlock]
		ifFalse: 
			[canvas shouldRaiseNestedFormErrors 
				ifTrue: [self error: 'Nested &lt;form&gt; !']
				ifFalse: 
					[canvas nest: aBlock.
					isClosed := true]]</body>
</methods>
<methods>
<class-id>Seaside.WAScriptTag</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">with: aBlock
	isClosed := true.
	self attributes at: 'type' ifAbsentPut: ['text/javascript'].
	self document openTag: self tag attributes: attributes renderer: self.
	canvas html: aBlock.
	self document closeTag: self tag.
</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlCanvas</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">tag: aString
	aString = 'form' ifTrue: [^self form].
	^ self brush: (WAGenericTag tag: aString)</body>
</methods>
<methods>
<class-id>Seaside.WARenderCanvas</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">shouldRaiseDuplicateCssIdErrors
	"Answer true to raise an error in case of duplicate CSS id in page
	Can be subclassed"
	^false
</body>
</methods>
<methods>
<class-id>Seaside.WARenderCanvas</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">shouldRaiseNestedFormErrors
	"Answer true to raise an error in case of nested form tags
	Can be subclassed"
	^false
</body>
</methods>
<methods>
<class-id>Seaside.WARenderCanvas</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">shouldSilentlyDiscardNestedForms
	"Answer true to ignore nested form tags
	Can be subclassed"
	^true
</body>
</methods>
<methods>
<class-id>Seaside.WAHtmlDocument</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">openTag: aString attributes: anAttributes renderer: aRenderer
	self openTag: aString attributes: anAttributes</body>
</methods>
<methods>
<class-id>Seaside.WASimpleNavigation</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">components
	^components</body>
</methods>
<methods>
<class-id>Seaside.WASimpleNavigation</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">removeAll
	^components := OrderedCollection new.</body>
</methods>
<methods>
<class-id>Seaside.WASimpleNavigation</class-id>
<category>*SeasideAssistants</category>
<body package="SeasideAssistants-Extensions">removeLabel: aString 
	| association |
	association := components
				detect: [:ea | ea key = aString]
				ifNone: [^ self].
	components remove: association</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseNestedFormErrors
	^shouldRaiseNestedFormErrors ifNil: [super shouldRaiseNestedFormErrors]</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">initialize
	super initialize.
	shouldRaiseNestedFormErrors := super shouldRaiseNestedFormErrors.
	shouldSilentlyDiscardNestedForms := super shouldSilentlyDiscardNestedForms.
	shouldRaiseDuplicateCssIdErrors := super shouldRaiseDuplicateCssIdErrors.
</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseDuplicateCssIdErrors: anObject
	shouldRaiseDuplicateCssIdErrors := anObject</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldSilentlyDiscardNestedForms: anObject
	"Set the value of shouldSilentlyDiscardNestedForms"

	shouldSilentlyDiscardNestedForms := anObject</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseDuplicateCssIdErrors
	^shouldRaiseDuplicateCssIdErrors ifNil: [super shouldRaiseDuplicateCssIdErrors]</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseNestedFormErrors: anObject
	"Set the value of shouldRaiseNestedFormErrors"

	shouldRaiseNestedFormErrors := anObject</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsCanvasRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldSilentlyDiscardNestedForms
	^shouldSilentlyDiscardNestedForms ifNil: [super shouldSilentlyDiscardNestedForms]
</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseNestedFormErrors
	^shouldRaiseNestedFormErrors ifNil: [super shouldRaiseNestedFormErrors]</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>initialize-release</category>
<body package="SeasideAssistants-Tests">initialize
	super initialize.
	shouldRaiseNestedFormErrors := super shouldRaiseNestedFormErrors.
	shouldSilentlyDiscardNestedForms := super shouldSilentlyDiscardNestedForms.
	shouldRaiseDuplicateCssIdErrors := super shouldRaiseDuplicateCssIdErrors.
</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseDuplicateCssIdErrors: anObject
	shouldRaiseDuplicateCssIdErrors := anObject</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldSilentlyDiscardNestedForms: anObject
	"Set the value of shouldSilentlyDiscardNestedForms"

	shouldSilentlyDiscardNestedForms := anObject</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseDuplicateCssIdErrors
	^shouldRaiseDuplicateCssIdErrors ifNil: [super shouldRaiseDuplicateCssIdErrors]</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldRaiseNestedFormErrors: anObject
	"Set the value of shouldRaiseNestedFormErrors"

	shouldRaiseNestedFormErrors := anObject</body>
</methods>
<methods>
<class-id>Seaside.WAAssistantsRenderer</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">shouldSilentlyDiscardNestedForms
	^shouldSilentlyDiscardNestedForms ifNil: [super shouldSilentlyDiscardNestedForms]
</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">rendererClass
	^ WAAssistantsCanvasRenderer
</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderContentOn: html

	self renderDuplicateIdErrorOptionOn: html.	
	html break; break.
	(html span)
		class: #demo;
		id: 'abcdef';
		with: 'This is a span with id="abcdef"'.
	html break; break.
	(html div)
		class: #demo;
		id: 'abcdef';
		with: 
			[html 
				text: 'This is a div';
				break;
				text: 'with id="abcdef"']
			
</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderDuplicateIdErrorOptionOn: html
	html shouldRaiseDuplicateCssIdErrors: shouldRaiseDuplicateCssIdErrors.
	html shouldRaiseDuplicateCssIdErrors
		ifTrue:
			[html text: 'Duplicate id detection currently enabled :'.
			html space.
			(html anchor)
				callback: [shouldRaiseDuplicateCssIdErrors := false];
				with: 'disable it']
		ifFalse:
			[html text: 'Duplicate id detection currently disabled :'.
			html space.
			(html anchor)
				callback: [shouldRaiseDuplicateCssIdErrors := true];
				with: 'enable it'].
</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">rendererClass
	^WAAssistantsRenderer</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderContentOn: html

	self renderDuplicateIdErrorOptionOn: html.	
	html break; break.
	html cssClass: #demo.
	html spanNamed: 'abcdef' with: 'This is a span with id="abcdef"'.
	html break; break.
	html cssClass: #demo.
	html divNamed: 'abcdef' with: 
			[html 
				text: 'This is a div';
				break;
				text: 'with id="abcdef"']
			
</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderDuplicateIdErrorOptionOn: html
	html shouldRaiseDuplicateCssIdErrors: shouldRaiseDuplicateCssIdErrors.
	html shouldRaiseDuplicateCssIdErrors
		ifTrue:
			[html text: 'Duplicate id detection currently enabled :'.
			html space.
			html anchorWithAction: [shouldRaiseDuplicateCssIdErrors := false] text: 'disable it']
		ifFalse:
			[html text: 'Duplicate id detection currently disabled :'.
			html space.
			html anchorWithAction: [shouldRaiseDuplicateCssIdErrors := true] text: 'enable it'].
</body>
</methods>
<methods>
<class-id>Seaside.WADuplicateIdTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">style
	^'
span.demo {background: blue; color: yellow;}
div.demo {border: 1px red solid; width: 25%; background: lightgreen; color: blue;}
'</body>
</methods>
<methods>
<class-id>Seaside.WAManyClassicTests</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">moreTestsClass
	^ WAMoreClassicTests</body>
</methods>
<methods>
<class-id>Seaside.WAManyClassicTests</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">allTestsClass
	^WAAllTests
</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">initialize
	| moreTests row1Size row1 row2 allComponents evenMoreTests |
	allTests := self allTestsClass new.
	moreTests := self moreTestsClass new.
	evenMoreTests := self moreTestsClass new.
	allComponents := allTests contents components.
	row1Size := (allComponents size / 2) truncated.
	row1 := allComponents copyFrom: 1 to: row1Size.
	row2 := allComponents copyFrom: row1Size + 1 to: allComponents size.
	allTests contents removeAll.
	row1 do:
		[:each |
		allTests contents add: each value label: each key].
	allTests contents add: moreTests label: 'More...'.
	moreTests contents removeAll.
	row2 do:
		[:each |
		moreTests contents add: each value label: each key].
	moreTests contents add: evenMoreTests label: 'Even more...'

</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">children
	^Array with: allTests</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">moreTestsClass
	^WAMoreTests
</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderContentOn: html
	html render: allTests</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">allTestsClass
	^WAAllCanvasTests
</body>
</methods>
<methods>
<class-id>Seaside.WAMoreClassicTests</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">navigation
	 ^WASimpleNavigation new
		add: WANestedTagTest new label: 'Nested forms';
		add: WADuplicateIdTest new label: 'Duplicate id=';
		yourself</body>
</methods>
<methods>
<class-id>Seaside.WAMoreTests</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">navigation
	 ^WASimpleNavigation new
		add: WANestedTagCanvasTest new label: 'Nested forms';
		add: WADuplicateIdCanvasTest new label: 'Duplicate id=';
		yourself</body>
</methods>
<methods>
<class-id>Seaside.WAMoreTests</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">initialize
	self contents: self navigation</body>
</methods>
<methods>
<class-id>Seaside.WAMoreTests</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">rendererClass
	^WARenderCanvas</body>
</methods>
<methods>
<class-id>Seaside.WAMoreTests</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderContentOn: html
	html heading
			level: 2; 
			with: 'He ! Another row of tests !'.
	html render: contents.
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderOuterFormOn: html
	(html form)
		defaultAction: [self inform: 'You do not like to click with a mouse, do you ?'];
		with: 
				[(html div)
					class: #outer;
					with: 
							[html text: 'Enter your name'.
							html space.
							(html textInput)
								value: name;
								callback: [:v | name := v].
							html space.
							(html submitButton)
								callback: [self inform: 'Hello ' , name];
								text: 'Say hello'.
							html break.
							self renderInnerForm: [self renderInnerFormContentOn: html] on: html]]
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderInnerFormContentOn: html 
	html div
		class: #nested if: isNested;
		with:
			[html text: 'Enter your nickname'.
			html space.
			(html textInput) 
				value: nickName; 
				callback: [:v | nickName := v].
			html space.
			(html submitButton)
				callback: [self inform: 'Good bye ' , nickName];
				text: 'Say good bye'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderNestedFormDiscardOptionOn: html
	html shouldSilentlyDiscardNestedForms: shouldSilentlyDiscardNestedForms.
	html shouldSilentlyDiscardNestedForms
		ifTrue:
			[html
				text: 'Silent discard of nested &lt;form&gt; currently enabled :';
				space.
			(html anchor)
				callback: [shouldSilentlyDiscardNestedForms := false];
				with: 'disable it']
		ifFalse:
			[html
				text: 'Silent discard of nested &lt;form&gt; currently disabled :';
				space.
			(html anchor)
				callback: [shouldSilentlyDiscardNestedForms := true];
				with: 'enable it'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderInnerForm: aBlock on: html
	isNested 
		ifTrue: [html form with: aBlock]
		ifFalse: aBlock.
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderNestingStatusOn: html 
	isNested 
		ifTrue: 
			[(html anchor)
				callback: [isNested := false];
				with: 'Suppress &lt;form&gt; nesting'.
			html
				space;
				space;
				strong: 'Note:';
				space;
				text: 'by default, nested &lt;form&gt; are silently discarded'.
			(html div)
				class: #withMargins;
				with:
					[self renderNestedFormErrorOptionOn: html.	
					html break.
					self renderNestedFormDiscardOptionOn: html]]
		ifFalse: 
			[(html anchor)
				callback: [isNested := true];
				with: 'Add &lt;form&gt; nesting'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderNestedFormErrorOptionOn: html
	html shouldRaiseNestedFormErrors: shouldRaiseNestedFormErrors.
	html shouldRaiseNestedFormErrors
		ifTrue:
			[html
				text: 'Nested &lt;form&gt; detection currently enabled :';
				space.
			(html anchor)
				callback: [shouldRaiseNestedFormErrors := false];
				with: 'disable it']
		ifFalse:
			[html
				text: 'Nested &lt;form&gt; detection currently disabled :';
				space.
			(html anchor)
				callback: [shouldRaiseNestedFormErrors := true];
				with: 'enable it'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagCanvasTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">rendererClass
	^ WAAssistantsCanvasRenderer
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderOuterFormOn: html
	html form: 
		[html cssClass: #outer.
		html div: 
			[html
				text: 'Enter your name';
				space;
				textInputWithValue: name 
					callback: [:v | name := v];
				space;
				submitButtonWithAction: [self inform: 'Hello ' , name]
					text: 'Say hello';
				break.
			self
				renderInnerForm: [self renderInnerFormContentOn: html]
				on: html]]</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">initialize
	isNested := false.
	nickName := String new.
	name := String new.
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">rendererClass
	^WAAssistantsRenderer</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderInnerForm: aBlock on: html
	isNested 
		ifTrue: [html form: aBlock]
		ifFalse: aBlock.
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderNestedFormErrorOptionOn: html
	html shouldRaiseNestedFormErrors: shouldRaiseNestedFormErrors.
	html shouldRaiseNestedFormErrors
		ifTrue:
			[html
				text: 'Nested &lt;form&gt; detection currently enabled :';
				space;
				anchorWithAction: [shouldRaiseNestedFormErrors := false]
					text: 'disable it']
		ifFalse:
			[html
				text: 'Nested &lt;form&gt; detection currently disabled :';
				space;
				anchorWithAction: [shouldRaiseNestedFormErrors := true]
					text: 'enable it'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderNestingStatusOn: html
	isNested 
		ifTrue: 
			[html
				anchorWithAction: [isNested := false] text: 'Suppress &lt;form&gt; nesting';
				space;
				space;
				bold: 'Note:';
				space;
				text: 'By default, nested &lt;form&gt; are silently discarded';
				break;
				cssClass: #withMargins;
				div:
					[self renderNestedFormErrorOptionOn: html.	
					html break.
					self renderNestedFormDiscardOptionOn: html]]
		ifFalse: 
			[html
				anchorWithAction: [isNested := true]
					text: 'Add &lt;form&gt; nesting'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderInnerFormContentOn: html 
	isNested 
		ifTrue: [html cssClass: #nested].
	html div: 
			[html
				text: 'Enter your nickname';
				space;
				textInputWithValue: nickName
					callback: [:v | nickName := v];
				space;
				submitButtonWithAction: [self inform: 'Good bye ' , nickName]
					text: 'Say good bye']</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">style
	^'
div.nested {border: red solid 1px; width: 90%; margin: 10px; padding: 5px; background: lightblue;}
div.outer{border: green solid 1px; width: 50%; padding: 5px; background: lightyellow;}
div.withMargins{margin: 1em 0 0 5em;}
'
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderNestedFormDiscardOptionOn: html
	html shouldSilentlyDiscardNestedForms: shouldSilentlyDiscardNestedForms.
	html shouldSilentlyDiscardNestedForms
		ifTrue:
			[html
				text: 'Silent discard of nested &lt;form&gt; currently enabled :';
				space;
				anchorWithAction: [shouldSilentlyDiscardNestedForms := false]
					text: 'disable it']
		ifFalse:
			[html
				text: 'Silent discard of nested &lt;form&gt; currently disabled :';
				space;
				anchorWithAction: [shouldSilentlyDiscardNestedForms := true]
					text: 'enable it'].
</body>
</methods>
<methods>
<class-id>Seaside.WANestedTagTest</class-id>
<category>rendering</category>
<body package="SeasideAssistants-Tests">renderContentOn: html
	self renderNestingStatusOn: html.
	html break; break.
	self renderOuterFormOn: html</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Core">initialize
	self clearTagStack.	
	</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">initializeWithRoot: aRoot
	document initializeWithRoot: aRoot.
	self clearTagStack.</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">closeTag: aString
	document closeTag: aString.
	self popTag	</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">initializeWithRenderer: aRenderer
	document initializeWithRenderer: aRenderer.
	self clearTagStack.</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>duplicate css id</category>
<body package="SeasideAssistants-Core">checkCssIds: attributes renderer: aRenderer
	| id |
	attributes isNil ifTrue: [^self].
	id := (attributes at: 'id' ifAbsent: [^self]) value asSymbol.
	cssIds isNil ifTrue: [cssIds := Set new].
	
	((cssIds includes: id) 
		and: [aRenderer shouldRaiseDuplicateCssIdErrors])
			ifTrue:
				[self error: 'Duplicate id in HTML document']
			ifFalse:
				[cssIds add: id].
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">root
	^document root
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">openTag: aString attributes: anAttributes renderer: aRenderer
	self checkCssIds: anAttributes renderer: aRenderer. "May raise an error"
	document openTag: aString attributes: anAttributes.
	self pushTag: aString.
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">text: aString
	document text: aString
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>nested forms</category>
<body package="SeasideAssistants-Core">popTag
	^ tagStack removeLast
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">javascriptCharacterData: aString
	^document javascriptCharacterData: aString</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">forHtml
	^document forHtml</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>nested forms</category>
<body package="SeasideAssistants-Core">clearTagStack
	tagStack := OrderedCollection new.</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>nested forms</category>
<body package="SeasideAssistants-Core">isWithinTag: aString
	^ tagStack includes: aString</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>private - accessing</category>
<body package="SeasideAssistants-Core">document: aDocument
	document := aDocument</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>nested forms</category>
<body package="SeasideAssistants-Core">pushTag: aString
	tagStack add: aString
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">stream: aStream
	document stream: aStream
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">shouldPrintCloseTagFor: aString
	^document shouldPrintCloseTagFor: aString
</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">close
	document close</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument</class-id>
<category>delegating</category>
<body package="SeasideAssistants-Core">openTag: aString attributes: anAttributes
	self openTag: aString attributes: anAttributes renderer: nil</body>
</methods>
<methods>
<class-id>Seaside.WAManyClassicTests class</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">description
	^'Classic rendering tests (deprecated) with detection of nested forms and duplicate ids'</body>
</methods>
<methods>
<class-id>Seaside.WAManyClassicTests class</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">initialize
	self registerAsApplication: 'tests/alltests'.</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests class</class-id>
<category>accessing</category>
<body package="SeasideAssistants-Tests">description
	^'Canvas rendering tests with detection of nested forms and duplicate ids'</body>
</methods>
<methods>
<class-id>Seaside.WAManyTests class</class-id>
<category>initialization</category>
<body package="SeasideAssistants-Tests">initialize
	self registerAsApplication: 'tests/allcanvastests'.</body>
</methods>
<methods>
<class-id>Seaside.WASmartHtmlDocument class</class-id>
<category>instance creation</category>
<body package="SeasideAssistants-Core">on: aDocument
	^self new document: aDocument</body>
</methods>
<initialize>
<class-id>Seaside.WAManyClassicTests</class-id>
</initialize>
<initialize>
<class-id>Seaside.WAManyTests</class-id>
</initialize>
</st-source>
