Re: component advise?
So you have Inventory -qty -cost -msrp ->>lineItems LineItem -cost -msrp ->inventory You could set that up as a wizard creation page, something like pageConfiguration = ‘CreateLineItem’ => displayPropertyKeys = (“[chooseInventory]”,”inventory”,”[editValues]”,”cost”,”msrp") Such that you have to choose the inventory item and then proceed with editing the other values. Then do the validationKeys thing for Modern to copy your values. (In ponder, you’d override the _nextStep method on your subclass of R2DDefaultBranchDelegate.) Then on save, you could adjust your inventory quantity in willInsert.. or maybe not. I don’t remember if willInsert is called a second time after a validation failure. (Or in ponder, you could override _save on your subclass of R2DDefaultBranchDelegate.) On Sep 19, 2014, at 12:42 PM, Theodore Petrosky wrote: > I need to use a "select from inventory” kind of component. I have inventory > that has some attributes (quantity on hand, sell price, purchase price, etc). > > I want to present the user with a popup that lists the inventory (obviously > this is a rather short list). When you select an inventory object, the > pertinent attributes are copied to the line item entity. I want to copy these > attributes to the line item as I may want to adjust (override) the values on > a single report. Or if the purchase price of an inventory item changes, i do > not want old reports (invoices) to show these new values. > > I am using this as an example to show a perspective client, and to push > myself to learn more D2W. I think if I were in a regular wonder app, I could > cobble something together, but I want to learn more in D2W. > > Ted > ___ > 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/rgurley%40smarthealth.com > > This email sent to rgur...@smarthealth.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
component advise?
I need to use a "select from inventory” kind of component. I have inventory that has some attributes (quantity on hand, sell price, purchase price, etc). I want to present the user with a popup that lists the inventory (obviously this is a rather short list). When you select an inventory object, the pertinent attributes are copied to the line item entity. I want to copy these attributes to the line item as I may want to adjust (override) the values on a single report. Or if the purchase price of an inventory item changes, i do not want old reports (invoices) to show these new values. I am using this as an example to show a perspective client, and to push myself to learn more D2W. I think if I were in a regular wonder app, I could cobble something together, but I want to learn more in D2W. Ted ___ 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: WOResponse 200 OK
Thanks Dennis, >So clients should never care about the textual response part and you should be good, just the status code (which should be valid for Google Wallet as well). >Of course in practice there are (as with most web protocols these days) implementations, that do not fully adhere to the standards… I think i have to wait for answer from GW forum >Maybe your issue arises, because you also add the string “HTTP/1.0 200 OK” to the actual response content body? I did remove the line as well as the simplest "return new WOResponse();" but GW don't like it ! ___ 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: WOResponse 200 OK
Thanks Pascal, I try it as well with : return new WOResponse(); // supposed to be 200 OK But Google Wallet rejects is the same way Pierre Le 19. 09. 14 10:10, Pascal Robert a écrit : Why aren't you using WOResponse instead of your custom class? Envoyé de mon iPhone Le 2014-09-19 à 03:12, Pierre Gilquin a écrit : Hi WO people, I try to send a 200 OK response with this code from WOPaypal framework private static class HTTPStatusResponse extends WOResponse { public static void setResponse( WOResponse response, int statusInt, String statusString ) { String contentString = "HTTP/1.0 "+statusInt+" "+statusString; response.appendContentString( contentString ); response.setHeader( ""+contentString.length(), "content-length" ); response.setHeader( "text/html", "content-type" ); response.setStatus( statusInt ); } public HTTPStatusResponse( int statusInt, String statusString ) { super(); HTTPStatusResponse.setResponse( this, statusInt, statusString ); } } private static class OKResponse extends HTTPStatusResponse { public OKResponse() { super( 200, "OK" ); } } This code works for paypal but I try to use it with Google Wallet but it's not working. The answer is HTTP/1.1 200 Apple instead of OK ! Can that be the problem and how can I change that ? Thanks in advance Pierre ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ 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: WOResponse 200 OK
Why aren't you using WOResponse instead of your custom class? Envoyé de mon iPhone > Le 2014-09-19 à 03:12, Pierre Gilquin a écrit : > > Hi WO people, > > > I try to send a 200 OK response with this code from WOPaypal framework > > >private static class HTTPStatusResponse extends WOResponse { >public static void setResponse( WOResponse response, int statusInt, > String statusString ) { >String contentString = "HTTP/1.0 "+statusInt+" "+statusString; >response.appendContentString( contentString ); >response.setHeader( ""+contentString.length(), "content-length" ); >response.setHeader( "text/html", "content-type" ); >response.setStatus( statusInt ); >} >public HTTPStatusResponse( int statusInt, String statusString ) { >super(); >HTTPStatusResponse.setResponse( this, statusInt, statusString ); >} >} > >private static class OKResponse extends HTTPStatusResponse { >public OKResponse() { >super( 200, "OK" ); >} >} > > This code works for paypal but I try to use it with Google Wallet but it's > not working. > > The answer is > HTTP/1.1 200 Apple > instead of OK ! > > Can that be the problem and how can I change that ? > > > Thanks in advance > > > Pierre > ___ > 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/probert%40macti.ca > > This email sent to prob...@macti.ca ___ 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: WOResponse 200 OK
Hi, I think you shouldn’t need to add the HTTP header on your own, WO already does that for you. On 19.09.2014, at 09:12, Pierre Gilquin wrote: > The answer is > HTTP/1.1 200 Apple > instead of OK ! > > Can that be the problem and how can I change that ? In theory a correct implementation of the standard shouldn’t mind (http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1): > The Status-Code element is a 3-digit integer result code of the attempt to > understand and satisfy the request. These codes are fully defined in section > 10. The Reason-Phrase is intended to give a short textual description of the > Status-Code. The Status-Code is intended for use by automata and the > Reason-Phrase is intended for the human user. The client is not required to > examine or display the Reason- Phrase. > and further down > The individual values of the numeric status codes defined for HTTP/1.1, and > an example set of corresponding Reason-Phrase's, are presented below. The > reason phrases listed here are only recommendations -- they MAY be replaced > by local equivalents without affecting the protocol. So clients should never care about the textual response part and you should be good, just the status code (which should be valid for Google Wallet as well). Of course in practice there are (as with most web protocols these days) implementations, that do not fully adhere to the standards… Maybe your issue arises, because you also add the string “HTTP/1.0 200 OK” to the actual response content body? Greetings Dennis ___ 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
WOResponse 200 OK
Hi WO people, I try to send a 200 OK response with this code from WOPaypal framework private static class HTTPStatusResponse extends WOResponse { public static void setResponse( WOResponse response, int statusInt, String statusString ) { String contentString = "HTTP/1.0 "+statusInt+" "+statusString; response.appendContentString( contentString ); response.setHeader( ""+contentString.length(), "content-length" ); response.setHeader( "text/html", "content-type" ); response.setStatus( statusInt ); } public HTTPStatusResponse( int statusInt, String statusString ) { super(); HTTPStatusResponse.setResponse( this, statusInt, statusString ); } } private static class OKResponse extends HTTPStatusResponse { public OKResponse() { super( 200, "OK" ); } } This code works for paypal but I try to use it with Google Wallet but it's not working. The answer is HTTP/1.1 200 Apple instead of OK ! Can that be the problem and how can I change that ? Thanks in advance Pierre ___ 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