<html><head></head><body><div class="ydp8794565eyahoo-style-wrap" style="font-family:lucida console, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">On the point...<div><div><br></div><div>    These days it is very common that you can open a link in a new tab to</div><div>    view something, then close it, duplicate it or even the browser might</div><div>    restart on that page.</div></div></div><div><br></div><div dir="ltr" data-setdir="false">...we have that issue with our in-house ERP system (about 650 users). </div><div dir="ltr" data-setdir="false">Having users open an internal application link in a new tab is just wrong in Seaside.</div><div dir="ltr" data-setdir="false">To prevent that we check the history.length on the render for logged-in sessions.</div><div dir="ltr" data-setdir="false">We also have options to open the application for saved links that open a domain object.</div><div dir="ltr" data-setdir="false">That also had to to be checked for. To distinguish between browser tabs I use sessionStorage.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div><div dir="ltr" data-setdir="false">aSession validNewSession ifTrue: [</div><div dir="ltr" data-setdir="false">    html script: 'sessionStorage.setItem("validSession",1)'<br></div></div>    ...]<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">...if the session is not a special case, and for the next render, I use...</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div><div>html script: ((JSStream on: '(history.length > 1) || (sessionStorage.getItem("validSession") == 1) ') </div><div><span style="white-space: pre-wrap;">                             </span>then: (html jQuery ajax script: [:script | </div><div dir="ltr" data-setdir="false"><span style="white-space: pre-wrap;">                                     </span>script << (html jQuery id: 'user application div') show;</div><div><span style="white-space: pre-wrap;">                                         </span><< (html jQuery id: 'invalid session message div') hide] )</div><div><span style="white-space: pre-wrap;">                               </span>else: (html jQuery ajax script: [:script | </div><div dir="ltr" data-setdir="false"><span style="white-space: pre-wrap;">                                     </span>script << (html jQuery id: '<span><span style="color: rgb(0, 0, 0); font-family: lucida console, sans-serif;">user application div</span></span>') hide;</div><div dir="ltr" data-setdir="false"><span style="white-space: pre-wrap;">                                             </span><< (html jQuery id: '<span><span style="color: rgb(0, 0, 0); font-family: lucida console, sans-serif;">invalid session message div</span></span>') show]))].</div></div><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Users are able to open new tabs with logged in sessions. </div><div dir="ltr" data-setdir="false">We provide that with a 'new session' anchor...</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div><div>html popupAnchor</div><div><span style="white-space: pre-wrap;">      </span>url: (self session requestContext request url printString, '&newSession');</div><div><span style="white-space: pre-wrap;"> </span>with: [...]</div></div><br></div><div dir="ltr" data-setdir="false">...our WAApplication subclass <span>handleFiltered: checks for newSession and sets up a new logged in session. </span></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"><div>handleNewSession: aRequestContext</div><div><br></div><div><span style="white-space: pre-wrap;">   </span>| newSession oldSession companyOop | </div><div><br></div><div><span style="white-space: pre-wrap;">    </span>oldSession := self sessionForRequest: aRequestContext.</div><div><span style="white-space: pre-wrap;"> </span>oldSession isNil ifTrue: [</div><div><span style="white-space: pre-wrap;">             </span>^super handleFiltered: aRequestContext].</div><div dir="ltr" data-setdir="false">        ...copy stuff from old session to new session...<br></div><div>        ^self handle: aRequestContext registering: newSession.<br></div></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I'm sure there are cleaner ways to do this (I'd like to see other techniques), but this works for us.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Running Seaside 3.2 on GemStone 3.4.3 </div><div dir="ltr" data-setdir="false"><span>Bob Nemec</span></div><div dir="ltr" data-setdir="false"><span><br></span></div>
        
        </div><div id="yahoo_quoted_7234641610" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Monday, August 10, 2020, 10:38:18 p.m. EDT, Esteban Maringolo <emaringolo@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">Hi all,<br></div><div dir="ltr"><br></div><div dir="ltr">I have a question that I cannot answer myself even though I have built<br></div><div dir="ltr">a handful of medium sized applications with Seaside. To some degree it<br></div><div dir="ltr">is embarrassing, but I need to ask just in case I've been missing<br></div><div dir="ltr">something trivial all these years.<br></div><div dir="ltr"><br></div><div dir="ltr">I'm building a "public" web app, and I have some newer concerns I<br></div><div dir="ltr">didn't have before because most apps ran in private environments or<br></div><div dir="ltr">behind logins and were mostly complex UI or flows where Seaside shines<br></div><div dir="ltr">and no one cares (mostly) about URLs.<br></div><div dir="ltr"><br></div><div dir="ltr">These days it is very common that you can open a link in a new tab to<br></div><div dir="ltr">view something, then close it, duplicate it or even the browser might<br></div><div dir="ltr">restart on that page. The problem is that with Seaside, as long as one<br></div><div dir="ltr">action continuation is triggered then as soon as you reload one of<br></div><div dir="ltr">these tabs it shows content from the last tab that had some<br></div><div dir="ltr">continuation activated.<br></div><div dir="ltr"><br></div><div dir="ltr">My solution was to change all callbacks that do simple #show: actions<br></div><div dir="ltr">with the canonical url of the called page, to implement<br></div><div dir="ltr">#initialRequest: to handle the few cases where I need to provide a<br></div><div dir="ltr">stable url (for sharing and for Open Graph and friends) and to use<br></div><div dir="ltr">Cookie based session tracking.<br></div><div dir="ltr"><br></div><div dir="ltr">This is similar to the method proposed years ago by Ramon on his blog<br></div><div dir="ltr">[1], but without meddling with the Render Loop. I guess that the<br></div><div dir="ltr">Seaside book website does something similar.<br></div><div dir="ltr"><br></div><div dir="ltr">Is there any other way of achieving independent flow in each tab, each<br></div><div dir="ltr">with its own renderloop with a different root component? So basically<br></div><div dir="ltr">I can have different branches of "_k" when needed.<br></div><div dir="ltr"><br></div><div dir="ltr">Maybe a Stateful framework such as Seaside is overkill for these<br></div><div dir="ltr">cases, in particular because it's heretical in many aspects, but I'm<br></div><div dir="ltr">still very productive with its component based development and it's<br></div><div dir="ltr">canvas way of building them.<br></div><div dir="ltr"><br></div><div dir="ltr">Shall we start thinking what we need and want for Seaside 4.0? :-)<br></div><div dir="ltr"><br></div><div dir="ltr">Regards,<br></div><div dir="ltr"><br></div><div dir="ltr">[1] <a href="http://onsmalltalk.com/clean-urls-in-seaside" target="_blank">http://onsmalltalk.com/clean-urls-in-seaside</a><br></div><div dir="ltr"><br></div><div dir="ltr">Esteban A. Maringolo<br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr">seaside mailing list<br></div><div dir="ltr"><a ymailto="mailto:seaside@lists.squeakfoundation.org" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br></div><div dir="ltr"><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></div></div>
            </div>
        </div></body></html>