• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: URGENT : Sessions and Forms
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URGENT : Sessions and Forms


  • Subject: Re: URGENT : Sessions and Forms
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Mon, 22 Dec 2003 05:57:45 +0000

From: Owen McKerrow <email@hidden>
To: "Jonathan Fleming" <email@hidden>
Subject: Re: URGENT : Sessions and Forms
Date: Mon, 22 Dec 2003 15:49:04 +1100

Quick description ...

3 tabs. Each tab showing different questiosn to answer.

firstly, your not using WOTabPanel are you? cause this WILL create a session for you.


Using conditionals to hide and show the areas under each tab.

No problems should be found here

Switching between them I need to save/keep the data already entered even if the user hasn't explicity hit the save button.

What are you using to switch between them? If it's WOSwitchComponent, this could be a factor though i don't actually know if this element does create a session.


Owen, another thing you can do though it may be long winded is:
first make a copy of your class/java file and the .wo component and then delete everything on the .wo component, then clean, then build & run yourApp. At the point where you must link to your sessionless environment (whether it's through a button, hyperlink or whatever), your RequestHandler should be 'wa' as opposed to 'wo' in the url, if it's wa you'll know it's an element in the .wo component. You can then add them back in one by one starting with the templates if you use them. You'll need to go back to the browser each time to see if the RequestHandler in the url has changed after you have pressed the refresh button on the browser. You won't need to rebuild yourApp since nothing has changed in the java file.
If the RequestHandler is still 'wo' after you have deleted all elements you'll know your problem is further down the line and probably in your code, if so your'll need to look at the action method that's calling the offending page / component.


For now that's the best I can do, let me know how you fair, we'll tackle the code bit later if necessary.

Jonathan :^)

Owen

On Wednesday, December 17, 2003, at 11:15 PM, Jonathan Fleming wrote:

What exactly are you trying to do?
Jonathan :^)


From: Owen McKerrow <email@hidden>
To: "Jonathan Fleming" <email@hidden>
Subject: Re: URGENT : Sessions and Forms
Date: Wed, 17 Dec 2003 09:44:00 +1100

Hi John,

Found what it was but nope, no solution. It was a WOForm. Unless its bound to a direct action it creates a session. But binding it always calls thats function , no matter what button inside the form you press.

So I need to figure out a way of determining what button was pressed.

Any ideas ?


On Tuesday, December 16, 2003, at 11:56 PM, Jonathan Fleming wrote:

Have you sorted this problem yet Owen? Sorry I can't help you anyfurther if you havn't, if you have what was the culprit?

Jonathan :^)


From: Owen McKerrow <email@hidden>
To: "Jonathan Fleming" <email@hidden>
CC: email@hidden
Subject: Re: URGENT : Sessions and Forms
Date: Mon, 15 Dec 2003 09:32:03 +1100

Hi Jonathan,

Thanks for the reply. I remember reading it on the list archives :)

I don't use any of those dynamic elements, Im certain it is the form (
I deleted everything from the page except it and the session is still
created. I delete the form, session goes away. I bind the form to an
action and the session goes away ).

Owen

On Saturday, December 13, 2003, at 04:33 PM, Jonathan Fleming wrote:

> Beware of these dynamic elements, they require state to be stored on
> the server and so will create a session while you are using a
> directAction:
>
> WOHyperlink when the action attribute is bound
> WOCollapsibleComponentContent
> WOTabPanel
> and depending on how you bind them
> WOBrowser; WOCheckBox; WORadioButton and so on
> all of these and a few more can catch you out with the creation of a
> session if you're not carefull. Test and check that request handler
> 'wa' in the WebObjects Http URL does not turn to 'wo'. or simply
> overide Application.createSessionForRequest() and log an exception
> stack trace there to find the culprit... that's probably much easier
>
> WODisplayGroup - this is not generally regarded as a dynamic element
> this is simply a segmented data source where you can add stuff. You
> normally use it in the context of a session but it does not create
> one, however, if you dragndrop an eoentity into wobuilder and
> configure the displaygroup then wo uses session.defaultEditingContext
> in the woo file to initialize the wodisplaygroup's datasource. So
> beware of this if you use a WODisplayGroup
>
>
>> From: Owen McKerrow <email@hidden>
>> To: email@hidden
>> CC: email@hidden
>> Subject: URGENT : Sessions and Forms Date: Sat, 13 Dec 2003 15:36:01
>> +1100
>>
>> Hi All,
>>
>> We'll we were given a rush project last week ( due in 2 days ) which
>> uses direct actions. I've just spent the last hour tracking down were
>> a
>> session was being made. It appears that unless you have a form bound
>> to
>> a Direct Action class, it creates a session.
>> However if you bind the Action class, when the form is submitted this
>> binding overrides which action gets called and thus always calls the
>> same one, even with multiple submit = true and your different submit
>> buttons being bound to different actions.
>>
>> Help ! How do I stop this ? I can't have the session created, but I
>> need to be able to have multiple submit buttons calling different
>> actions!
>>
>> Thanks
>> Owen

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: RE: No Instance Available - Building from Xcode
  • Next by Date: RE: EOF and Oracle
  • Previous by thread: RE: URGENT : Sessions and Forms
  • Next by thread: Writing EOAdaptor for EOModeler
  • Index(es):
    • Date
    • Thread