Re: Database Design - Multiple locations
It does not always point to city and that is what is throwing me off. They do haphazardly point to different different locations. Thanks, Frank Cobia On Apr 20, 2008, at 11:05 PM, James Cicenia wrote: Does your data haphazardly point to any location? Or does it point always to city (the most discreet) which is hierarchical down from Country? If that is the case just point it to city and you will have access to all the other locations as they would all be joined in to-one relationship up the tree. Otherwise, maybe have an intermediary object that has a type attribute. HTH James Cicenia On Apr 20, 2008, at 8:15 PM, Mr. Frank Cobia wrote: I have a database design question. I am posting it to the WebObjects list because I am building a WebObjects app and want a solution that works well for EOF. I have a table of data that has to have a location associated with it. Unfortunately the level of the location is not constant. The data can be associated with a Country, Region, State, Metro Area, County or City. Each of those levels is its own table with relationships pointing to the related locations. i.e. a State knows which Region it belongs to and which Metro Areas belong to it. I have been unable to come up with a design that seems elegant. I have thought of having 6 separate relationships to each of the location levels, but it seems to duplicate data and the data could get out of sync if a state is moved to a different region or a City is moved to a different county. Has anyone had a situation like this and come up with a good solution? Thanks, Frank Cobia ___ 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/james%40jimijon.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Database Design - Multiple locations
Why not model all the different location types with an abstract parent (like 'Location'), and then relate from your data object to the abstract 'Location' class? Something like this: Class/entity hierarchy: Location : City Location : State Location : Country Location : Region City could have a relationship 'parent' that relates to a State (concrete subclass of Location) or it could even have a relationship to 'Location' in case a city can be in a state (for the US) or a Region... etc. Hard to say since I don't know what your city table looks like. Since you have a single table for each location type, this would generate 6 queries when faulting the Location abstract entity, but at least it would be elegant. For the to-one relationships, you could include information in your primary key that would allow you to decide the table through delegate methods. If your data set is reasonably sized, most used objects and relationships would end up in memory anyway. Ken On Apr 21, 2008, at 3:33 AM, Mr. Frank Cobia wrote: It does not always point to city and that is what is throwing me off. They do haphazardly point to different different locations. Thanks, Frank Cobia On Apr 20, 2008, at 11:05 PM, James Cicenia wrote: Does your data haphazardly point to any location? Or does it point always to city (the most discreet) which is hierarchical down from Country? If that is the case just point it to city and you will have access to all the other locations as they would all be joined in to-one relationship up the tree. Otherwise, maybe have an intermediary object that has a type attribute. HTH James Cicenia On Apr 20, 2008, at 8:15 PM, Mr. Frank Cobia wrote: I have a database design question. I am posting it to the WebObjects list because I am building a WebObjects app and want a solution that works well for EOF. I have a table of data that has to have a location associated with it. Unfortunately the level of the location is not constant. The data can be associated with a Country, Region, State, Metro Area, County or City. Each of those levels is its own table with relationships pointing to the related locations. i.e. a State knows which Region it belongs to and which Metro Areas belong to it. I have been unable to come up with a design that seems elegant. I have thought of having 6 separate relationships to each of the location levels, but it seems to duplicate data and the data could get out of sync if a state is moved to a different region or a City is moved to a different county. Has anyone had a situation like this and come up with a good solution? Thanks, Frank Cobia ___ 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/james%40jimijon.com This email sent to [EMAIL PROTECTED] ___ 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/kenlists%40anderhome.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: WOFileUpload
I like the idea of this approach, but maybe I'm not understanding you completely. If I change my html to not use WOFileUpload and instead just upload like a normal file-upload: Browse file: input name=fileName type=file brwebobject name=SubmitButton/ --- SubmitButton: WOSubmitButton { action = submit; value = Upload File; } Then it seems like I'm still reading in all the data before I even get to my takeValuesFromRequest. In fact when I get to larger files (~ 500MB - 1.0GB) I don't even get to the takeValuesFromRequest and something else goes wonky. Is this how you meant to implement this? Or am I missing another web-objecty way to grab the file name information. Thanks, On Fri, Apr 18, 2008 at 7:55 PM, Asa Hardcastle [EMAIL PROTECTED] wrote: Hi Sirius, This approach does not solve reading _any_ data from the wire, but it will cut the user short if a limit is exceeded; use WOMultipartIterator instead of a WOFileUpload. (In takeValuesFromRequest or inside of a direct action, ) first check the header and dump out if it is too big (although it does not give much insight if you have multiple files): request.headerForKey(content-length) ... and if the header is lying! That dirty rascal!! grab the multipart iterator WOMultipartIterator multipartIterator = request.multipartIterator(); Loop through the formdata calling multipartIterator.nextFormData() WOMultipartIterator.WOFormData formData = multipartIterator.nextFormData(); Test for a file input: formData.isFileUpload() If it is a file upload, grab the name and the stream formData.name() InputStream in = formData.formDataInputStream() Now write the stream to disk manually, reading into a buffer and writing to an output stream, keeping track of how many bytes you have written and dumping out if you exceed the limit. Something like this should work: byte[] buff = new byte[25600]; int b_total = 0, b_read = in.read(buff); OutputStream out = new FileOutputStream(/tmp/maybearealybigfile); while(-1 != b_read) { b_total += b_read; if(b_total MY_MAX_BYTES) { ... close output stream and delete the partial file from disk ... break; } out.write(buff, 0, b_read); b_read = in.read(buff); } ... close your streams if they are open ... http://developer.apple.com/documentation/DeveloperTools/Reference/WO541Reference/com/webobjects/appserver/WOMultipartIterator.html hope this helps, :) asa On Apr 18, 2008, at 8:10 PM, sirius black wrote: I'm trying to verify the size of a file upload and limit its upload before actually sending any data across the wire. I know I can check the content-length header early on in the game in dispatchRequest, but even if I just throw a RuntimeException at that point, I can't stop WebObjects from reading in the data anyways, before sending back a response. I'm using WOFileUpload with streamToFilePath. Fwiw, I've looked into javascript validation to try and check the content-length client side first, but haven't had success with that. Thoughts? ___ 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/a.talk%40zenn.net This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: WOFileUpload
I'd love to see what you've done. Generally I don't add much Flash, but sometimes it's the right tool for the job. Thanks. On Sat, Apr 19, 2008 at 8:05 AM, Joshua Paul [EMAIL PROTECTED] wrote: I've created a component that uses Flash (SWFUpload) to accomplish what you're trying to do. If you're okay with adding Flash to your app, I'll gladly pass it along. I'm trying to verify the size of a file upload and limit its upload before actually sending any data across the wire. I know I can check the content-length header early on in the game in dispatchRequest, but even if I just throw a RuntimeException at that point, I can't stop WebObjects from reading in the data anyways, before sending back a response. I'm using WOFileUpload with streamToFilePath. Fwiw, I've looked into javascript validation to try and check the content-length client side first, but haven't had success with that. Thought` -- Josh Paul [EMAIL PROTECTED] twitter: joshpaul linkedin: joshpaul NOTICE: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. ___ 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 [EMAIL PROTECTED]
Re: Out of memory
Yes, I've seen it with MySQL. We still get it now, but very very rarely. Simon On 21 Apr 2008, at 02:35, Lachlan Deck wrote: Hi there, has anyone seen this before? Is it just coincidental? Usually when I see OutOfMemoryErrors it's due to some infinite loop or some bug... WO5.3.3, Mysql jconnector 5.0.6 com.webobjects.foundation.NSForwardException for java.lang.OutOfMemoryError: Java heap space at java.lang.StringCoding.trim(StringCoding.java:74) at java.lang.StringCoding.access$100(StringCoding.java:37) at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:201) at java.lang.StringCoding.decode(StringCoding.java:228) at java.lang.String.init(String.java:405) at java.lang.String.init(String.java:433) at com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:5674) at com.mysql.jdbc.ResultSet.getString(ResultSet.java:5544) at com.webobjects.jdbcadaptor.JDBCColumn._fetchText(JDBCColumn.java: 205) at com .webobjects .jdbcadaptor.JDBCColumn._fetchCorrectObject(JDBCColumn.java:217) at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:319) at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java: 307) at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java: 1406) at com .webobjects .eoaccess.EODatabaseChannel._fetchObject(EODatabaseChannel.java:302) at com .webobjects .eoaccess .EODatabaseContext ._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java: 3221) with regards, -- Lachlan Deck ___ 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/simon_mclean%40mac.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Inheritance and overriding
Hi all, I'm working on a fairly complicated piece of database engineering, and wondering about the techniques of overriding flattened attributes / relationships in inheritance trees. What I might need to do is flatten a Entity1 - Entity2- @sum - Attribute in a supertype, but override that in certain subclasses into Entity1 - children(Entity1) - Entity2- @sum - Attribute Is it possible to do this in the model? I've never tried, my guess is not, in that case, is it OK to simply do it in Java? Flor ___ 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 [EMAIL PROTECTED]
Access to D2wContext / RuleSystem while rendering
Hi all, I've made some D2W templates and components. On some of them, I want to access the rule system through the d2wcontext (asking for some color preferences and other values I have added in rules to the .d2wmodel file). When I have an action method in the page, I can use the d2wContext().valueForKey(color) to ask the rule system to look for the value of the color key. Until here, that works fine. However, when I do the same while rendering the page (or in the constructor), I can't access the current d2wcontext using the d2wcontext() method as it returns null. This makes me think, the d2wcontext isn't initialized yet at this point, but then, how am I supposed to get a reference to it? Or else, does someone know how can I ask the Rule System for a value in the rendering process? (using the appropriate task, entity, etc. values). I hope someone can help me. Thanks in advanced. -- Cuauhtemoc Hohman ___ 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 [EMAIL PROTECTED]
Re: Inheritance and overriding
On Apr 21, 2008, at 11:22 AM, Florijan Stamenkovic wrote: Hi all, I'm working on a fairly complicated piece of database engineering, and wondering about the techniques of overriding flattened attributes / relationships in inheritance trees. What I might need to do is flatten a Entity1 - Entity2- @sum - Attribute in a supertype, but override that in certain subclasses into Entity1 - children(Entity1) - Entity2- @sum - Attribute Is it possible to do this in the model? I've never tried, my guess is not, in that case, is it OK to simply do it in Java? I don't know if you can do that in the model (the @sum) or not. Also, flattened attributes can have inconsistency problems. I'd lean towards the Java solution. Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Access to D2wContext / RuleSystem while rendering
You have it right as far as you got but I think you have to initialize the D2WContext like this: D2WContext context = new D2WContext( session() ); See this post for more detail: http://www.wodeveloper.com/omniLists/webobjects-dev/2002/November/ msg00366.html David On 21-Apr-08, at 11:26 AM, Cuauhtemoc Hohman wrote: Hi all, I've made some D2W templates and components. On some of them, I want to access the rule system through the d2wcontext (asking for some color preferences and other values I have added in rules to the .d2wmodel file). When I have an action method in the page, I can use the d2wContext ().valueForKey(color) to ask the rule system to look for the value of the color key. Until here, that works fine. However, when I do the same while rendering the page (or in the constructor), I can't access the current d2wcontext using the d2wcontext() method as it returns null. This makes me think, the d2wcontext isn't initialized yet at this point, but then, how am I supposed to get a reference to it? Or else, does someone know how can I ask the Rule System for a value in the rendering process? (using the appropriate task, entity, etc. values). I hope someone can help me. Thanks in advanced. -- Cuauhtemoc Hohman ___ 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/programmingosx %40mac.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Database Design - Multiple locations
On Apr 20, 2008, at 6:15 PM, Mr. Frank Cobia wrote: I have a database design question. I am posting it to the WebObjects list because I am building a WebObjects app and want a solution that works well for EOF. I have a table of data that has to have a location associated with it. Unfortunately the level of the location is not constant. The data can be associated with a Country, Region, State, Metro Area, County or City. Each of those levels is its own table with relationships pointing to the related locations. i.e. a State knows which Region it belongs to and which Metro Areas belong to it. I have been unable to come up with a design that seems elegant. I have thought of having 6 separate relationships to each of the location levels, but it seems to duplicate data and the data could get out of sync if a state is moved to a different region or a City is moved to a different county. Has anyone had a situation like this and come up with a good solution? This seems like a good place for inheritance with an abstract EO of Location with concrete subclasses of Country, Region, State, Metro Area, County or City. For some operations, having them in separate tables might cause more fetches than you want. Using single table inheritance would address that. Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: ERXMutableArray fields in Entity Modeler
On Apr 18, 2008, at 8:21 PM, Jeff Schmitz wrote: That entirely depends on what you need and how you need to use it. If you give the details, we can guide you to a solution. Well, if you want to get specific, one place I'd like to use it would be an array of integers saved with each Pool object, containing a point value for the games in each round. The values themselves need to be changeable for each pool, but the size would be constant so it doesn't need to be mutable, Um, no. Mutable also means that the contents can change, not just the size. since the number of rounds in a tournament is known and static, e.g. for the NCAA tournament the size would be 6, since there are 6 rounds. This is the only per round information that needs to be kept. I'd be tempted to make this into an EO with an order attribute, an point attribute, and relationship to Pool. Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Inheritance and overriding
I don't know if you can do that in the model (the @sum) or not. Also, flattened attributes can have inconsistency problems. I'd lean towards the Java solution. You mean, skip flattened attributes in total? Yeah, that would probably be easier to figure out. I was thinking of flattening stuff because I assume that would increase performance... I suppose I'll just try a Java only solution and see how it behaves... Flor btw, I guess by inconsistency problems you mean that flattened attribute values get cached and are not updated when something in the chain changes? I ask because if that's what you mean I can still use keypaths to easily obtain values in my Java methods... ___ 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 [EMAIL PROTECTED]
Re: Inheritance and overriding
On Apr 21, 2008, at 1:24 PM, Florijan Stamenkovic wrote: I don't know if you can do that in the model (the @sum) or not. Also, flattened attributes can have inconsistency problems. I'd lean towards the Java solution. You mean, skip flattened attributes in total? Yeah, that would probably be easier to figure out. I was thinking of flattening stuff because I assume that would increase performance... I suppose I'll just try a Java only solution and see how it behaves... I have never used flattened relationships. For performance, you can cache in the EOs as long as you are careful to clear or rebuild the cache when it is no longer valid. Flor btw, I guess by inconsistency problems you mean that flattened attribute values get cached and are not updated when something in the chain changes? I ask because if that's what you mean I can still use keypaths to easily obtain values in my Java methods... Yes, that is what I meant. I recall the EOF docs (of some version) mentioning that this could be a problem. Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
WOWODC 2008
Hi all, I plan to attend the conference this year. Do we have the complete menu and session schedule? According to the website, it should be available 4/11. Thanks a lot. Wen ___ 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 [EMAIL PROTECTED]
Re: WOWODC 2008
On Apr 21, 2008, at 2:37 PM, Xia, Wen wrote: Hi all, I plan to attend the conference this year. Do we have the complete menu and session schedule? According to the website, it should be available 4/11. Thanks a lot. Wen AFAIK, the menu at http://www.wocommunity.org/wowodc08/menu.html is final. I thought the final session list was up, but I don't see any links. I will see if I can prod people into getting that done. Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Creating and Editing EO's
Hi Guido, Thanks to your suggestion, I've been diving in the Wonder frameworks, and the are enormous! To test it, for my purpose, I've migrated (not with out some trouble) a small D2W application I had, following the small guide Integrate Wonder Into an Existing Applicationhttp://wiki.objectstyle.org/confluence/display/WONDER/Integrate+Wonder+Into+an+Existing+Application . However, I don't really get how does this help my EditPage Template to distinguish between edit and create modes. In my testing, both continue using task edit, so how do I differentiate them in the Rule System? Is there another key or method I can use when using WONDER or how does this trick work? Thanks again for your help. -- Cuauhtemoc Hohman On Thu, Apr 17, 2008 at 4:38 PM, Guido Neitzer [EMAIL PROTECTED] wrote: When you do D2W you definitely should use Wonder. D2W will lock up with deadlocks without working auto-locking and it will give you all kinds of other trouble. With Wonder you get different page configurations for edit and create. And hundreds of other helpful things! cug -- http://www.event-s.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Creating and Editing EO's
On 21.04.2008, at 17:11, Cuauhtemoc Hohman wrote: However, I don't really get how does this help my EditPage Template to distinguish between edit and create modes. In my testing, both continue using task edit, so how do I differentiate them in the Rule System? Use the pageConfiguration: pageConfiguration = CreateMyObject vs pageConfiguration = EditMyObject cug -- http://www.event-s.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Digester and EOs
Hi all, I have successfully parsed an XML file with the Apache Digester (thanks to Chuck's suggestion) and created EOs using the default rules. I end up with an array of EOs each of which has several to-many relationships to other created EOs. The xml seems to all be digested at once when the file is parsed and I am not sure where to intervene to add an EO to the editing context. Can anyone help me with this? Thanks, David ___ 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 [EMAIL PROTECTED]
Re: Digester and EOs
On Apr 21, 2008, at 5:28 PM, David Holt wrote: Hi all, I have successfully parsed an XML file with the Apache Digester (thanks to Chuck's suggestion) and created EOs using the default rules. I end up with an array of EOs each of which has several to-many relationships to other created EOs. The xml seems to all be digested at once when the file is parsed and I am not sure where to intervene to add an EO to the editing context. Can anyone help me with this? Offhand, I don't know. I looked at our code using Digester (code which I was not at all involved in, my story, and I am sticking to it), we imported them into intermediate (non-EO) classes and then fetched / created EOs (as appropriate for update / create). We then copied the needed values from the intermediate classes. I think that was necessary as the XML represented EOs getting inserted into an existing, complex graph of objects. Your case is probably simpler, but I don't have a simple solution at hand. Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: ERXMutableArray fields in Entity Modeler
On Apr 21, 2008, at 2:48 PM, Chuck Hill wrote: On Apr 18, 2008, at 8:21 PM, Jeff Schmitz wrote: That entirely depends on what you need and how you need to use it. If you give the details, we can guide you to a solution. Well, if you want to get specific, one place I'd like to use it would be an array of integers saved with each Pool object, containing a point value for the games in each round. The values themselves need to be changeable for each pool, but the size would be constant so it doesn't need to be mutable, Um, no. Mutable also means that the contents can change, not just the size. As the late, great Johnny Carson would say, I did not know that. since the number of rounds in a tournament is known and static, e.g. for the NCAA tournament the size would be 6, since there are 6 rounds. This is the only per round information that needs to be kept. I'd be tempted to make this into an EO with an order attribute, an point attribute, and relationship to Pool. That's what I ended up doing. Thanks, Jeff Chuck -- 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: WOFileUpload
Hi Sirius, I use a a direct action. I began following this approach because I am dealing with large files and had no desire for them to be in memory. In the WOMultipartIterator docs it says: The InputStream subclass is a WOFormDataInpuStream and can be used to stream large file uploads to disk. To test, create a multipart form with a file upload in an HTML file and set the form action to a direct action on your webobjects app. I can send you some sample code if you'd like. :) asa On Apr 21, 2008, at 10:43 AM, sirius black wrote: I like the idea of this approach, but maybe I'm not understanding you completely. If I change my html to not use WOFileUpload and instead just upload like a normal file-upload: Browse file: input name=fileName type=file brwebobject name=SubmitButton/ --- SubmitButton: WOSubmitButton { action = submit; value = Upload File; } Then it seems like I'm still reading in all the data before I even get to my takeValuesFromRequest. In fact when I get to larger files (~ 500MB - 1.0GB) I don't even get to the takeValuesFromRequest and something else goes wonky. Is this how you meant to implement this? Or am I missing another web-objecty way to grab the file name information. 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
WO 5.3.x amp workaround?
Hi all, Does anyone have a generic workaround for WO 5.3.x to prevent ampersands from getting escaped on R/R loop direct actionURLs? I have a page which is sometimes returned as a session-less based direct action and sometimes it's returned as a session based direct action with a wosid on the URL. In the latter case, the URL looks like this: MyWOApp.woa/wa/loginPage? wosid=V7HO3tAja0qE0HYoDyxZiwamp;errorMessage=Invalid+login+or+password Obviously, I'd like to change the amp to just . My current workaround is: String errorMessage1 = (String) this.context().request().formValueForKey(errorMessage); String errorMessage2 = (String) this.context().request().formValueForKey(amp;errorMessage); Thanks, Joe ___ 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 [EMAIL PROTECTED]