Re: Stale session
Christian Sell <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.devel |
|---|---|
| Message-ID | <[email protected]> |
Dirk, Dave, and all, I arrived there yesterday myself by scanning the docs for the term "session". I was rather amazed that the link imposed the "stateful" default - in my case that just dont make sense. Now I am using <field-binding name="stateful" field-name="Boolean.FALSE/> and all is well. BTW, Dave, I am using Spindle, but still prefer editing the XML files directly. So I cant blame Spindle. Heres my take on the different types of bindings: - "binding" could also be called expression-binding. It gets the value by dynamically evaluating an OGNL expression at runtime. - "static-binding" gets the value from the body of the element (and not from a value attribute - why, I dont know). The value is taken as a String. -"field-binding" gets the value by accessing some static (heres where the confusion comes in) field. Why this is not the same as an expression binding is beyond me. Does the expression syntax not allow accessing static fields?? So, if you used <static-binding/>, the "false" you supplied was taken as the String "false". I think, the names are quite confusing. Suggestions: - drop field-binding and extend expression syntax to allow accessing static fields. - rename static-binding to value-binding Christian Dave Roberts wrote: > Dirk, thanks! This finally helped. I had been trying to set the stateful > parameter, but I finally figured out I was using a static-binding rather > than a dynamic binding. I figured since "false" was a constant, I should > use a static binding in that case, but I guess not. The posting you > directed me to caused me to look at the direct XML that Spindle produces > and I noticed the difference. As soon as I set things correctly, things > worked fine. Doh! > > So this then raises another question: What are the differences between > all the various binding types that Tapestry/Spindle supports? Should I > just be using dynamic bindings everywhere? I think I got throw off by > Spindle's choices and my equating constants to "static." Had I been > editing the XML directly, I probably would have just used "binding" and > it would have worked fine. Spindle presented me with a bunch of choices > and so I picked the one that seemed the most obvious. Should I just be > using dynamic bindings every time? If not, why, when, and where would I > use the other types? Previously, I had thought that "dynamic" was just > used for OGNL expressions accessing beans. Should it be used for > anything Java-like (I mean, OGNL != Java, so I didn't expect that > "false" would be valid syntax for that). > > In any case, I read on the Wiki that somebody is rewriting the tutorial. > Some treatment of this issue would probably make sense, particularly for > people using Spindle rather than editing the XML raw. (BTW, this is not > a slam on Spindle; it's a fine tool that really helps out.) > > -- Dave > > ----- Original Message ----- > *From:* Dirk Olmes <mailto:[email protected]> > *To:* Dave Roberts <mailto:[email protected]> > *Cc:* [email protected] > <mailto:[email protected]> > *Sent:* Saturday, December 14, 2002 6:45 PM > *Subject:* Re: [Tapestry-developer] Stale session > > I'm using Tapestry 2.2 with Eclipse, Spindle 1.1.3, the Jetty > version packaged with Tapestry 2.2. I have written a quick > little Main class that sets up Jetty and gets things going. I > have Tapestry working enough to create a few pages, use > PageLinks, a Form, etc. It's just DirectLink that I have > problems with right now. > > Can somebody explain how, exactly, Tapestry as a framework > decides the session is stale? I even looked at the source in the > DirectService class and didn't see anything there that looked > like it even checked or threw an exception related to a stale > session. > > > Hmm, did you try to make the link not stateful? See > http://sourceforge.net/mailarchive/message.php?msg_id=2214563 > > HTH, > > -dirk > ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/