Hi, I'm a newbie so apologies if I'm doing something dumb.
I'm working with Seaside in Pharo using the standard Seaside environment. In my application, call: seems to work intermittently. For example, I have this method in one component:
addProduct | editor | editor := ProductEditorComponent new. (self call: editor)
ifTrue: [ Dao new addProduct: product ] When I run my app, the method gets invoked (a halt statement is hit when I add it to the method), but the ProductEditorComponent never renders and no exception is raised. I see this elsewhere in my app as well. On my login form I have a link to a "forgot password" component that worked for a while then stopped, also without raising an exception.
I'm assuming that what I'm doing wrong would be obvious to an experienced Seasider since it seems to be easy to get into this state. What causes a component to fail to render when called without raising an error?
Thanks much for any assistance. Larry _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
your #addProduct code looks good. The issue must be somewhere else o/ On Sep 10, 2011, at 10:27 AM, Larry White wrote: Hi, I'm a newbie so apologies if I'm doing something dumb. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by larrry
be sure you are sending #addProduct from a callback action like: html anchor callback:[self addProduct] with: 'Add this to cart'. On Sep 10, 2011, at 10:27 AM, Larry White wrote: Hi, I'm a newbie so apologies if I'm doing something dumb. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sebastian, Thanks.
I am sending from within a callback. I got this case to work by eliminating a component that acted like a container between the root component and the component where the non-working render methods were implemented. Now I just have to understand -why- that would work and the other way not.
On Sat, Sep 10, 2011 at 10:45 AM, Sebastian Sastre <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Could you provide the code? It sounds like something other than Seaside is at fault. You should always be able to #call: and #answer regardless of state.
RS Date: Sat, 10 Sep 2011 15:27:36 -0400 Subject: Re: [Seaside] call: works intermittently on Pharo From: [hidden email] To: [hidden email] Sebastian, Thanks. I am sending from within a callback. I got this case to work by eliminating a component that acted like a container between the root component and the component where the non-working render methods were implemented. Now I just have to understand -why- that would work and the other way not.
On Sat, Sep 10, 2011 at 10:45 AM, Sebastian Sastre <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I don't think I can; it's gone.
I realized that my problem with the login form was a logic error. I was doing something like this. in my rootUI rendering code: loggedIn? ifTrue: [do something useful] ifFalse: [ render login ]. then in login, I had an anchor that tried to render ForgotPasswordComponent, but the render loop looked at the above conditional and re-rendered the login form. sigh.
For the other situation. I literally fixed it by removing the intermediate component and copying the actions and rendering code from that component back to the root component. No idea why that fixed it. If I run into the problem again, I'll post with more info.
On Sat, Sep 10, 2011 at 4:18 PM, Robert Sirois <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sounds good. Unless you deleted the method in Pharo, you should be able to look at versions.
RS Date: Sat, 10 Sep 2011 16:32:14 -0400 Subject: Re: [Seaside] call: works intermittently on Pharo From: [hidden email] To: [hidden email] I don't think I can; it's gone. I realized that my problem with the login form was a logic error. I was doing something like this. in my rootUI rendering code: loggedIn? ifTrue: [do something useful] ifFalse: [ render login ]. then in login, I had an anchor that tried to render ForgotPasswordComponent, but the render loop looked at the above conditional and re-rendered the login form. sigh.
For the other situation. I literally fixed it by removing the intermediate component and copying the actions and rendering code from that component back to the root component. No idea why that fixed it. If I run into the problem again, I'll post with more info.
On Sat, Sep 10, 2011 at 4:18 PM, Robert Sirois <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |