• 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: custom error page and nested form problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom error page and nested form problem


  • Subject: Re: custom error page and nested form problem
  • From: Guido Neitzer <email@hidden>
  • Date: Wed, 22 Oct 2008 21:06:41 -0600

On 22.10.2008, at 14:31, Oliver Scheel wrote:

I have a simple custom error page with a form inside to send an error mail with user comments. When the exception occurs inside a form WO complains about a nested form and the error form tag is not generated. The error page is called via handleException() in the application class.

To solve it, I do (in handleException):

context.setInForm(false);

Is this the intended way?

This is a Wonder thing (not necessarily a bug). Wonder tracks whether the current context is inside a form. So if an exception happens within a form rendering, the current context thinks it is inside a form and you probably use the given context to return your error page - this has still the not closed form handling.


I think what you are doing is good enough to solve the problem. But I'm not sure about unintended side behaviour.

It might be better to create a new context with the current request and use that to create your error page. Not sure whether that is the best solution. As long as what you do works, I don't see the need to change it.

cug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >custom error page and nested form problem (From: Oliver Scheel <email@hidden>)

  • Prev by Date: Re: [ANN] Multiple ECs blog post
  • Next by Date: How do I add user Info in nightly's entity modeler?
  • Previous by thread: Re: custom error page and nested form problem
  • Next by thread: Minifying Javascript during build
  • Index(es):
    • Date
    • Thread