Re: TinyMCE and AjaxSubmitButton (field values allways set to null)
That's exactly right. Call tinyMCE.activeEditor.save() before making your Ajax request. John Sent from my iPhone On Jan 11, 2012, at 2:12 PM, Johann Werner j...@oyosys.de wrote: Hi Raymond, isn't tinyMCE putting the editable text into an own html element and catching the form's submit to put back the edited text into the original input field? Then your problem would be that the AjaxSubmitButton doesn't trigger the onSubmit event on the form as it will do an ajax request like its name suggests. So you would have to manually call the necessary cleanup function of tinyMCE from the onClickBefore binding prior sending of the form contents takes place. But that's just a wild guess. jw Am 10.01.2012 um 14:47 schrieb Raymond NANEON: Hi All, I have a real problem using tinyMCE and CustomAjaxSubmitButton (ajaxSubmitButton with icon (add, cancel, delete)). The problem is on submitting action, data are always set to null and when I use request form field values, there are also null. But When I use the classic WOSubmitButton, the request form field value are set. So, What the problem of AjaxSubmitButton ? What is the difference in submitting action between WOSubmitButton and AjaxSubmitButton? Thanks for your help. Envoyé depuis iCloud ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.de This email sent to j...@oyosys.de ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: TinyMCE and AjaxSubmitButton (field values allways set to null)
Also, note that tinyMCE didn't work with iOS before version 5 and it may still not work with Android. (?) That can be really frustrating for your users. I detect the browser and don't load it if it is ios. John Sent from my iPhone On Jan 11, 2012, at 3:48 PM, John Kim Larson the_lars...@mac.com wrote: That's exactly right. Call tinyMCE.activeEditor.save() before making your Ajax request. John Sent from my iPhone On Jan 11, 2012, at 2:12 PM, Johann Werner j...@oyosys.de wrote: Hi Raymond, isn't tinyMCE putting the editable text into an own html element and catching the form's submit to put back the edited text into the original input field? Then your problem would be that the AjaxSubmitButton doesn't trigger the onSubmit event on the form as it will do an ajax request like its name suggests. So you would have to manually call the necessary cleanup function of tinyMCE from the onClickBefore binding prior sending of the form contents takes place. But that's just a wild guess. jw Am 10.01.2012 um 14:47 schrieb Raymond NANEON: Hi All, I have a real problem using tinyMCE and CustomAjaxSubmitButton (ajaxSubmitButton with icon (add, cancel, delete)). The problem is on submitting action, data are always set to null and when I use request form field values, there are also null. But When I use the classic WOSubmitButton, the request form field value are set. So, What the problem of AjaxSubmitButton ? What is the difference in submitting action between WOSubmitButton and AjaxSubmitButton? Thanks for your help. Envoyé depuis iCloud ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.de This email sent to j...@oyosys.de ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: TinyMCE and AjaxSubmitButton (field values allways set to null)
I'm pretty sure it only saves the active editor, but I remember the API being pretty good. There is probably tinyMCE.editors or something that represents the collection of editors. You could iterate and save. John Sent from my iPhone On Jan 11, 2012, at 4:01 PM, Raymond NANEON rnan...@me.com wrote: Thanks for your reply. I use AjaxTabPanel including 3 WOText bing and each WOText bind to tinyMCE. So the function tinyMCE.activeEditor.save() can save all WOText value at one time or selected WOText tab? If it save selected WOText tab, I have problem. Envoyé depuis iCloud Le 11 janv. 2012 à 22:48, John Kim Larson a écrit : That's exactly right. Call tinyMCE.activeEditor.save() before making your Ajax request. John Sent from my iPhone On Jan 11, 2012, at 2:12 PM, Johann Werner j...@oyosys.de wrote: Hi Raymond, isn't tinyMCE putting the editable text into an own html element and catching the form's submit to put back the edited text into the original input field? Then your problem would be that the AjaxSubmitButton doesn't trigger the onSubmit event on the form as it will do an ajax request like its name suggests. So you would have to manually call the necessary cleanup function of tinyMCE from the onClickBefore binding prior sending of the form contents takes place. But that's just a wild guess. jw Am 10.01.2012 um 14:47 schrieb Raymond NANEON: Hi All, I have a real problem using tinyMCE and CustomAjaxSubmitButton (ajaxSubmitButton with icon (add, cancel, delete)). The problem is on submitting action, data are always set to null and when I use request form field values, there are also null. But When I use the classic WOSubmitButton, the request form field value are set. So, What the problem of AjaxSubmitButton ? What is the difference in submitting action between WOSubmitButton and AjaxSubmitButton? Thanks for your help. Envoyé depuis iCloud ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.de This email sent to j...@oyosys.de ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
AjaxFileUpload problem in deployment
I have an AjaxFileUpload on a page that works fine in development but not in deployment. When I upload a file I get an UnknownKeyException on the AjaxProgressBar inside the AjaxFileUpload ?? My bindings are UploadPicture: AjaxFileUpload { data = uploadedFile; filePath = fileName; succeededAction = savePhoto; uploadLabel = Upload photo; finishedFunction = img_previewUpdate();; progressBarBeforeStart = true; refreshTime = 1000; } This is the stack trace: URL = /cgi-bin/WebObjects/MyApp.woa/4/ajax/6.0.9.1.2.9?_u=_0ProgressBar1324052204904; } com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [er.ajax.AjaxProgressBar name: er.ajax.AjaxProgressBar subcomponents: null valueForKey()]: lookup of unknown key: 'uploadFormID'. The WOComponent er.ajax.AjaxProgressBar does not have an instance variable of the name uploadFormID or _uploadFormID, nor a method of the name uploadFormID, _uploadFormID, getUploadFormID, or _getUploadFormID at com.webobjects.appserver.WOComponent.handleQueryWithUnboundKey(WOComponent.java:1764) at com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboundKey(NSKeyValueCoding.java:494) at com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSKeyValueCoding.java:894) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at er.extensions.components._private.ERXWOForm._formName(ERXWOForm.java:296) at er.extensions.components._private.ERXWOForm._clearFormName(ERXWOForm.java:338) at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:230) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:38) This is what the generated HTML looks like (I took out some whitespace): iframe name=_0UploadFrame src=/cgi-bin/WebObjects/MyApp.woa/wa/ERXDirectAction/empty width=0 height=0 border=0 style=border: none;/iframe form name=_0Form enctype=multipart/form-data method=post target=_0UploadFrame action=/cgi-bin/WebObjects/MyApp.woa/upload input name=wosid type=hidden value=7f5NZMw8JeYq0B8lMUh6tw / input name=id type=hidden value=_0 / table tr class=upload_row td class=input_colinput name=uploadedFile type=file //td td class=action_colinput type=button onclick=AUL.update('_0ProgressBar', {}, '6.0.9.3.5.2.7'); value=Upload photo/input/td /tr tr class=progress_row td colspan = 2 div id=_0ProgressBar updateUrl=/cgi-bin/WebObjects/MyApp.woa/ajax/6.0.9.3.5.2.9 /divscriptAUC.register('_0ProgressBar');/script /td /tr /table /form I've used this many times before, and everything is fine. Heck, it's fine in development. Everything else works fine in deployment. I'm on EC2 btw with 5.4.3. It's like the context for the ERXWOForm puts it inside the AjaxProgressBar when it should be inside the AjaxFileUpload. ??? I use other Ajax stuff all over and it is fine, so I don't think it is a problem with the handler or something bigger. Thanks for any help, John ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: AjaxFileUpload problem in deployment
Yes. It's an embedded deploy. John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Dec 16, 2011, at 11:07 AM, Jérémy DE ROYER [INGENCYS]jeremy.dero...@ingencys.net wrote: Bonsoir, Do you have the same version of the Ajax Frameowrk on both, development and deployment ? Jérémy Le 16 déc. 2011 à 18:03, John Kim Larson a écrit : I have an AjaxFileUpload on a page that works fine in development but not in deployment. When I upload a file I get an UnknownKeyException on the AjaxProgressBar inside the AjaxFileUpload ?? My bindings are UploadPicture: AjaxFileUpload { data = uploadedFile; filePath = fileName; succeededAction = savePhoto; uploadLabel = Upload photo; finishedFunction = img_previewUpdate();; progressBarBeforeStart = true; refreshTime = 1000; } This is the stack trace: URL = /cgi-bin/WebObjects/MyApp.woa/4/ajax/6.0.9.1.2.9?_u=_0ProgressBar1324052204904; } com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [er.ajax.AjaxProgressBar name: er.ajax.AjaxProgressBar subcomponents: null valueForKey()]: lookup of unknown key: 'uploadFormID'. The WOComponent er.ajax.AjaxProgressBar does not have an instance variable of the name uploadFormID or _uploadFormID, nor a method of the name uploadFormID, _uploadFormID, getUploadFormID, or _getUploadFormID at com.webobjects.appserver.WOComponent.handleQueryWithUnboundKey(WOComponent.java:1764) at com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboundKey(NSKeyValueCoding.java:494) at com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSKeyValueCoding.java:894) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at er.extensions.components._private.ERXWOForm._formName(ERXWOForm.java:296) at er.extensions.components._private.ERXWOForm._clearFormName(ERXWOForm.java:338) at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:230) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:38) This is what the generated HTML looks like (I took out some whitespace): iframe name=_0UploadFrame src=/cgi-bin/WebObjects/MyApp.woa/wa/ERXDirectAction/empty width=0 height=0 border=0 style=border: none;/iframe form name=_0Form enctype=multipart/form-data method=post target=_0UploadFrame action=/cgi-bin/WebObjects/MyApp.woa/upload input name=wosid type=hidden value=7f5NZMw8JeYq0B8lMUh6tw / input name=id type=hidden value=_0 / table tr class=upload_row td class=input_colinput name=uploadedFile type=file //td td class=action_colinput type=button onclick=AUL.update('_0ProgressBar', {}, '6.0.9.3.5.2.7'); value=Upload photo/input/td /tr tr class=progress_row td colspan = 2 div id=_0ProgressBar updateUrl=/cgi-bin/WebObjects/MyApp.woa/ajax/6.0.9.3.5.2.9 /divscriptAUC.register('_0ProgressBar');/script /td /tr /table /form I've used this many times before, and everything is fine. Heck, it's fine in development. Everything else works fine in deployment. I'm on EC2 btw with 5.4.3. It's like the context for the ERXWOForm puts it inside the AjaxProgressBar when it should be inside the AjaxFileUpload. ??? I use other Ajax stuff all over and it is fine, so I don't think it is a problem with the handler or something bigger. Thanks for any help, John ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help
Re: AjaxFileUpload problem in deployment
So I did a deploy using the same package to a Mac server and it works. The same package deployed to EC2 gives me this weird error, so it is some kind of configuration problem. I checked the classpaths for the Mac and UNIX versions line for line and they're the same. Any ideas? John On Dec 16, 2011, at 11:12 AM, John Kim Larson wrote: Yes. It's an embedded deploy. John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Dec 16, 2011, at 11:07 AM, Jérémy DE ROYER [INGENCYS]jeremy.dero...@ingencys.net wrote: Bonsoir, Do you have the same version of the Ajax Frameowrk on both, development and deployment ? Jérémy Le 16 déc. 2011 à 18:03, John Kim Larson a écrit : I have an AjaxFileUpload on a page that works fine in development but not in deployment. When I upload a file I get an UnknownKeyException on the AjaxProgressBar inside the AjaxFileUpload ?? My bindings are UploadPicture: AjaxFileUpload { data = uploadedFile; filePath = fileName; succeededAction = savePhoto; uploadLabel = Upload photo; finishedFunction = img_previewUpdate();; progressBarBeforeStart = true; refreshTime = 1000; } This is the stack trace: URL = /cgi-bin/WebObjects/MyApp.woa/4/ajax/6.0.9.1.2.9?_u=_0ProgressBar1324052204904; } com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [er.ajax.AjaxProgressBar name: er.ajax.AjaxProgressBar subcomponents: null valueForKey()]: lookup of unknown key: 'uploadFormID'. The WOComponent er.ajax.AjaxProgressBar does not have an instance variable of the name uploadFormID or _uploadFormID, nor a method of the name uploadFormID, _uploadFormID, getUploadFormID, or _getUploadFormID at com.webobjects.appserver.WOComponent.handleQueryWithUnboundKey(WOComponent.java:1764) at com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboundKey(NSKeyValueCoding.java:494) at com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSKeyValueCoding.java:894) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at er.extensions.components._private.ERXWOForm._formName(ERXWOForm.java:296) at er.extensions.components._private.ERXWOForm._clearFormName(ERXWOForm.java:338) at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:230) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:38) This is what the generated HTML looks like (I took out some whitespace): iframe name=_0UploadFrame src=/cgi-bin/WebObjects/MyApp.woa/wa/ERXDirectAction/empty width=0 height=0 border=0 style=border: none;/iframe form name=_0Form enctype=multipart/form-data method=post target=_0UploadFrame action=/cgi-bin/WebObjects/MyApp.woa/upload input name=wosid type=hidden value=7f5NZMw8JeYq0B8lMUh6tw / input name=id type=hidden value=_0 / table tr class=upload_row td class=input_colinput name=uploadedFile type=file //td td class=action_colinput type=button onclick=AUL.update('_0ProgressBar', {}, '6.0.9.3.5.2.7'); value=Upload photo/input/td /tr tr class=progress_row td colspan = 2 div id=_0ProgressBar updateUrl=/cgi-bin/WebObjects/MyApp.woa/ajax/6.0.9.3.5.2.9 /divscriptAUC.register('_0ProgressBar');/script /td /tr /table /form I've used this many times before, and everything is fine. Heck, it's fine in development. Everything else works fine in deployment. I'm on EC2 btw with 5.4.3. It's like the context for the ERXWOForm puts it inside the AjaxProgressBar when it should be inside the AjaxFileUpload. ??? I
Re: AjaxFileUpload problem in deployment
It won't take a regular WOFileUpload either. Maybe an encoding problem? Is there something in apache that I didn't set up? I am using er.extensions.ERXApplication.DefaultEncoding=UTF-8 On Dec 16, 2011, at 12:17 PM, John Kim Larson wrote: So I did a deploy using the same package to a Mac server and it works. The same package deployed to EC2 gives me this weird error, so it is some kind of configuration problem. I checked the classpaths for the Mac and UNIX versions line for line and they're the same. Any ideas? John On Dec 16, 2011, at 11:12 AM, John Kim Larson wrote: Yes. It's an embedded deploy. John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Dec 16, 2011, at 11:07 AM, Jérémy DE ROYER [INGENCYS]jeremy.dero...@ingencys.net wrote: Bonsoir, Do you have the same version of the Ajax Frameowrk on both, development and deployment ? Jérémy Le 16 déc. 2011 à 18:03, John Kim Larson a écrit : I have an AjaxFileUpload on a page that works fine in development but not in deployment. When I upload a file I get an UnknownKeyException on the AjaxProgressBar inside the AjaxFileUpload ?? My bindings are UploadPicture: AjaxFileUpload { data = uploadedFile; filePath = fileName; succeededAction = savePhoto; uploadLabel = Upload photo; finishedFunction = img_previewUpdate();; progressBarBeforeStart = true; refreshTime = 1000; } This is the stack trace: URL = /cgi-bin/WebObjects/MyApp.woa/4/ajax/6.0.9.1.2.9?_u=_0ProgressBar1324052204904; } com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [er.ajax.AjaxProgressBar name: er.ajax.AjaxProgressBar subcomponents: null valueForKey()]: lookup of unknown key: 'uploadFormID'. The WOComponent er.ajax.AjaxProgressBar does not have an instance variable of the name uploadFormID or _uploadFormID, nor a method of the name uploadFormID, _uploadFormID, getUploadFormID, or _getUploadFormID at com.webobjects.appserver.WOComponent.handleQueryWithUnboundKey(WOComponent.java:1764) at com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboundKey(NSKeyValueCoding.java:494) at com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSKeyValueCoding.java:894) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at er.extensions.components._private.ERXWOForm._formName(ERXWOForm.java:296) at er.extensions.components._private.ERXWOForm._clearFormName(ERXWOForm.java:338) at er.extensions.components._private.ERXWOForm.invokeAction(ERXWOForm.java:230) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:1079) at com.webobjects.appserver._private.WOComponentReference.invokeAction(WOComponentReference.java:127) at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115) at com.webobjects.appserver._private.WOComponentContent.invokeAction(WOComponentContent.java:38) This is what the generated HTML looks like (I took out some whitespace): iframe name=_0UploadFrame src=/cgi-bin/WebObjects/MyApp.woa/wa/ERXDirectAction/empty width=0 height=0 border=0 style=border: none;/iframe form name=_0Form enctype=multipart/form-data method=post target=_0UploadFrame action=/cgi-bin/WebObjects/MyApp.woa/upload input name=wosid type=hidden value=7f5NZMw8JeYq0B8lMUh6tw / input name=id type=hidden value=_0 / table tr class=upload_row td class=input_colinput name=uploadedFile type=file //td td class=action_colinput type=button onclick=AUL.update('_0ProgressBar', {}, '6.0.9.3.5.2.7'); value=Upload photo/input/td /tr tr class=progress_row td colspan = 2 div id=_0ProgressBar updateUrl=/cgi-bin/WebObjects/MyApp.woa/ajax/6.0.9.3.5.2.9 /divscriptAUC.register('_0ProgressBar');/script /td /tr /table /form I've used this many times before, and everything is fine
Re: Dynamic loading of a component into a container?
So it has been about a month I posted this and I'm using this thing all over the place now in production with no problems. It works great and has solved tons of design problems I had. My question, which may be hard to answer without the source code, is does anyone see any problems with memory leaks with this approach? I'm looking at the guys who know how component references are created dynamically like in WOSwitchComponent. When I change the component to show, I'm making a component reference to the component to generate and setting a boolean newComponent flag. Then I override _subcomponentForElementID to return null and set the newComponent flag to false when I need a new component forcing the component to generate a new component from the component reference. I'm just not sure if the old component is getting cached somewhere and not being garbage collected due to some hard reference somewhere. I don't see it when profiling nor do I see it in production with a growing tenured generation. Any input? John Sent from my iPhone On Jul 28, 2011, at 5:51 PM, John Kim Larson the_lars...@mac.com wrote: It's my understanding that that method only works for directing the results of an Ajax call to some container. It doesn't persist across pages. Also, like in my example, I can't call setValue(Some value) on Component2 because it doesn't have that method. The WOString pulls its value from the binding to value. This component allows you to dynamically insert a component into a specific page's structure and bind directly to that component's bindings. John Sent from my iPhone On Jul 28, 2011, at 5:29 PM, Ramsey Gurley rgur...@smarthealth.com wrote: I thought this was the idea behind the replaceId binding Mike added... something like: div id=auc/div wo:AjaxUpdateLink replaceId=auc action=$showComponent1Show component 1/wo:AjaxUpdateLink wo:AjaxUpdateLink replaceId=auc action=$showComponent2Show component 2/wo:AjaxUpdateLink public WOActionResults showComponent1() { return pageWithName(Component1.class); } public WOActionResults showComponent2() { Component2 page = pageWithName(Component2.class); page.setValue(Some value); return page; } Ramsey On Jul 28, 2011, at 2:53 PM, John Kim Larson wrote: Thanks. My server kind of stinks. It's experimental, but I've been using it for a week or so in semi-production and seems to work. Solved a lot of problems. Sent from my iPhone On Jul 28, 2011, at 4:48 PM, Pascal Robert prob...@macti.ca wrote: Thanks! It's also on wocommunity.org: http://wocommunity.org/podcasts/RemoteComponentDemo.mov It's here now. http://torqwrench.com/Movies/Remote%20component%20demo.mov John On Jul 28, 2011, at 3:48 PM, John Kim Larson wrote: YouTube keeps screwing up the encoding and truncating the movie to 15 seconds. Any ideas on how to get this to interested parties aside from hosting it on my domain? John Sent from my iPhone On Jul 28, 2011, at 9:46 AM, Pascal Robert prob...@macti.ca wrote: A small podcast to demo how it works would be really cool! I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app
Re: Baffling WOD error
I've had that happen too. Instead of clean, I've found that a refresh of the project makes it go away. John Sent from my iPhone On Aug 24, 2011, at 12:38 PM, Valerio Luccio valerio.luc...@nyu.edu wrote: I have a project that I hadn't worked on in a while. When I opened it in Eclipse yesterday I got some baffling error in WOD validation, although the application works. First some info: O/S: X 10.6.8 Eclipse: 3.6.1 WOLips: 3.6.6212 Error: 'item' must be bounded when 'list' is bound Example WOD snippet: DayRep: WORepetition { index = dayIndex; item = dayEntries_; list = dayEntriesArray_; } All variables are declared as public in the .java source. I tried clean/rebuild just in case, but it didn't help. I'm confused. -- Valerio Luccio(212) 998-8736 Center for Brain Imaging 4 Wshington Place, Room 158 New York University New York, NY 10003 In an open world, who needs windows or gates ? ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Performance Questions
rather than increasing worker threads, why not just spawn a new Java thread for sending the notifications? That thread can run in the background while you're doing EO stuff and free your app up to do the servicing of requests. If you go down this path, I always pass EOs to other threads as globalIDs to prevent problems. Also, make sure you don't lock the OSC for the app during your work or your app will hang while other threads' ECs wait to get it. If this gets bad enough, use a separate OSC stack and dispose of it when your done. John Sent from my iPhone On Jul 29, 2011, at 9:28 AM, Andrew Kinnie akin...@mac.com wrote: Greetings I have a deployed app which serves as a push notification server for our iOS app. It uses a recent ERRest (post WOWODC) to provide access to the data which is located on a MySQL database (using innoDB). The model has entities for PushApplication (the iOS app), ApplicationDevice (i.e. an iOS device which has our iOS app), Notification and has a lookup table for NotificationType (5 rows). Notification is a message, and there is a many to many with ApplicationDevice along with a corresponding device_notification table, as well as ApplicationDeviceNotificationType to allow particular devices to have particular types of notifications turned on or off. Our app in connected to by our editorial staff via a Cold Fusion app to send out breaking news alerts as push notifications. I then get (via a fetch) all the devices which have that particular notification type (basically 90% of our 20,000+ installed applicationDevices), then I pass that array into a method which makes the connection to Apple and iterates through the array sending one notification to each device in turn, then closes the connection. It takes approximately 1 minute to send an alert to all 20,000 devices. While this happens, some of these devices are getting the push from Apple (which is crazy fast about it), and some of them are running the app and the iOS app itself is querying the server for details about the notification and loading it in. However, if this happens while the push is still in the process of sending (i.e. within the 1 minute time frame), the iOS app may be forced to wait for the send process to finish (as many as 60 seconds presumably. It doesn't happen all that often, because our app doesn't buzz or makes a sound when it receives a notification, but it is not ideal. We anticipate using this same app and server for the Android version, and for the upcoming iPhone update, so the number of installed devices could increase pretty dramatically. Currently it is iPad only. So, we're trying to figure out what to do about it. Currently the app is deployed on a CentOS server (single core processor) which also houses the db, but nothing else. It has 16 GB of RAM. We were considering: 1. Trying to increase the threads the app can create, but I'm not sure that would fix it as much as mask it 2. Trying to run an additional copy of the app to send while the other one handles the incoming client requests, but I am not sure how to accomplish this other than copying the whole project, renaming it, then deploying that. I am also not sure this would fix anything if in fact the issue were locking in the database or jdbc or something of that nature. 3. Seeing if there was something easier, more efficient and less kludgy feeling than either of those. (assuming either of those would work anyway, we have some difficulty testing it without sending out 20,000 push notifications) Anyone have any insight? Andrew ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dynamic loading of a component into a container?
I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com Mit freundlichen Grüßen Paul Dunkler xyrality_logo_medium.png - XYRALITY GmbH • Lerchenstraße 28a • 22767 Hamburg Paul Dunkler • Softwareentwickler Mail: paul.dunk...@xyrality.com Tel: +49 (0) 40 23 51 78 97 Mobil: +49 (0) 151 11624143 Fax: +49 (0) 40 23 51 78 98 Web: http://www.xyrality.com/ Registergericht: Hamburg HRB 115332 Geschäftsführer: Sven Ossenbrüggen Alexander Spohr
Re: Dynamic loading of a component into a container?
Done. Then not done. ScreenFlow didn't work with Lion. As soon as update is done I'll post it. Sent from my iPhone On Jul 28, 2011, at 9:46 AM, Pascal Robert prob...@macti.ca wrote: A small podcast to demo how it works would be really cool! I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com Mit freundlichen Grüßen Paul Dunkler xyrality_logo_medium.png - XYRALITY GmbH • Lerchenstraße 28a • 22767 Hamburg
Re: Dynamic loading of a component into a container?
YouTube keeps screwing up the encoding and truncating the movie to 15 seconds. Any ideas on how to get this to interested parties aside from hosting it on my domain? John Sent from my iPhone On Jul 28, 2011, at 9:46 AM, Pascal Robert prob...@macti.ca wrote: A small podcast to demo how it works would be really cool! I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com Mit freundlichen Grüßen Paul Dunkler xyrality_logo_medium.png
Re: Dynamic loading of a component into a container?
It's here now. http://torqwrench.com/Movies/Remote%20component%20demo.mov John On Jul 28, 2011, at 3:48 PM, John Kim Larson wrote: YouTube keeps screwing up the encoding and truncating the movie to 15 seconds. Any ideas on how to get this to interested parties aside from hosting it on my domain? John Sent from my iPhone On Jul 28, 2011, at 9:46 AM, Pascal Robert prob...@macti.ca wrote: A small podcast to demo how it works would be really cool! I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com
Re: Dynamic loading of a component into a container?
Thanks. My server kind of stinks. It's experimental, but I've been using it for a week or so in semi-production and seems to work. Solved a lot of problems. Sent from my iPhone On Jul 28, 2011, at 4:48 PM, Pascal Robert prob...@macti.ca wrote: Thanks! It's also on wocommunity.org: http://wocommunity.org/podcasts/RemoteComponentDemo.mov It's here now. http://torqwrench.com/Movies/Remote%20component%20demo.mov John On Jul 28, 2011, at 3:48 PM, John Kim Larson wrote: YouTube keeps screwing up the encoding and truncating the movie to 15 seconds. Any ideas on how to get this to interested parties aside from hosting it on my domain? John Sent from my iPhone On Jul 28, 2011, at 9:46 AM, Pascal Robert prob...@macti.ca wrote: A small podcast to demo how it works would be really cool! I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev
Re: Dynamic loading of a component into a container?
It's my understanding that that method only works for directing the results of an Ajax call to some container. It doesn't persist across pages. Also, like in my example, I can't call setValue(Some value) on Component2 because it doesn't have that method. The WOString pulls its value from the binding to value. This component allows you to dynamically insert a component into a specific page's structure and bind directly to that component's bindings. John Sent from my iPhone On Jul 28, 2011, at 5:29 PM, Ramsey Gurley rgur...@smarthealth.com wrote: I thought this was the idea behind the replaceId binding Mike added... something like: div id=auc/div wo:AjaxUpdateLink replaceId=auc action=$showComponent1Show component 1/wo:AjaxUpdateLink wo:AjaxUpdateLink replaceId=auc action=$showComponent2Show component 2/wo:AjaxUpdateLink public WOActionResults showComponent1() { return pageWithName(Component1.class); } public WOActionResults showComponent2() { Component2 page = pageWithName(Component2.class); page.setValue(Some value); return page; } Ramsey On Jul 28, 2011, at 2:53 PM, John Kim Larson wrote: Thanks. My server kind of stinks. It's experimental, but I've been using it for a week or so in semi-production and seems to work. Solved a lot of problems. Sent from my iPhone On Jul 28, 2011, at 4:48 PM, Pascal Robert prob...@macti.ca wrote: Thanks! It's also on wocommunity.org: http://wocommunity.org/podcasts/RemoteComponentDemo.mov It's here now. http://torqwrench.com/Movies/Remote%20component%20demo.mov John On Jul 28, 2011, at 3:48 PM, John Kim Larson wrote: YouTube keeps screwing up the encoding and truncating the movie to 15 seconds. Any ideas on how to get this to interested parties aside from hosting it on my domain? John Sent from my iPhone On Jul 28, 2011, at 9:46 AM, Pascal Robert prob...@macti.ca wrote: A small podcast to demo how it works would be really cool! I know this has been a while, but I finished what I call a Remote Component. You put it anywhere in your page. It has static methods that allow you to set the component name and bindings you want to use in the component and puts them in your session dictionary. Wrap the remote component in an Ajax update container, and update it after you've set the component and bindings using the static methods. The component generates a WOComponenReference using your component name and bindings (WOAssociations - I've built a couple custom ones since bindings are usually useless here). It then generates a component instance and pushes it to the remote component's subcomponent dictionary with the right elementID. From there it calls invokeAction, takeValuesFromRequest and appendToResponse on the custom component reference. The result is that you can put, via Java, any component with any bindings in the remote component's spot on the page. I have a popup modal dialog that I really only want one of, but I want to put lots of different components in it. With WOSwitchComponent I had to have a wrapper around whatever component I wanted to include to take a generic dictionary and extract bindings specific to the component I wanted to show. Now I don't have to do that. You could use it for banners, etc. It seems to work good. ? Any interest in seeing this from anyone? John Sent from my iPhone On Jun 10, 2011, at 3:38 AM, Paul Dunkler paul.dunk...@xyrality.com wrote: Yes, this is exactly what i am trying to do! I will try your approach - But first, i will have a look at the WOSwitchComponent (thanks Chuck!) Will tell you when i was successfull with that Am 10.06.2011 um 00:57 schrieb John Kim Larson: If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys
Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page
I thought your action methods had to be void methods for Ajax actions, otherwise this happens. ? jal Sent from my iPhone On Jul 12, 2011, at 10:58 PM, Chuck Hill ch...@global-village.net wrote: On Jul 12, 2011, at 4:29 PM, Ricardo J. Parada wrote: On Jul 12, 2011, at 5:53 PM, Chuck Hill wrote: On Jul 12, 2011, at 2:45 PM, Ricardo J. Parada wrote: On Jul 12, 2011, at 4:52 PM, Chuck Hill wrote: Hi Ricardo, On Jul 12, 2011, at 1:35 PM, Ricardo J. Parada wrote: Does anybody have an idea what could be causing this problem? The user clicks on an AjaxModalDialogOpener which opens the dialog. Then the user does a whole bunch of stuff in the dialog that involves many clicks Does it still happen if they don't make so many clicks? If they make a few clicks then it works okay. then finally clicks a DONE link to close the dialog. Are all of these links and clicks Ajax actions? Yes, they are clicking on links generated by AjaxSubmitButton components to be exact. :-) And you are certain that there are no /wo/ or /wa/ requests mixed in here? I set this property in my Properties.dev: log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG and then I looked at all the uri's of the requests coming in. They have /ajax/ in there and when the dialog first comes up I see a few /_wr_/ and I guess the browser caches those since I don't see requests for those anymore on subsequent requests after the dialog is displayed. Those should be OK, they won't affect the page caches. All the requests for the many clicks I mentioned have /ajax/ in them. I don't see any /wo/ requests mixed in. Also I set a breakpoint in ERXAjaxSession.java at the only place it calls super.savePage() where I assume the current page would be saved but I never hit the breakpoint. I would think that regular component requests would be generating new context IDs and therefore saving the page in the cache for those context IDs. But I don't see the page getting saved. :-/ Yeah, that is what I would expect too. The dialog has a closeUpdateContainerID bound with the id of an ajax update container to refresh, which it does refresh upon closing the dialog. But then the user clicks on a link on the page that is outside the refreshed AjaxUpdateContainer and the app displays the error You backtracked too far. The application backtracking limit of 30 has been exceeded. Ajax links or regular component actions links? I do what seems to be the same thing (except maybe the does a whole bunch of stuff in the dialog) and have not had any problems. They are regular component action links. The context ID for which the page is being restored is 22. The original URL is 21? Well, I just put in there a wo:link string=test action=$test/ and by inspecting that link after I close the ajax modal dialog and the update container refreshes the href for the link is: http://192.168.1.9:53295/cgi-bin/WebObjects/Phynance.woa/wo/EmqPpwSYBiOiS7PPSLDXzw/8.0.0.9.1.1.13.1.5.1.2.1.1.3.51 and clicking that generates the You backtracked too far error. What is the context ID shown in the browser's location URL? The key to tracking this down is to know if it is the Ajax or the regular page cache that is missing the component. I'm stepping through the restorePageForContextID() in ERXAjaxSession.java but I'm not sure what to look for. Sorry, I just meant if the URL that caused the error was a /ajax/ or /wo/ URL. It sounds like a /wo/ URL so that suggests to me that something in your dialog is generating /wo/ or /wa/ requests that are pushing the page out of the standard page cache. I did not see any /wo/ nor /wa/ requests. They are all /ajax/ requests. Maybe I'll try to create a test Wonder app with an ajax modal dialog with a single ajax link in it that displays the current time when clicked... Then I can click it many many times. Then close the dialog and then click on a link on the page afterwards to see if I can reproduce. I'd be interested if you can reproduce it. The only think that I can think of is that the Ajax code is getting confused and using the regular page cache. But then I would expect to see calls to super.savePage. The only other thing that I can think of is that the session is getting switched, but with the session in the URL that should not happen. Chuck -- 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/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page
At some point shoulda's become needta's after you've done them that way enough I guess. :-/ Even if you were going from an ID of 22 to 8, things should be okay since that is within the bounds of the backtrack cache of 30 that your error is complaining about. Is it possible you've corrupted your page by changing some variable a la the classic repetition with a checkbox gotcha? I mean it seems like a page cache issue, but it also seems like of those WebObjects is broken! ... No wait, I'm broken. issues. John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Jul 13, 2011, at 5:24 PM, Chuck Hill ch...@global-village.net wrote: They don't need to be, it is good style IMO to make them void if they don't need to return anything. Chuck On 2011-07-13, at 4:58 PM, John Kim Larson wrote: I thought your action methods had to be void methods for Ajax actions, otherwise this happens. ? jal Sent from my iPhone On Jul 12, 2011, at 10:58 PM, Chuck Hill ch...@global-village.net wrote: On Jul 12, 2011, at 4:29 PM, Ricardo J. Parada wrote: On Jul 12, 2011, at 5:53 PM, Chuck Hill wrote: On Jul 12, 2011, at 2:45 PM, Ricardo J. Parada wrote: On Jul 12, 2011, at 4:52 PM, Chuck Hill wrote: Hi Ricardo, On Jul 12, 2011, at 1:35 PM, Ricardo J. Parada wrote: Does anybody have an idea what could be causing this problem? The user clicks on an AjaxModalDialogOpener which opens the dialog. Then the user does a whole bunch of stuff in the dialog that involves many clicks Does it still happen if they don't make so many clicks? If they make a few clicks then it works okay. then finally clicks a DONE link to close the dialog. Are all of these links and clicks Ajax actions? Yes, they are clicking on links generated by AjaxSubmitButton components to be exact. :-) And you are certain that there are no /wo/ or /wa/ requests mixed in here? I set this property in my Properties.dev: log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG and then I looked at all the uri's of the requests coming in. They have /ajax/ in there and when the dialog first comes up I see a few /_wr_/ and I guess the browser caches those since I don't see requests for those anymore on subsequent requests after the dialog is displayed. Those should be OK, they won't affect the page caches. All the requests for the many clicks I mentioned have /ajax/ in them. I don't see any /wo/ requests mixed in. Also I set a breakpoint in ERXAjaxSession.java at the only place it calls super.savePage() where I assume the current page would be saved but I never hit the breakpoint. I would think that regular component requests would be generating new context IDs and therefore saving the page in the cache for those context IDs. But I don't see the page getting saved. :-/ Yeah, that is what I would expect too. The dialog has a closeUpdateContainerID bound with the id of an ajax update container to refresh, which it does refresh upon closing the dialog. But then the user clicks on a link on the page that is outside the refreshed AjaxUpdateContainer and the app displays the error You backtracked too far. The application backtracking limit of 30 has been exceeded. Ajax links or regular component actions links? I do what seems to be the same thing (except maybe the does a whole bunch of stuff in the dialog) and have not had any problems. They are regular component action links. The context ID for which the page is being restored is 22. The original URL is 21? Well, I just put in there a wo:link string=test action=$test/ and by inspecting that link after I close the ajax modal dialog and the update container refreshes the href for the link is: http://192.168.1.9:53295/cgi-bin/WebObjects/Phynance.woa/wo/EmqPpwSYBiOiS7PPSLDXzw/8.0.0.9.1.1.13.1.5.1.2.1.1.3.51 and clicking that generates the You backtracked too far error. What is the context ID shown in the browser's location URL? The key to tracking this down is to know if it is the Ajax or the regular page cache that is missing the component. I'm stepping through the restorePageForContextID() in ERXAjaxSession.java but I'm not sure what to look for. Sorry, I just meant if the URL that caused the error was a /ajax/ or /wo/ URL. It sounds like a /wo/ URL so that suggests to me that something in your dialog is generating /wo/ or /wa/ requests that are pushing the page out of the standard page cache. I did not see any /wo/ nor /wa/ requests. They are all /ajax/ requests. Maybe I'll try to create a test Wonder app with an ajax modal dialog with a single ajax link in it that displays the current time when clicked... Then I can click it many many times. Then close the dialog and then click on a link on the page afterwards to see if I can reproduce. I'd be interested
Re: Dynamic loading of a component into a container?
I think the trick is twofold. One, you want to be able to control from some ajax link or links which component is loaded and do it on any page. Two, if you want to have component actions in the loaded component, you have to somehow put it in the context. I could be totally wrong, but those are the challenges I'd see doing it the normal way. John A. Larson Sent from my iPhone On Jun 10, 2011, at 11:43 AM, Theodore Petrosky tedp...@yahoo.com wrote: did you look at the ajaxexample? they are using a wo:AjaxUpdateContainer id = MainTableUC webobject name = Contents /wo:AjaxUpdateContainer Contents : WOComponentContent { } and in a hyperlink: webobject name = HelloWorldLinkHello Ajax World/webobject HelloWorldLink : WOHyperlink { pageName = HelloAjaxWorld; } it will load the page named HelloAjaxWorld. you can also use an action as in HelloWorldLink : WOHyperlink { action = loadHelloAjaxWorld; } and a method: public WOActionResults editInsertion() { HelloAjaxWorld nextpage = pageWithName(HelloAjaxWorld.class); // you can setup the next page here nextpage.setSomeVarHere(some text); return nextpage; } you could wrap the WOComponentContent in an AjaxUpdateContainer and update from code with: AjaxUpdateContainer.updateContainerWithID(MainTableUC, context()); -- Message: 7 Date: Thu, 09 Jun 2011 15:22:24 -0500 From: John Huss johnth...@gmail.com Subject: Re: Dynamic loading of a component into a container? To: Paul Dunkler paul.dunk...@xyrality.com Cc: WebObjects Development webobjects-dev@lists.apple.com Message-ID: banlktinr_mjdwc+eoej7htkhfefqjhq...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.comwrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com -- next part -- An HTML attachment was scrubbed... URL: http://lists.apple.com/pipermail/webobjects-dev/attachments/20110609/771b8a5d/attachment.html -- ___ Webobjects-dev mailing list Webobjects-dev@lists.apple.com http://lists.apple.com/mailman/listinfo/webobjects-dev End of Webobjects-dev Digest, Vol 8, Issue 383 ** ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dynamic loading of a component into a container?
If I get what you're asking, you want a div in your app template, say, that you can replace ad hoc from some other component. If so, I've done something similar by pushing the name of the component and a dictionary with bindings to the session dictionary, then in your template pull that name and binding dictionary out of the session, and use that to work a switchcomponent like chuck said that's in the auc. You just have to make sure your contained component knows what to do with your binding dictionary. Sorry if that's unclear. Typing on a rough bus ride one handed. John A. Larson Sent from my iPhone On Jun 9, 2011, at 3:26 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: At the moment i use the AjaxUpdateLink only to trigger a refresh on the AjaxUpdateContainer. In that AjaxUpdateContainer i defined some WOConditionals... But i want an AjaxUpdateLink to load the content of a component into an empty AjaxUpdateContainer... Am 09.06.2011 um 22:22 schrieb John Huss: Isn't this what AjaxUpdateContainer does? What is wrong with using it? On Thu, Jun 9, 2011 at 3:12 PM, Paul Dunkler paul.dunk...@xyrality.com wrote: Hey Guys, is there any possibility in wonder to load a component into a pre-defined zone in the template? I´m dealing with AjaxUpdateContainers and so on since 4 months - it´s nice - i like it, but i see no possibility to load something into an AjaxUpdateContainer... If there is any possibility or some of you may have a suggestion how to do this the good way in wonder - It would be very nice to hear from you. For exmaple: Main-Template: html head title /head body wo:AjaxUpdateZone id=testZone / /body /html Navigation-Template html head title /head body ul liwo:LoadComponentIntoZoneLink x=AddProductComponent zone=testZoneAdd Products/wo:LoadComponentIntoZoneLink /li /ul /body /html (the names of the components are chosen random by me ^^ just for showing you what behavior i want) Thanks in advance! Best Regards, Paul Dunkler ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: saving pdf's to the database
Tim, I don't know if you got this working yet, but I'm just trying to stick with you on this. The reason I skipped the db encoding path was that I assumed you were using the same system for db storage as your previously mentioned capability, namely storing PDFs generated with iText. If you can store those PDFs I assumed you could store any PDF. This made me think that perhaps your handoff of data somewhere between eof and the components, or perhaps just the components, was erroneous. To the end of isolating the problem, and forgive me if you have already, can you make the thing work by skipping the db and just hold the data in an instance variable in your eo instance when debugging? Specifically, if you skip the takestoredvalueforkey and just keep the data in an nsdata field does it work? This won't persist across sessions or object stores, but if you use the same eo while debugging can you get the file to display? JAL John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 4:47 PM, Tim Worman li...@thetimmy.com wrote: On Sep 23, 2009, at 2:43 PM, Chuck Hill wrote: On Sep 23, 2009, at 2:28 PM, Tim Worman wrote: Thanks for the response. In our case the files will always be pdf since we are requiring that as the format of the originating user's submission. I can definitely see the file size concern if the pdf is a big ole glorified image. Hopefully, most of the users will produce their pdf's by printing to pdf in mac os x (or acrobat on Windoze). I already had a component class that takes plain text blobs (logs) from the database, converts them to pdf, and presents them in a browser window. That class doesn't work on the blobs where the file was originated as pdf. How does it present the converted files? It implements iText but at some point I will be moving to PDFKit. I present the text as a PDF in a new window. The same thing should work with the PDF in a database. Right, but since it should already be a PDF, I don't need any translation or need for my iText implementation, correct? Yeah, just the present the text as a PDF in a new window part. So, I got concerned that maybe I was missing something saving the NSData. My database saves blobs to the file system so I tried reading one as a pdf and couldn't. Hence my question. That might be an artifact of your database (adding extra info). It could also be that there is some encoding/re- encoding happening that is scrambling the contents of the file. Which database are you using? I'm using OpenBase and I suspect what you're saying is right. It does cause some worry though since I don't have the review portion working yet. :-) You are certain it is a BLOB not a CLOB? How is the attribute modeled? I've modeled it as a blob, with the external type 'object.' OpenBase has a 'binary' type but it seems 'object' should be correct. I attached a screenshot. I don't think you did. :-) I am not sure which type is correct, or if both are. Chuck Damnit, I hate it when you're right even more than normal. Screenshot attached. Screen shot 2009-09-23 at 2.24.24 PM.png Tim I've assumed that I should just be able create a response that simply returns my NSData object and set the proper content- type. Am I on the right track? That is what I have always done in the past. It _should_ be simple and straightforward. Chuck On Sep 23, 2009, at 9:02 AM, John Kim Larson wrote: Hi Tim, We do this all the time with receiving reports, prints, etc. Since the component I use for upload handles any file type ( Word, images, PDF) I keep track of the file extension that the file was uploaded with in an attribute of my File entity. I then use that information to reconstitute the mime type when either embedding or downloading the file. There's not too much magic there, just a bunch of if elses to get the mime type from the extension. I can try to help you if that isn't enough info. Another gotcha is to make sure that your file size doesn't exceed the blob capacity. PDFs from text are fine, but if someone uploads a high res scanned file as a PDF, you will get an error either upon committing the change or upon trying to view the file. JAL John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 10:45 AM, Tim Worman li...@thetimmy.com wrote: WO'ers: I am writing an application where users can upload pdf files - which my app saves to the database. I also need to have mechanisms in place where a reviewer can browse the documents that have been uploaded. The upload and saving to the database seems to be working. This is modeled as 'blob' and the class type is 'NSData.' The files are uploaded via AjaxFileUpload. I have saved plain text files to the database before
Re: saving pdf's to the database
Hi Tim, We do this all the time with receiving reports, prints, etc. Since the component I use for upload handles any file type ( Word, images, PDF) I keep track of the file extension that the file was uploaded with in an attribute of my File entity. I then use that information to reconstitute the mime type when either embedding or downloading the file. There's not too much magic there, just a bunch of if elses to get the mime type from the extension. I can try to help you if that isn't enough info. Another gotcha is to make sure that your file size doesn't exceed the blob capacity. PDFs from text are fine, but if someone uploads a high res scanned file as a PDF, you will get an error either upon committing the change or upon trying to view the file. JAL John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 10:45 AM, Tim Worman li...@thetimmy.com wrote: WO'ers: I am writing an application where users can upload pdf files - which my app saves to the database. I also need to have mechanisms in place where a reviewer can browse the documents that have been uploaded. The upload and saving to the database seems to be working. This is modeled as 'blob' and the class type is 'NSData.' The files are uploaded via AjaxFileUpload. I have saved plain text files to the database before but I'm concerned that there is something more I need to do to save the pdf files. Are there special considerations for maintaining the mime type, continuity, etc. of these files before I save them as NSData to the database? Also, I am not sure how to present the files to the reviewer. I have converted text to pdf for viewing before but I'm stuck on reconstituting a pdf for display. If anyone has any pointers or code examples that would really help me as I'm under a serious time crunch. Tim UCLA GSEIS ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: saving pdf's to the database
That's all I do. Are you embedding the file in the page or having the response download the file as an attachment? John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 11:24 AM, Tim Worman li...@thetimmy.com wrote: John: Thanks for the response. In our case the files will always be pdf since we are requiring that as the format of the originating user's submission. I can definitely see the file size concern if the pdf is a big ole glorified image. Hopefully, most of the users will produce their pdf's by printing to pdf in mac os x (or acrobat on Windoze). I already had a component class that takes plain text blobs (logs) from the database, converts them to pdf, and presents them in a browser window. That class doesn't work on the blobs where the file was originated as pdf. So, I got concerned that maybe I was missing something saving the NSData. My database saves blobs to the file system so I tried reading one as a pdf and couldn't. Hence my question. I've assumed that I should just be able create a response that simply returns my NSData object and set the proper content-type. Am I on the right track? Thanks for your help. Tim On Sep 23, 2009, at 9:02 AM, John Kim Larson wrote: Hi Tim, We do this all the time with receiving reports, prints, etc. Since the component I use for upload handles any file type ( Word, images, PDF) I keep track of the file extension that the file was uploaded with in an attribute of my File entity. I then use that information to reconstitute the mime type when either embedding or downloading the file. There's not too much magic there, just a bunch of if elses to get the mime type from the extension. I can try to help you if that isn't enough info. Another gotcha is to make sure that your file size doesn't exceed the blob capacity. PDFs from text are fine, but if someone uploads a high res scanned file as a PDF, you will get an error either upon committing the change or upon trying to view the file. JAL John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 10:45 AM, Tim Worman li...@thetimmy.com wrote: WO'ers: I am writing an application where users can upload pdf files - which my app saves to the database. I also need to have mechanisms in place where a reviewer can browse the documents that have been uploaded. The upload and saving to the database seems to be working. This is modeled as 'blob' and the class type is 'NSData.' The files are uploaded via AjaxFileUpload. I have saved plain text files to the database before but I'm concerned that there is something more I need to do to save the pdf files. Are there special considerations for maintaining the mime type, continuity, etc. of these files before I save them as NSData to the database? Also, I am not sure how to present the files to the reviewer. I have converted text to pdf for viewing before but I'm stuck on reconstituting a pdf for display. If anyone has any pointers or code examples that would really help me as I'm under a serious time crunch. Tim UCLA GSEIS ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: saving pdf's to the database
Here's another do'oh question: are you sure the data is making it to the db from the upload? John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 11:24 AM, Tim Worman li...@thetimmy.com wrote: John: Thanks for the response. In our case the files will always be pdf since we are requiring that as the format of the originating user's submission. I can definitely see the file size concern if the pdf is a big ole glorified image. Hopefully, most of the users will produce their pdf's by printing to pdf in mac os x (or acrobat on Windoze). I already had a component class that takes plain text blobs (logs) from the database, converts them to pdf, and presents them in a browser window. That class doesn't work on the blobs where the file was originated as pdf. So, I got concerned that maybe I was missing something saving the NSData. My database saves blobs to the file system so I tried reading one as a pdf and couldn't. Hence my question. I've assumed that I should just be able create a response that simply returns my NSData object and set the proper content-type. Am I on the right track? Thanks for your help. Tim On Sep 23, 2009, at 9:02 AM, John Kim Larson wrote: Hi Tim, We do this all the time with receiving reports, prints, etc. Since the component I use for upload handles any file type ( Word, images, PDF) I keep track of the file extension that the file was uploaded with in an attribute of my File entity. I then use that information to reconstitute the mime type when either embedding or downloading the file. There's not too much magic there, just a bunch of if elses to get the mime type from the extension. I can try to help you if that isn't enough info. Another gotcha is to make sure that your file size doesn't exceed the blob capacity. PDFs from text are fine, but if someone uploads a high res scanned file as a PDF, you will get an error either upon committing the change or upon trying to view the file. JAL John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 23, 2009, at 10:45 AM, Tim Worman li...@thetimmy.com wrote: WO'ers: I am writing an application where users can upload pdf files - which my app saves to the database. I also need to have mechanisms in place where a reviewer can browse the documents that have been uploaded. The upload and saving to the database seems to be working. This is modeled as 'blob' and the class type is 'NSData.' The files are uploaded via AjaxFileUpload. I have saved plain text files to the database before but I'm concerned that there is something more I need to do to save the pdf files. Are there special considerations for maintaining the mime type, continuity, etc. of these files before I save them as NSData to the database? Also, I am not sure how to present the files to the reviewer. I have converted text to pdf for viewing before but I'm stuck on reconstituting a pdf for display. If anyone has any pointers or code examples that would really help me as I'm under a serious time crunch. Tim UCLA GSEIS ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Very interesting case
I've been following your thread and will throw this out at you. I write a lot of components that have to broken up into different forms for layout and continuity purposes, just like you are if you're using a batch nav bar. It is quite a pain to have submit buttons all over the place. Using Ajax observers and submitting the form automatically on a change can make the ui experience much better. You still have to PAY ATTENTION to what you are doing re validation etc. but it can make it easier. So you can observe your other form data and automatically submit it to get it in your component code but make it seemless when you proceed to the next batch. JAL John A. Larson President Precision Instruments, Inc. Ph: 847-824-4194 Fax: 866-240-7104 Sent from my iPhone On Sep 22, 2009, at 2:23 PM, Don Lindsay pccd...@mac.com wrote: It is using the WONavigationBar component from WOExtensions. It is a hyperlink, inside that control. Don On Sep 22, 2009, at 12:22 PM, Chuck Hill wrote: On Sep 22, 2009, at 2:32 AM, Don Lindsay wrote: Hello; I have a displayGroup displaying batches of 5 items per page. When a user clicks the next page, What is clicks the next page? If it is a WOHyperlink then the form values will not get submitted. You need to use a WOSubmitButton to send what the user entered to the app. Chuck which uses displayNextBatch() for the display group, if the user goes back to the previous page, all of their answers have been cleared as if they never entered anything. If I use a WOSubmit button to submit the changes and use saveChanges on the EO everything stays selected. But should a user be required to do this everytime they go to another batch? Is there something I can do to retain selected values across batches for when a user returns to the page, without issuing a savechanges via a WOSubmit? This is a very vanilla form, no code that is manipulating the EO objects, it is all done through WO Controls ,WORepetitions, and display groups. Thanks Don On Sep 21, 2009, at 10:45 PM, Chuck Hill wrote: On Sep 21, 2009, at 2:16 PM, Don Lindsay wrote: I know, I have been piddling with it and probably violated many commandments. That is not something that you can do and expect sane results. It is a binary sort of thing. Either you lock correctly and obey the commandments, or EOF.doCrazyThingsAtRandom(true). Your call. You seem to have found a work around, but that does not address why the EO was not getting saved. I strongly suspect that you have a latent bug lurking in the background. Chuck Let me explain what I am doing and see if anyone has any insight. I have a datamodel with the following: Users (identifier Integer, username string, password string) Pages (identifier Integer, PageDescription string, active integer, position Integer) Questions (identifier integer, questiontext string, pageidentifier integer, active integer) Question Lookup Values (identifier, descriptivetext string, active integer) UserAnswers(identifier integer, useridentifier integer, questionidentifier integer, answeridentifier integer) Pretty simple. A user can access any page, any question on a page, and answer a question only once. So I created an entity: useranswers ( User, Question, Answer(would contain a question lookup) ) Pages can have one or more questions, Questions can have zero or more Question Lookup Values. More than one question can relate to a question lookup value. So the relationship looks like this: Pages -- Questions -- Lookup Values User -- UserAnswers -- Question So what I have done is create a component that takes a User as a property when it is created setUser(...). I then created a WODisplayGroup for Pages with no detail. I then created a WODisplayGroup for Questions with detail pointing to pages. I then created a WODisplayGroup for UserAnswers with detail pointing to questions. The issue I have with the UserAnswers displaygroup is that it also requires a qualification to a User as well as a question. N problemo, I use the queryMatch().setValueForKey (theUserObject,theUser). Now here is where I run into issues, Question.theAnswers relationship returns an NSArray because it is a to-many. How do I bind this to the selection property of a WOPopupButton, I can't that I know of. Violation of every commandment known occurs here Don On Sep 21, 2009, at 4:31 PM, Chuck Hill wrote: On Sep 21, 2009, at 1:17 PM, Don Lindsay wrote: Hello; I have a component that I am updating a table of answers based on selections made by the user from a worepitition. The code being executed is: try { String sEoQualifierText = page=; sEoQualifierText += Integer.toString((Integer) thePage().valueForKey(identifier)); sEoQualifierText += and question=; sEoQualifierText += Integer.toString((Integer)