<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:st1 = "urn:schemas-microsoft-com:office:smarttags" xmlns:o = 
"urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=484485722-30032008><FONT face="Trebuchet MS" 
color=#0000ff size=2>Is not a secret Rob. I have at hand&nbsp;this login 
component I've made. I'll comment on the code the most important 
methods:</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>Login&gt;&gt;createComponents</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008>&nbsp;&nbsp;&nbsp; "Creates the subcomponents of the 
receiver."</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;super createComponents.<BR>&nbsp;<BR>&nbsp;self <BR>&nbsp;&nbsp;at: 
#username put: (MVPLabeledPresenter 
new<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label: 
'Username';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: #presenter put: 
(MVPTextInputPresenter 
new<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;submitOnEnter: 
true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;at: 
#password put: (MVPToolbar new&nbsp; "I use a toobar here just as a layout 
convenience"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: 
#input<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;putTool: 
(MVPLabeledPresenter 
new<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label: 
'Password';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: 
#presenter put: (MVPPasswordInputPresenter 
new<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;submitOnEnter: 
true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: 
#memory<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;putTool: 
(MVPAnchorButton 
new<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;model: 
'I forgot my 
password/username';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;at: 
#signIn put: (MVPSubmitButton new<BR></FONT></SPAN><SPAN 
class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;model: 'Sign 
in';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;voidCallback; "so it wont 
submit"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself);<BR>&nbsp;&nbsp;yourself</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008></SPAN><SPAN class=484485722-30032008><FONT 
face="Trebuchet MS" color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>Login&gt;&gt;model: aModel</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Sets the model of 
the receiver."</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;super model: aModel.</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>"Aspect values are cool because they transparently will get the fresh 
value with each render</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>or set it&nbsp;if they are submitted."&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;self username model: (aModel aspectValue: 
#username).<BR>&nbsp;(self password at: #input) model: (aModel aspectValue: 
#password).</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>Login&gt;&gt;makeLayout</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;| keys |</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;keys := 
#(<BR>&nbsp;&nbsp;&nbsp;username<BR>&nbsp;&nbsp;&nbsp;password<BR>&nbsp;&nbsp;&nbsp;signIn<BR>&nbsp;&nbsp;&nbsp;) 
asOrderedCollection.</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>"This creature cames from a kind family of layout 
policies</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>and they know how to deal with tables so we can't forget about 
them"</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008></SPAN><SPAN class=484485722-30032008><FONT 
face="Trebuchet MS" color=#0000ff size=2>&nbsp;^(MVPVerticalFlowLayout 
createFor: self)<BR>&nbsp;&nbsp;order: 
keys;<BR>&nbsp;&nbsp;yourself</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>Login&gt;&gt;wireEvents</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; "Makes the wiring of events for the 
receiver.</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; This events are in fact announcements in the server 
(not the ones at DOM).</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; This wiring is meant to establish loose coupling 
between children and parent presenters"</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;super wireEvents.<BR>&nbsp;<BR>&nbsp;self signIn 
<BR>&nbsp;&nbsp;subscribe: MVPSubmitButtonPressed send: #onSignInPressed: to: 
self;<BR>&nbsp;&nbsp;yourself.<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>Login&gt;&gt;onSignInPressed: anAnnouncement</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;self answer: (self session userOrNilFor: self 
model)</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>"Here are a couple of methods related to the DOM part of the 
login"</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;Login&gt;&gt;</FONT></SPAN><SPAN class=484485722-30032008><FONT 
face="Trebuchet MS" color=#0000ff size=2>installDOMElementBehaviorOn: html 
<BR>&nbsp;"Returns the script that installs the methods in the <BR>&nbsp;DOM 
Element which is an homologue of the receiver."</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;^(super installDOMElementBehaviorOn: html)<BR>&nbsp;&nbsp;add: 
(self elementOn: html) asJQElement curvyCorner;<BR>&nbsp;&nbsp;add: ((self 
username presenter focusOn: html) timeout: 100);<BR>&nbsp;&nbsp;add: (self 
assign: (self onSignInClickedFunctionOn: html) as: 'onSignInClicked' on: 
html);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>"Here I hook a DOM event for the homologue of the receiver and wire it 
<FONT face="Trebuchet MS" color=#0000ff size=2><SPAN class=484485722-30032008>to 
a custom reaction.</SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008>This can be done also with custom events (thanks to 
fire introduced in Prototype 1.6.0)"</SPAN></FONT></DIV>
<DIV>&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;add: (self signIn<BR>&nbsp;&nbsp;&nbsp;&nbsp;elementOn: 
#click<BR>&nbsp;&nbsp;&nbsp;&nbsp;call: 
'onSignInClicked'<BR>&nbsp;&nbsp;&nbsp;&nbsp;with:'anEvent' 
asSUObject<BR>&nbsp;&nbsp;&nbsp;&nbsp;in: (self elementOn: 
html)<BR>&nbsp;&nbsp;&nbsp;&nbsp;on: 
html);<BR>&nbsp;&nbsp;yourself</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>Login&gt;&gt;onSignInClickedFunctionOn: html</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008>&nbsp;&nbsp;&nbsp; <FONT face="Trebuchet MS" 
color=#0000ff size=2>"Returns the function which will render as javascript at 
DOM.</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; Filters submits with no username so server is not 
bothered</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; with this kind of spureous 
requests."</FONT></SPAN></DIV>
<DIV><SPAN class=484485722-30032008><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484485722-30032008></SPAN><SPAN class=484485722-30032008><FONT 
face="Trebuchet MS" color=#0000ff size=2>&nbsp;^ SUFunction new argument: 
'anEvent';<BR>&nbsp;&nbsp;add: ((((self username presenter formElementOn: html) 
value <BR>&nbsp;&nbsp;&nbsp;&nbsp;access: 'length')&nbsp; &gt; 
1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then: (SUForm new id: 'systemForm') 
submit<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else: (SUScript 
new<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add: 'anEvent' asSUEvent 
stop;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add: (html effect highlight 
id: (self username elementOn: 
html));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add: (self username 
presenter formElementOn: html) 
focus;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yourself));<BR>&nbsp;&nbsp;yourself</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008>I hope you get the idea,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008>&nbsp;&nbsp;&nbsp; cheers,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=484485722-30032008>Sebastian</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><BR></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=es dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>De:</B> seaside-bounces@lists.squeakfoundation.org 
  [mailto:seaside-bounces@lists.squeakfoundation.org] <B>En nombre de </B>Rob 
  Rothwell<BR><B>Enviado el:</B> Domingo, 30 de Marzo de 2008 
  17:05<BR><B>Para:</B> Seaside - general discussion<BR><B>Asunto:</B> Re: 
  [Seaside] Seaside vs. Aida<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=gmail_quote>On Sun, Mar 30, 2008 at 3:52 PM, Sebastian Sastre 
  &lt;<A href="mailto:ssastre@seaswork.com">ssastre@seaswork.com</A>&gt; 
  wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">&nbsp;&nbsp; 
    &nbsp; &nbsp; nice clarification. I think I discovered my framework uses 
    Seaside as platform to be able to make something conceptually very similar 
    to what you described. Anyway my code would look more similar to a esktop 
    development.</BLOCKQUOTE>
  <DIV><BR class=webkit-block-placeholder></DIV>
  <DIV>Can you give me an example of your code (kind of like Janko just did)? 
  &nbsp;What are you developing (unless it's a secret!)? &nbsp;Have you built an 
  additional layer on top of Seaside?</DIV>
  <DIV><BR class=webkit-block-placeholder></DIV>
  <DIV>Rob&nbsp;</DIV></DIV></BLOCKQUOTE></BODY></HTML>