Re: D2W edit embedded buttons?
And Voodoo. Don't forget the Voodoo. Sent from my iPhone On Mar 8, 2013, at 1:48 AM, David Holt programming...@mac.com wrote: LOGIC is your friend in D2W :-) On 2013-03-07, at 9:46 AM, Jesse Tayler jtay...@oeinc.com wrote: ok, but you're scaring me! rules are tricky, so just make sure the scientific method is behind your assumptions or you might get mislead-- I mean, I can't figure what apache ownership might have to do with a rule cache, so I'd take a second look after you've had some sleep is all. good luck! On Mar 7, 2013, at 12:30 PM, Theodore Petrosky tedp...@yahoo.com wrote: thanks, I am having a problem with rules updating correctly. I finally fixed my issue of running through apache. I had to make sure that apache was running as the same user that I am working in or apache will not use the link from the document root to the build folder. but now it sometimes doesn't like it when I make a rule change. even after I clear the rule cache they don't seem to be used. I actually have to stop and start my app. I'll see later. I am just glad to start to understand some of this. Ted --- On Thu, 3/7/13, Jesse Tayler jtay...@oeinc.com wrote: From: Jesse Tayler jtay...@oeinc.com Subject: Re: D2W edit embedded buttons? To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects Development webobjects-dev@lists.apple.com Date: Thursday, March 7, 2013, 11:52 AM are you certain your rule is in fact firing above any other? On Mar 7, 2013, at 11:43 AM, Theodore Petrosky tedp...@yahoo.com wrote: I have a to-many on my D2W edit page. if I read this correctly it is rendered with a ERMODEditRelationshipPage. I see on this page, some conditionals: webobject name = ShowFind liwebobject name = QueryButton //li /webobject ShowFind: WOConditional { condition = d2wContext.shouldShowQueryRelatedButton; } I can't seem to write a rule that turns off this button. shouldn't this work: 100 : pageConfiguration = 'EditRelationshipEmbeddedPWOMileStone' = shouldShowQueryRelatedButton = false [com.webobjects.directtoweb.Assignment] basically I want to remove the Search button on the to-many section of an edit page. ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com This email sent to jtay...@oeinc.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: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@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: https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com This email sent to webobje...@avendasora.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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: D2W edit embedded buttons?
I fear software voodoo. On Mar 8, 2013, at 3:34 AM, David Avendasora webobje...@avendasora.com wrote: And Voodoo. Don't forget the Voodoo. Sent from my iPhone On Mar 8, 2013, at 1:48 AM, David Holt programming...@mac.com wrote: LOGIC is your friend in D2W :-) On 2013-03-07, at 9:46 AM, Jesse Tayler jtay...@oeinc.com wrote: ok, but you're scaring me! rules are tricky, so just make sure the scientific method is behind your assumptions or you might get mislead-- I mean, I can't figure what apache ownership might have to do with a rule cache, so I'd take a second look after you've had some sleep is all. good luck! On Mar 7, 2013, at 12:30 PM, Theodore Petrosky tedp...@yahoo.com wrote: thanks, I am having a problem with rules updating correctly. I finally fixed my issue of running through apache. I had to make sure that apache was running as the same user that I am working in or apache will not use the link from the document root to the build folder. but now it sometimes doesn't like it when I make a rule change. even after I clear the rule cache they don't seem to be used. I actually have to stop and start my app. I'll see later. I am just glad to start to understand some of this. Ted --- On Thu, 3/7/13, Jesse Tayler jtay...@oeinc.com wrote: From: Jesse Tayler jtay...@oeinc.com Subject: Re: D2W edit embedded buttons? To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects Development webobjects-dev@lists.apple.com Date: Thursday, March 7, 2013, 11:52 AM are you certain your rule is in fact firing above any other? On Mar 7, 2013, at 11:43 AM, Theodore Petrosky tedp...@yahoo.com wrote: I have a to-many on my D2W edit page. if I read this correctly it is rendered with a ERMODEditRelationshipPage. I see on this page, some conditionals: webobject name = ShowFind liwebobject name = QueryButton //li /webobject ShowFind: WOConditional { condition = d2wContext.shouldShowQueryRelatedButton; } I can't seem to write a rule that turns off this button. shouldn't this work: 100 : pageConfiguration = 'EditRelationshipEmbeddedPWOMileStone' = shouldShowQueryRelatedButton = false [com.webobjects.directtoweb.Assignment] basically I want to remove the Search button on the to-many section of an edit page. ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com This email sent to jtay...@oeinc.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: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@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: https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com This email sent to webobje...@avendasora.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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Sending POST request to external host
Hi, I have a component that generates some XML data. Works fine. Now I need to upload that XML data via a POST to some remote server. How would I do that? Here is the code I use, but somehow the remote server chokes with the contents I send it. When I let the frameworks return the XML to my browser everything looks good. I suspect that my packaging the XML into a request somehow corrupts it. Or maybe there are some headers missing. This is a direct action that returns what I want: try { Product product = (Product)products.objectAtIndex( 0 ); // Product is an EO TransferXMLGenerator generator = (TransferXMLGenerator)pageWithName( TransferXMLGenerator.class); generator.setProduct( product ); } catch (Exception e) { System.out.println(e.getMessage()); } return generator; And this is the code that generates the XML and then directly uploads it to the remote host: TransferXMLGenerator generator = (TransferXMLGenerator)pageWithName( TransferXMLGenerator.class); generator.setProduct( product ); WOResponse generatorResponse = generator.generateResponse(); NSData xml = generatorResponse.content(); // *** I assume that XML now is the very same as is returned to the browser in the case of the direct action above // *** This assumption might be wrong // send XML data to front end Application application = (Application)Application.application(); WORequest request = new WORequest(POST, application.mondPath(), HTTP/1.0, null, xml, null); BASE64Encoder enc = new BASE64Encoder(); String authHeaderContent = Basic + enc.encode((mondUser +: + mondPasswd).getBytes()); request.setHeader( authHeaderContent, Authorization ); request.setHeader(application.mondHost(), host); request.setHeader(Java/1.6, user-agent); WOHTTPConnection connection = new WOHTTPConnection(application.mondHost(), application.mondPort()); messages.append( \nConnection = + connection.toString()); if (connection.sendRequest( request )) { WOResponse frontendResponse = connection.readResponse(); The problem is that when I send the direct action generated XML by hand, outside of my app, with the help of an upload tool (custom tool, not under my control, no source available), the remote server is happy, whereas when I send it via the second part above, directly from my app, the remote server accepts my data but then complains that there are some structural problems with the data. So, the communication works, but obviously the data sent differs in those two cases. Any idea? Is WOHTTPConnection and WORequest the right thing to use here? Am I using it right? Thanks for any help. ---markus--- ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Sending POST request to external host
Hi Markus, Give Apache HttpComponents a try - http://hc.apache.org/httpcomponents-client-ga/index.html You'll be much happier. Regards, Bogdan Zlatanov On 8 Mar 2013, at 18:11, Markus Ruggiero wrote: Hi, I have a component that generates some XML data. Works fine. Now I need to upload that XML data via a POST to some remote server. How would I do that? Here is the code I use, but somehow the remote server chokes with the contents I send it. When I let the frameworks return the XML to my browser everything looks good. I suspect that my packaging the XML into a request somehow corrupts it. Or maybe there are some headers missing. This is a direct action that returns what I want: try { Product product = (Product)products.objectAtIndex( 0 ); // Product is an EO TransferXMLGenerator generator = (TransferXMLGenerator)pageWithName( TransferXMLGenerator.class); generator.setProduct( product ); } catch (Exception e) { System.out.println(e.getMessage()); } return generator; And this is the code that generates the XML and then directly uploads it to the remote host: TransferXMLGenerator generator = (TransferXMLGenerator)pageWithName( TransferXMLGenerator.class); generator.setProduct( product ); WOResponse generatorResponse = generator.generateResponse(); NSData xml = generatorResponse.content(); // *** I assume that XML now is the very same as is returned to the browser in the case of the direct action above // *** This assumption might be wrong // send XML data to front end Application application = (Application)Application.application(); WORequest request = new WORequest(POST, application.mondPath(), HTTP/1.0, null, xml, null); BASE64Encoder enc = new BASE64Encoder(); String authHeaderContent = Basic + enc.encode((mondUser +: + mondPasswd).getBytes()); request.setHeader( authHeaderContent, Authorization ); request.setHeader(application.mondHost(), host); request.setHeader(Java/1.6, user-agent); WOHTTPConnection connection = new WOHTTPConnection(application.mondHost(), application.mondPort()); messages.append( \nConnection = + connection.toString()); if (connection.sendRequest( request )) { WOResponse frontendResponse = connection.readResponse(); The problem is that when I send the direct action generated XML by hand, outside of my app, with the help of an upload tool (custom tool, not under my control, no source available), the remote server is happy, whereas when I send it via the second part above, directly from my app, the remote server accepts my data but then complains that there are some structural problems with the data. So, the communication works, but obviously the data sent differs in those two cases. Any idea? Is WOHTTPConnection and WORequest the right thing to use here? Am I using it right? Thanks for any help. ---markus--- ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/bogdan.zlatanov%40gmail.com This email sent to bogdan.zlata...@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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WOCommunity Store
Hi everyone, I'm closing the WOCommunity Store in five minutes (so by the time you read this, it will already be down). It will be re-opened next week as a Shopify-powered store that will sells WOWODC tickets and membership. Thanks. ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: D2W edit embedded buttons?
Not *actual* voodoo, just logic obscured in opacity. So that makes it OK. D On 2013-03-08, at 11:20 AM, Jesse Tayler jtay...@oeinc.com wrote: I fear software voodoo. On Mar 8, 2013, at 3:34 AM, David Avendasora webobje...@avendasora.com wrote: And Voodoo. Don't forget the Voodoo. Sent from my iPhone On Mar 8, 2013, at 1:48 AM, David Holt programming...@mac.com wrote: LOGIC is your friend in D2W :-) On 2013-03-07, at 9:46 AM, Jesse Tayler jtay...@oeinc.com wrote: ok, but you're scaring me! rules are tricky, so just make sure the scientific method is behind your assumptions or you might get mislead-- I mean, I can't figure what apache ownership might have to do with a rule cache, so I'd take a second look after you've had some sleep is all. good luck! On Mar 7, 2013, at 12:30 PM, Theodore Petrosky tedp...@yahoo.com wrote: thanks, I am having a problem with rules updating correctly. I finally fixed my issue of running through apache. I had to make sure that apache was running as the same user that I am working in or apache will not use the link from the document root to the build folder. but now it sometimes doesn't like it when I make a rule change. even after I clear the rule cache they don't seem to be used. I actually have to stop and start my app. I'll see later. I am just glad to start to understand some of this. Ted --- On Thu, 3/7/13, Jesse Tayler jtay...@oeinc.com wrote: From: Jesse Tayler jtay...@oeinc.com Subject: Re: D2W edit embedded buttons? To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects Development webobjects-dev@lists.apple.com Date: Thursday, March 7, 2013, 11:52 AM are you certain your rule is in fact firing above any other? On Mar 7, 2013, at 11:43 AM, Theodore Petrosky tedp...@yahoo.com wrote: I have a to-many on my D2W edit page. if I read this correctly it is rendered with a ERMODEditRelationshipPage. I see on this page, some conditionals: webobject name = ShowFind liwebobject name = QueryButton //li /webobject ShowFind: WOConditional { condition = d2wContext.shouldShowQueryRelatedButton; } I can't seem to write a rule that turns off this button. shouldn't this work: 100 : pageConfiguration = 'EditRelationshipEmbeddedPWOMileStone' = shouldShowQueryRelatedButton = false [com.webobjects.directtoweb.Assignment] basically I want to remove the Search button on the to-many section of an edit page. ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com This email sent to jtay...@oeinc.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: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@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: https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com This email sent to webobje...@avendasora.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: https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com This email sent to dleber_wo...@codeferous.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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
ERRest and returning an Array of dictionaries
Greetings I am trying to return a list of the primary keys of a toMany relationship on an EO. I've written a method on the EO to put the keys into NSMutableDictionaries and added them an NSMutableArray. I then return the array to my rest controller. This is NOT working as I would have expected. What am I missing and is there a video that I should watched? Thanks Paul ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERRest and returning an Array of dictionaries
On 09/03/2013, at 8:11 AM, Paul Yu wrote: Greetings I am trying to return a list of the primary keys of a toMany relationship on an EO. I've written a method on the EO to put the keys into NSMutableDictionaries and added them an NSMutableArray. I then return the array to my rest controller. This is NOT working as I would have expected. What am I missing and is there a video that I should watched? Thanks Paul Hi Paul, Maybe I'm not fully understanding your requirement, but can you not just create a custom filter in your 'owner' controller, say CompanyController: public static ERXKeyFilter someRelationshipFilter(){ ERXKeyFilter filter = ERXKeyFilter.filterWithNone(); filter.include(Company.EMPLOYEES).include(Employee.PK_CUSTOM_KEY); return filter; } where a Company has many Employee objects, and in Employee.java: public static final ERKKeyString PK_CUSTOM_KEY = new ERKKeyString(primaryKey); Or is that barking up the wrong tree? Do you need the ids to be flattened in the response graph, or (in this case) the Employee element _not_ to be emitted? I think you'd get the id attribute for free in the graph here anyway. Cheers, -- Matt. http://logicsquad.net/ ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERRest and returning an Array of dictionaries
you are making things too hard? fetch your array, and return your objects with a filter that allows only what you want to send. only want to return the object id's? well, that should just work as far as I'm aware - On Mar 8, 2013, at 4:11 PM, Paul Yu p...@mac.com wrote: Greetings I am trying to return a list of the primary keys of a toMany relationship on an EO. I've written a method on the EO to put the keys into NSMutableDictionaries and added them an NSMutableArray. I then return the array to my rest controller. This is NOT working as I would have expected. What am I missing and is there a video that I should watched? Thanks Paul ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com This email sent to jtay...@oeinc.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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Need Information on Integrating Web Objects with Hibernate
Hi All, I am completely new to WebObjects and I have gone through the WebObjects Community for the basic information and I successfully ran sample webObjecs application in windows using Eclipse.But I wanted to try out more things like integrating with Hibernate and Spring.This weekend I am going to try a simple JDBC connectivity.Can anyone tell me is it possible to integrating WebObject with Hibernate and If Yes,Please refer some Documents regarding this. Thanks, srinivas ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Need Information on Integrating Web Objects with Hibernate
I don't know why you would use either one. WebObjects is not J2EE. Part of WebObjects is EOF which does a similar job to what Hibernate does. Chuck On 2013-03-08, at 7:42 PM, miriyala srinivas wrote: Hi All, I am completely new to WebObjects and I have gone through the WebObjects Community for the basic information and I successfully ran sample webObjecs application in windows using Eclipse.But I wanted to try out more things like integrating with Hibernate and Spring.This weekend I am going to try a simple JDBC connectivity.Can anyone tell me is it possible to integrating WebObject with Hibernate and If Yes,Please refer some Documents regarding this. Thanks, srinivas ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Executive Managing Partner, VP Development and Technical Services Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/practical_webobjects Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine! ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com