[Seaside-dev] WAFormTag exception

Gerhard Obermann obi068 at gmail.com
Thu Feb 28 08:43:54 UTC 2008


Hi!

I would suggest to change the method "before" in WAFormTag (see below).
With this change testing of rendering methods doesn't produce an exception!


before
 "Define the default action form buttons. Some implementation notes on this
feature: (1) a tab-index of -1 is not valid XHTML, but most todays browser
accept it and ignore the element in the tab-order. (2) Internet Explorer
requires an additional text field (without other functionality) to make the
default action work. Other browser should not include this text-field, as it
prevents remembering form input."

 | userAgent aRequest |
 defaultAction ifNil: [ ^ nil ].
 canvas div: [
  canvas submitButton
   tabIndex: -1;
   value: 'Default';
   callback: defaultAction;
   style: 'position: absolute; top: -100em'.
  aRequest := self session currentRequest.
  aRequest ifNotNil: [
   userAgent := aRequest userAgent.
   (userAgent notNil and: [ userAgent includesSubString: 'MSIE' ]) ifTrue: [
    canvas textInput
     tabIndex: -1;
     callback: [ :v | ];
     style: 'position: absolute; top: -100em' ] ] ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20080228/485df8c2/attachment-0001.htm


More information about the seaside-dev mailing list