Check if installPatches() is getting called?  If not, figure out why not?

On 2012-04-13, at 1:38 PM, James Cicenia wrote:

> Here it is:
> 
> public class Application extends ERXApplication  implements  
> ERXResponseRewriter.Delegate
> {
> 
> Anything other thoughts?
> 
> James
> 
> On Apr 13, 2012, at 2:54 PM, Chuck Hill wrote:
> 
>> Not extending ERXApplication?  This should get setup when the app 
>> initializes:
>> 
>>      /**
>>       * Installs several bugfixes and enhancements to WODynamicElements. 
>> Sets the
>>       * Context class name to "er.extensions.ERXWOContext" if it is 
>> "WOContext".
>>       * Patches ERXWOForm, ERXWOFileUpload, ERXWOText to be used instead of
>>       * WOForm, WOFileUpload, WOText.
>>       */
>>      public void installPatches() {
>>              ERXPatcher.installPatches();
>>              if (contextClassName().equals("WOContext")) {
>>                      if (ERXApplication.isWO54()) {
>>                              setContextClassName("ERXWOContext54");
>>                      }
>>                      else {
>>                              
>> setContextClassName(ERXWOContext.class.getName());
>>                      }
>>              }
>> 
>> 
>> 
>> On 2012-04-13, at 12:20 PM, James Cicenia wrote:
>> 
>>> Hmmm, I must have set something wrong in Wonder. 
>>> This is an app I am converting. And I need submit to redirect to work.
>>> 
>>> 
>>> Here is the code:
>>> 
>>>     public ERXRedirect myAjaxAction() {
>>>               ERXRedirect redirect = pageWithName(ERXRedirect.class);
>>>               redirect.setComponentToPage();
>>>               return redirect;
>>>     }
>>> 
>>> 
>>> Here is the exception:
>>> 
>>> WARN  NSLog  - <er.ajax.AjaxRequestHandler>: Exception occurred while 
>>> handling request:
>>> java.lang.ClassCastException: com.webobjects.appserver.WOContext cannot be 
>>> cast to er.extensions.appserver.ERXWOContext
>>> [2012-4-13 14:17:42 CDT] <WorkerThread10> java.lang.ClassCastException: 
>>> com.webobjects.appserver.WOContext cannot be cast to 
>>> er.extensions.appserver.ERXWOContext
>>>     at 
>>> er.extensions.appserver.ERXRedirect.appendToResponse(ERXRedirect.java:162)
>>>     at 
>>> com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1385)
>>>     at 
>>> er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:552)
>>>     at 
>>> com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.java:1794)
>>>     at 
>>> er.extensions.appserver.ERXApplication.appendToResponse(ERXApplication.java:1924)
>>>     at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:242)
>>>     at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
>>>     at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
>>>     at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
>>>     at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
>>>     at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17)
>>>     at 
>>> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>>>     at 
>>> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2029)
>>>     at 
>>> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1994)
>>>     at 
>>> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>>>     at 
>>> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>>>     at java.lang.Thread.run(Thread.java:680)
>>> 
>>> 
>>> 
>>> Thoughts?
>>> Thanks
>>> James
>>> 
>>> On Apr 13, 2012, at 1:27 AM, Johann Werner wrote:
>>> 
>>>> From where does this exception originate? ERXRedirect doesn't use 
>>>> ERXWOContext nor does it cast to it (at least in my code). Have your tried 
>>>> to set a breakpoint in the constructor of WOContext to see where it has 
>>>> been created?
>>>> 
>>>> jw
>>>> 
>>>> 
>>>> Am 13.04.2012 um 03:36 schrieb James Cicenia:
>>>> 
>>>>> Ok -
>>>>> 
>>>>> The redirect crashes with a cast error:
>>>>> java.lang.ClassCastException: com.webobjects.appserver.WOContext cannot 
>>>>> be cast to er.extensions.appserver.ERXWOContext
>>>>> [2012-4-12 20:33:47 CDT] <WorkerThread0> java.lang.ClassCastException: 
>>>>> com.webobjects.appserver.WOContext cannot be cast to 
>>>>> er.extensions.appserver.ERXWOContext
>>>>> 
>>>>> Why would the appserver be WOContext? I thought ERXWOContext gets loaded 
>>>>> on startup?
>>>>> 
>>>>> Thanks
>>>>> James
>>>>> 
>>>>> 
>>>>> 
>>>>> On Apr 12, 2012, at 5:10 PM, Johann Werner wrote:
>>>>> 
>>>>>> ERXRedirect should work as it is. Alternatively you could try 
>>>>>> AjaxUtils.redirectTo() which does pretty the same.
>>>>>> 
>>>>>> public WOActionResults myAjaxAction() {
>>>>>>  ERXRedirect redirect = pageWithName(ERXRedirect.class);
>>>>>>  redirect.setComponent(pageWithName(MyPageToGo.class));
>>>>>>  return redirect;
>>>>>> }
>>>>>> 
>>>>>> 
>>>>>> Am 12.04.2012 um 23:47 schrieb James Cicenia:
>>>>>> 
>>>>>>> I don't see any isJavascriptRedirectEnabled.
>>>>>>> 
>>>>>>> Am I supposed to anything special in the ModalBox besides just the 
>>>>>>> action binding in Submit?
>>>>>>> 
>>>>>>> Thanks
>>>>>>> 
>>>>>>> James Cicenia 
>>>>>>> cell: 773.398.4649
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Apr 12, 2012, at 2:41 PM, David LeBer wrote:
>>>>>>> 
>>>>>>>> I think you need to set: isJavascriptRedirectEnabled to true on the 
>>>>>>>> ERXRedirect.
>>>>>>>> 
>>>>>>>> D
>>>>>>>> 
>>>>>>>> --
>>>>>>>> David LeBer
>>>>>>>> Codeferous Software
>>>>>>>> 
>>>>>>>> On 2012-04-12, at 3:16 PM, James Cicenia wrote:
>>>>>>>> 
>>>>>>>>> Hmmm, i am getting no submission still.
>>>>>>>>> 
>>>>>>>>> I launch a standard AMD from AMDO.
>>>>>>>>> The following is my AjaxSubmitButton bindings:
>>>>>>>>> 
>>>>>>>>> SubmitBtn: AjaxSubmitButton {
>>>>>>>>>       action = saveAndSubmitChanges;
>>>>>>>>>       value = "Save";
>>>>>>>>>       name = "SaveAndSubmit";
>>>>>>>>>       onClick = "Element.show('busy1')";
>>>>>>>>>       id = "wiz-submit";
>>>>>>>>>       onComplete = "function(x){Element.hide('busy1')}";
>>>>>>>>> }
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> And this is the basic action method:
>>>>>>>>> 
>>>>>>>>>                       CharterEdit nextPage = (CharterEdit) 
>>>>>>>>> pageWithName("CharterEdit");
>>>>>>>>>                       EOEditingContext peerEC = 
>>>>>>>>> ERXEC.newEditingContext();
>>>>>>>>>                       nextPage.setEditingContext(peerEC);
>>>>>>>>>                       nextPage.setItem( theNewProjectItem);
>>>>>>>>>               
>>>>>>>>>                       ERXRedirect redirect = 
>>>>>>>>> (ERXRedirect)pageWithName(ERXRedirect.class.getName());
>>>>>>>>>                       redirect.setComponent(nextPage);
>>>>>>>>>                       return redirect ;
>>>>>>>>> 
>>>>>>>>> Anything obvious?
>>>>>>>>> Thanks
>>>>>>>>> 
>>>>>>>>> James
>>>>>>>>> 
>>>>>>>>> On Apr 12, 2012, at 1:06 PM, Johann Werner wrote:
>>>>>>>>> 
>>>>>>>>>> ERXRedirect
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>>>> Webobjects-dev mailing list      ([email protected])
>>>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>>> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>>>>>>>> 
>>>>>>>>> This email sent to [email protected]
>>>>>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>> 
>>> This email sent to [email protected]
>> 
>> -- 
>> Chuck Hill             Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.    
>> http://www.global-village.net/gvc/practical_webobjects
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to [email protected]

-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects








Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to