Changes for page Development-Stateless Components
Last modified by Pascal Robert on 2010/09/19 10:26
From version 3.1
edited by Quinton Dolan
on 2007/07/12 20:34
on 2007/07/12 20:34
Change comment:
There is no comment for this version
To version 5.1
edited by Pascal Robert
on 2010/09/19 10:26
on 2010/09/19 10:26
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Programming__WebObjects-Web Applications-Development-Stateless Components1 +Development-Stateless Components - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. qdolan1 +XWiki.probert - Content
-
... ... @@ -8,12 +8,10 @@ 8 8 9 9 {{/code}} 10 10 11 -=== Chuck Hill 11 +=== Chuck Hill === 12 12 13 13 There is some fairly OK information on stateless and nonsynchronizing components in Practical WebObjects. In a nutshell you need to use valueForBinding/setValueForBinding to access bound values and implement a public void reset() method that nulls all instance variables. This often requires design changes to your component. 14 14 15 -=== Jean-François Veillette 15 +=== Jean-François Veillette === 16 16 17 17 Sometimes for stateless component, you need to keep variables values between the 3 phases, from takeValueFromRequest all the way to appendToResponse. Since ivars in a stateless component can't handle this case (reset() will be called after each phase), you have to store the information somewhere. Just use context.userInfo dictionary, and put whatever value in there. As the name imply, the value will only be good for this request only. 18 - 19 -Category:WebObjects