On 11/20/11 13:11 PM, "Max Leske" <maxleske@gmail.com> wrote:
What does your render code look like? Do you use a form to submit the data? Or JavaScript?
Max
On 20.11.2011, at 14:52, Edgar J. De Cleene wrote:
[Q] help with requesting a html page Friends:
I have this code
login | fields aPassword userName logged | fields := self request propertyAt: #postFields ifAbsent: []. fields ifNotNil:[ userName := (fields at: 'username'). aPassword := (fields at: 'password'). logged := HVNaughtieUsers new verifyPassword: aPassword forUser: userName ]. self halt.
When I hit in the web browser , fields become nil. But if into Squeak I restart the method and do step by step, fields become populated with the right values.
How I should do for the right values and avoid nil ?
Thanks in advance
Edgar
I use HV2 so could mix html forms and external/internal JavaScript. Very thanks for your attention
Found the answer to my own question and is:
login | fields aPassword userName logged |
fields := self request fields. fields ifNotNil:[ userName := (fields at: 'username') first. aPassword := (fields at: 'password') first. logged := HVNaughtieUsers new verifyPassword: aPassword forUser: userName ]. self halt.
Edgar
PS- My goal is reverse engineering Mantis for a Squeak + Kom + HV2 + external Javascript. I called Sapis, see atached