I posted this question back in june, but did not get an answer. Somehow
I then forgot about it, until it came up again today. Anyone know anything about this??? Using VW 7.3.1 -- I see the following problem sometimes ... A tag of the form <cg:form name="abc" > is looked up in the taglib, and found because another session had created it. So it just does a "copy" of that tag instance. However, my "setName: ..." method had in fact done things, specifically added the name "abc" to the session dictionary. Since the setName: is in fact not invoked, the value does not get set into the session dictionary and subsequent tags blow up. Questions 1. is this expected behavior? I am using tiny-http at the moment, with two invocations from the same machine, one IE and one Firefox. 2. is my doing things in a setXxx: just "wrong"? 3. am I missing something totally? -- Dennis Smith [hidden email] Cherniak Software Development Corporation +1 905.771.7011 400-10 Commerce Valley Dr E Fax: +1 905.771.6288 Thornhill, ON Canada L3T 7N7 http://www.CherniakSoftware.com |
I had answered it at the time, as follows.
----------------- I'm thoroughly jet-lagged at the moment, however my first guess would be that this is related to you using "name" as an attribute name, and that this doesn't agree with the way the objects involved in tag processing think of name. I know that <cg:form name="abc" > will create a tag occurrence object which has a name that is "form". Their internal idea of a name ought not conflict with an attribute, but I can imagine that it might. If using a different attribute name than "name" helps, that would support my theory. I also suspect that doing things in a setXYZ method might not be optimal. Why not just do it at the beginning of the doStart method, or somewhere similar. But that might also just mask other symptoms of the same problem. I've created AR 50948 for this. At 12:31 PM 11/1/2006, Dennis Smith wrote: I posted this question back in june, but did not get an answer. Somehow I then --
Alan Knight [|], Cincom Smalltalk Development
"The Static Typing Philosophy: Make it fast. Make it right.
Make it run." - Niall Ross
|
I suspect your being jet-lagged at the time caused me to miss it :)
(sorry). OK -- I will look a bit more see what I can find re my specific example. Thanks for the re-reply :) Alan Knight wrote: I had answered it at the time, as follows. -- Dennis Smith [hidden email] Cherniak Software Development Corporation +1 905.771.7011 400-10 Commerce Valley Dr E Fax: +1 905.771.6288 Thornhill, ON Canada L3T 7N7 http://www.CherniakSoftware.com |
In reply to this post by Alan Knight-2
OK -- I figured out the problem -- its complex and I guess its mine. I
will outline here in case
others are interested. My web stuff is connected to some manager objects, each of which manages a business collection and object (e.g. a customer, an order, a person, ...). Each is named within a tag -- such as <cg:field name="customer.name" ... /> which says get attribute "name" from the object held by the manager named "customer". Everyone got tired of typing "customer.", so I said -- if you name your form that will be the default name: <cg:form name="customer" ...> ... <cg:field name="name" ... /> would pick up "customer.name". The problem was, where and when to store the name= from the cg:form tag. I stored it from the #doStartTag method. But -- and this is the problem, some of my "setXxx:" methods asked for the name= from the form and of course it had not been stored. NOT STORED was ok, but if it WAS stored (in a globally named value in the session, it might be from some previous page -- yuk. Its a chicken and egg issue -- I need to not do all that compuation in the setXxx: methods -- just FYI. Alan Knight wrote: I had answered it at the time, as follows. -- Dennis Smith [hidden email] Cherniak Software Development Corporation +1 905.771.7011 400-10 Commerce Valley Dr E Fax: +1 905.771.6288 Thornhill, ON Canada L3T 7N7 http://www.CherniakSoftware.com |
Free forum by Nabble | Edit this page |