Webobjects WoLips Wonder Tutorial Questions
I have been following the tutorial "WO_WOLips_Wonder_Tutorial_Part_1". The tutorial is wonderful and answers a lot of questions I had about setting up a project using wolips. I am running into a few problems with this tutorial 1. For some reason migrations is not creating the table. I can create the table using the generate SQL button however, Migrations does not create the table. (I am using a separate MySQL sever). 2. When Webobjects generates the .java and _ .java it places them into Sources/(default package) rather than com.login.model. How do I set where the generated java files are placed? 3. When I run the program and type in a valid username / password using the fetchRequiredUser function I get a classCastException on _fetchUser in _User. Could this be cause from me creating a com.login.model package and moving the contents of the default package into this folder? *After I refreshed _User.java User.java reappear in the default package and now I have duplicates. Thank You, Halo ___ 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]
SQL Server 2005 Support Request 2
I am having problems connecting Entity Modeler to SQL Server 2005 DB. I am using webobjects v5.4.3 First of all I found the last two articles on this subject extremely helpful. Each article got me closer to connecting to the database. I had the same problem as displayed in "RE: Microsoft SQL support" http://lists.apple.com/archives/Webobjects-dev/2007/May/msg00354.html. This corrected my Driver not found in Java Runtime error. However, the error that I now get is: Failed to Generate SQL. No suitable driver. I have tried placing Microsoft the 2005 JDBC Driver (sqljdbc.jar) in Library/Java/Extensions. Used all the versions I could find 1, 1.1, 1.2 and 2.0. All with the same result If contact via email is better: thiggins [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]
Wonder AJAX Fileupload problem.
Hi, I'm having trouble using the AJAX FileUpload component from Wonder. http://webobjects.mdimension.com/wonder/Wonder-latest-Frameworks-53.tar.gz FWIW this is the first time i tried to use any Wonder AJAX components. Basically I have used the example code that comes with wonder and have used that in my test project but when i hit the page containing the fileupload the page just re-renders the fileupload component over and over again until the 'done' alert is displayed. Any idea why this would happen? Regards, shaun ___ 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: String Qualifier for Number
Chuck Hill wrote: On Mar 13, 2008, at 10:47 AM, Carter Wojcik wrote: Hi All - My users want to have the ability to search on a Number attribute, but use String qualifiers such as Contains ('*value*'), Begins With ('value*'), Ends With ('*value'). I have a table named part that contains a primaryKey named part_id (Number and exposed) and a String called descriptor. Is there a way to create an EOQualifier that replicates the SQL in the example below? Example: Select all parts with a part_id that begins with 3. select * from part where to_char(part_id) like '3%'; Maybe... Add a new attribute called partIDAsString Set the column to part_id Set the datatype as string Mark it as read only Set the read format to to_char(%P) Then make a qualifier on partIDAsString. Interesting approach. I hope it works. The other day I was trying to do exactly the same thing as descibed by Carter. I used the Wonder RegExQualifier class as a base for my own EOQualifier implementation and created the sql as required calling to_char(id) it was all going well up until it actually had to do the fetch, thats when JDBCColumn in the JDBCAdaptor classes got in the way and spoiled the fun; it checks that the object type provided matches the models type but '%1001%' is NAN so it throws an Exception. I'm not sure if there is somethign i can do to get around this or not? At that stage i figured i needed to try something else. Your idea above is next in line. Thanks. - shaun ___ 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: Slogan
Q wrote: On 07/11/2007, at 12:33 PM, Ian Joyner wrote: BTW, to continue the improvement in the grammar of the sentence: "If you're not using WebObjects, you're doing things the hard way." Shouldn't that be "If you'se ain't usin WebObjects, yous're doin thins the 'ard way."? or maybe "If you aren't using WebObjects things are WOfully hard" Nah, an aussie slogan would be more like "If you're usin' WebObjects, things are WO-Bloody-Beautiful mate!" or "WebObjects - So where the bloody hell are you?" Then a Kiwi may say something like: WO Bro! ey. Or not.. :) cheers bro, - shaun ___ 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: How does WO enforce serial request processing per session?
Peter Vandoros wrote: We have a situation where we Single Sign On with a 3rd party system. When the user SSO's into our system, we need to keep their session alive in that 3rd party system for when the user re-enters that system. We do this by having a set of TimerTask's firing every X minutes. The idea is that if we detect that the user's session in the 3rd party system is no longer valid, we have to kick the user off our session. Essentially, logging the user out of our system. In this case, we need access to our WOSession in order to log the user out. How about something along the lines of: Every n minutes check the 3rd party system for session validity if 3rd party session is invalid then put sessionId in application.sessionsToTerminate. end if When WOApp session.awake is invoked if sessionId is in application.sessionsToTerminate session.terminate application.sessionsToTerminate.remove(sessionId) end if cheers, - shaun ___ 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: SQL Query Generation
Michael Xenakis wrote: All - I'm trying to solve a lil' problem here. The semi-short story is that prior to doing a fetch, I'm going to do a raw SQL fetch to determine how many rows would be returned - i.e., I'll do a "select count(*)" based on the search parameters. If the count is greater than a predetermined fetch limit, then I respond w/ a message to further restrict the query. To do this, I build my qualifiers as usual create a fetch spec based on the qualifiers and then pass them into a JDBCExpression. The code looks like this: EOFetchSpecification fetchSpec = new EOFetchSpecification (entityName, searchQualifier, null); JDBCExpression sqlExpression = new JDBCExpression(entity); sqlExpression.prepareSelectExpressionWithAttributes (entity.attributes(), false, fetchSpec); String rawSQLQuery = "SELECT COUNT(*) FROM " + entity.externalName() + " WHERE " + sqlExpression.whereClauseString(); if (!sqlExpression.joinClauseString().equals("")) { rawSQLQuery = rawSQLQuery + " AND " + sqlExpression.joinClauseString(); } Unfortunately, the where clause being generated by .whereClauseString () is parameterized, e.g., SELECT COUNT(*) FROM PLAYLIST t0, CONTENT_PROVIDER T1 WHERE (((t0.FIRST_PRODUCTION_RELEASE is not ? AND t0.LAST_PRODUCTION_RELEASE is ?) AND T1.CONTENT_PROVIDER_ID = ?) AND UPPER(t0.NAME) LIKE UPPER(?) ESCAPE '\') What I can't seem to figure is how to get the string returned w/ the parameters replaced w/ the actual bound values. So, first, am I heading down the right path or is there a better way? If I am headed in the right direction, what am I missing? You can use EOSQLExpression and bindVariables to substitute the keys and values. Something along the lines of the follwoing: Note: there are numerous problems with this code as it stands, . BigDecimal formatting might not be right anymore Java 5 changes need to call method other than toString(), should be toPlainString()? I think. . Date formatting, Oracle specific? EOSQLExpression expression.../ assume it exists. String sql = expression.statement(); NSArray bindVariables = expression.bindVariableDictionaries(); if( (bindVariables == null) || (bindVariables.count()==0) ) return true; for(int i=0; iNSDictionary bindVariable = (NSDictionary) bindVariables.objectAtIndex(i); String name = (String) bindVariable.valueForKey("BindVariableName"); Object value = bindVariable.valueForKey("BindVariableValue"); EOAttribute attribute = (EOAttribute) bindVariable.valueForKey("BindVariableAttribute"); //TODO check for data type. String formattedValue = ""; if( value == null ) formattedValue = "NULL"; else if( attribute.externalType().equals("DATE") ) formattedValue = "TO_DATE('"+DateUtils.toStringUsingFormatter((NSTimestamp)value,"%Y-%m-%d %H:%M:%S")+"','-MM-DD HH24:MI:SS')"; else if( attribute.externalType().equals("NUMBER") ) formattedValue = value.toString(); else formattedValue = "'"+value.toString()+"'"; sql = StringUtils.replaceStringFirstMatch(sql, "?", formattedValue); } HTH. cheers, - shaun ___ 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: Flex integration with WO
Hi, I have been using flex with WO for about 8-10 months now, building a new UI for new section of an existing app at the moment. Basically, the approach I have taken is using flex HTTPService calls to direct actions that return XML. The direct actions generate XML using some custom xml generation classes that make use of key value coding to inspect EOEntities, EOAttributes etc. but i digress... Having the result format set to "array" in Flex makes building a object graph on the client-side pretty painless. I've also built a EOGenerator style script to generate Actionscript classes for the client side based on EOModel attributes, which makes things a bit easier. I wanted to look into make LiveCycle Data services work with WO but its not supported on OSX at the moment and there have been way too many cool new things to get stuck into with Flex2/3 and AIR(beta) to bother, and they approach I've used so far works great. I dont think I'll bother building anymore WO UI's from now on. The flex stuff is WAY too nice. For me, WOComponent & WODynamicElements died (RIP) about 8 or 9 months ago.. IMO flex is the future of rich UI web applications. AJAX, HTML, no thanks. Pascal Robert wrote: I'm looking at Flex 2 right now, and I was wondering if any of you is playing with this tech and if you are trying to integrate it with WO ? I guess I need to create a WO implementation of AMF3 so that data exchange is easier than using SOAP :-) regards, - shaun ___ 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: editingContext.deleteObject(object) immediately destroys relationships?
Miguel Arroz wrote: Hi! I'm having a very very strange bug here. I have a context where I store some objects but I do not save it yet. Specifically I have one object that was created, and has relationships with other objects, but it's still not stored on the DB. Depending on what the user does, that object may be deleted again (before it's saved to DB). The problem is that after deleting it, apparently it's still showing up on some relationships. IE, object A is related to B. I delete B, but A still has B in it's b() array. Is this normal? Are you calling removeObjectFromBothSidesOfRelationshipWithKey before deleting? regards, shaun ___ 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 archive@mail-archive.com
Re: Display Correct Date and Time from Oracle DB
Hi, Carter Wojcik wrote: Hi All - I have reversed engineered my model from an Oracle 10g db. Most of the entities have date added and date updated attributes (containing both date and time pieces). I would like to display both the date and time to the user (example: 22 Jan 2007 14:24). Here is the information from the models plist: columnName = "DATE_ADDED"; externalType = DATE; name = dateAdded; valueClassName = NSTimestamp; valueType = D; The columns are of type DATE in the database. I am able to get the day, month, year to display correctly using the supplied dateformat attribute in wostring. Then when I want to just display the time portion, midnight (00:00 or 12:00 AM) is displayed even though there is an actual time in the database. Thanks for any help/pointers. Carter Have a quick read of this document regarding oracle dates and times. You might need the following to get the correct behaviour when updating DATE(date & time) attributes using EOF as well as setting the valueType = T. java -Doracle.jdbc.V8Compatibility="true" MyApp http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#08_01 I have been using oracle 10g in a dev environment for about 6 months or so with data imported from an oracle 8i database. I found that I needed to use the V8Compatibility arg above and to make sure that valueType = T was set for NSTimestamps which mapped to oracle DATE attributes containing date & time information otherwise updates failed. You might want to ensure you have the correct drivers aswell. Oracle jdbc drivers: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html regards, - shaun ___ 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 archive@mail-archive.com
Re: HTML to PDF?
Galen Rhodes wrote: I know this question doesn't directly involve WebObjects but it is something that I'm trying to integrate into a WebObjects application so I'll just toss it out there anyways... Does anyone know of any solution for converting HTML to PDF that will run on the Mac platform? It needs to be a solution that is either A) a Java library that I can integrate into my WebObjects application or B) an application that can run on Mac server and be triggered from the WebObjects application by some means. The input is flexible, I could give it a URL or pass it the HTML directly. The output is equally flexible in that I could accept the raw output or a filename where the output is stored. It doesn't matter if it's free or commercial as long as the price is not astronomical and the results look decent. You could try: http://www.htmldoc.org/ cheerio, - shaun ___ 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 archive@mail-archive.com
Re: WOConditional Question
Chuck Hill wrote: That is generally how it is done. We have a KeyValueConditional in our frameworks or in the PracticalWebObjects code that has bindings like: Foo: KeyValueConditional { key = someKey; value = someValue; negate = false; } Where the condition evaluates to true if key.equals(value). I am pretty sure that Wonder has this also. Or you could use WOOgnl from Wonder. There is also a WOKeyValueConditional component in the woextensions library. http://developer.apple.com/documentation/WebObjects/Reference/API/ com/webobjects/woextensions/WOKeyValueConditional.html The key needs to be a keypath in quotes, eg) kvc : WOKeyValueConditional{ key = "bar"; value = blah; } cheers, - shaun ___ 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 archive@mail-archive.com
Re: Best way to generate unique IDs that are not PKs
Florijan Stamenkovic wrote: Hi all, I have a need in several of my tables to generate identifying numbers, but relative to a certain relationship. So, if there is a Book, I need to generate number 6 for it if Author currently relates to 5 other books... I have an approach of doing this, please anyone tell me if there is a better way to do it! My approach: 1.Lock the working thread on a monitor that is "static final" in my SessionWorker class 2.Get the next number by using aBook.valueForKeyPath ("[EMAIL PROTECTED]");//can not use @count in case of previous deletions 3.Set the next number in aBook 4.Save the changes of my working editing context 5.Release the synchronization lock Questions: Is there way to use EOF locking to lock on the database? It seems to me that would be more appropriate for what I am doing then the plain Java thread synching, and would work even if there were multiple application servers running, where the above approach would not. Any other ideas where this might flop and how to prevent it? You might want to put a DB constraint on the column if you haven't already. You could then catch the constraint violation exception and take appropriate action. I use a custom database function to do this type of thing. I use raw rows sql to select the next value from the function, then stuff the value into the relevant EO attribute. cheerio, - shaun ___ 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 archive@mail-archive.com
Re: JAVAC or JIKES ?
Art Isbell wrote: On Dec 13, 2006, at 12:55 PM, shaun wrote: Amedeo Mantica wrote: a simple question… JAVAC or JIKES ? Jikes is a lot faster that Javac. Thats about it AFAIK. I've heard that claim as well, but also that recent javac versions have closed the performance gap. So I really don't know whether jikes still has a performance advantage. However, I do prefer the greater number of warnings that jikes can be configured to produce (e.g., by adding the "+P +Pall +Pno-serial" compiler arguments). Oh yeah.. I forgot about the compiler warnings. Its been a couple of years or more since I used Jikes. I dont care if my apps take a bit longer to compile these days, it just means I have more time to drink my coffee :) regards, - shaun ___ 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 archive@mail-archive.com
Re: JAVAC or JIKES ?
Amedeo Mantica wrote: a simple question… JAVAC or JIKES ? I looked in google, but unable to find benefits / advantages between these compilsrs… regards Amedeo Jikes is a lot faster that Javac. Thats about it AFAIK. - shaun ___ 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 archive@mail-archive.com
Oracle and NVARCHAR2 with WO/EOF?
Hi, Replying to this post: http://lists.apple.com/archives/webobjects-dev/2006/Nov/msg00062.html http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc /nchar/readme.html Says you can do the following to setFormOf(..) across the board. -Doracle.jdbc.defaultNChar=true Obviously, doing so has some issues(see link above). Might not be a problem if all your columns are NVARCHAR2 though. HTH, - shaun ___ 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 archive@mail-archive.com
Re: Earliest object in a table
Baiss Eric Magnusson wrote: There must be a few lines, utilizing EOUtilities calls, that would yield the earliest object, date wise, (there is a stored NSTimestamp field), from a table "Posts". Would someone care to share them? Perhaps something like the following: String sql = "select id from post where created_date= (select min(created_date) from post)"; //whatever the rawrows method is called. NSArray results = EOUtils.rawRowsForSQL(sql) NSDictionary row =(NSDictionary)results.objectAtIndex(0); //whatever the method is called. Post p = (Post)EOUtils.objectFromRawRow(row); HTH. - shaun ___ 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 archive@mail-archive.com
Re: WebObjects Exception Details..
Hi, FWIW. I dont use Xcode, using WO 5.3.something for development. I dont get a stack trace in the WO exception page when not using direct connect(DC) but I do get a stack trace in the browser when using DC. Chuck Hill wrote: This just started in Xcode 2.4 / WO 5.3.2 (or is it 5.3.3 now?)? On Nov 14, 2006, at 1:06 PM, Baiss Eric Magnusson wrote: I also have this problem, I've let it pass because I throw all my exceptions to but it has been a significant detriment. I tried from Terminal's command line set WODebuggingEnabled true And added to the Active Executable Arguments -WODebuggingEnabled=true But no stack... From: Jean-Fran?ois Veillette <[EMAIL PROTECTED]> try : WODebuggingEnabled true From: Chuck Hill <[EMAIL PROTECTED]> I have seen this, or something like this, happen several versions ago when the WOExceptionPage was shipped with an error in the .wo. Check the app logs and see if there is a reference to such an error. Also try creating and returning this page manually to see if you can find the error. The WOComponent Editor in WOLips might also be of help in determining if this is the cause. Chuck The WOExceptionPage.WO validates. In Console/Logs/console.log, I assume this is the , I don't see the stack. On Nov 13, 2006, at 9:28 AM, james o wrote: I'm no longer getting detailed Exception Descriptions in my browser window. no Line#, File, Method, etc... i'm using XCode 2.4 (downloading 2.4.1 now) on OS X Client 10.4.8 and WO 5.3. help, it's become really difficult to locate my exceptions without reference to any line or method. Baiss Eric Magnusson <http://www.Track-Your-Finances.com> <http://www.CascadeWebDesign.com> cheers, - shaun ___ 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 archive@mail-archive.com
Re: WebObjects Exception Details...
james o wrote: I'm no longer getting detailed Exception Descriptions in my browser window. no Line#, File, Method, etc... i'm using XCode 2.4 (downloading 2.4.1 now) on OS X Client 10.4.8 and WO 5.3. help, it's become really difficult to locate my exceptions without reference to any line or method. ./james The log file should be helpful and provide a stack trace. grep for NullPointerException or something like that. cheers, - shaun ___ 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 archive@mail-archive.com
Re: Eclipse / wolips / X-Code –– Baffled
Mike Schrag wrote: No, I dont think that is the intention. Also, Mike Schrag's entity modeller is currently an eclipse plugin but he said that it wouldnt be hard to make it run standalone. Correction, I said it would be POSSIBLE :) Oh dear, my mistake. Sorry about that. :) That might have been a joke, but using a decent text editor to manage model files is a lot easier than you may think. Yikes. Easy in that they're all text files. Super annoying to actually do for real, though ... The file specification for eomodels is Nah, its not too bad.. really. Ahh heck, who am I kidding, I think i'm the only one on the planet that doesnt mind editing eomodel .plists with emacs. But you _do_ get used to it and its a breeze... pretty obnoxious. Several cases of unnormalized data just waiting for you to trip up on. Probably the same reaction WOB people have when I say I prefer the WOD Editor in Eclipse :) Heh, well, I use a split emacs window a lot of the time for both, html and wod so I'm not saying a thing.. Although I have enjoyed using netbeans 5.something over the last few months.. I love being able to collapse the html. regards, - shaun ___ 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 archive@mail-archive.com
Re: Eclipse / wolips / X-Code –– Baffled
Hi Chuck, Andrew, list, Chuck Hill wrote: Hi Andrew, On Oct 16, 2006, at 1:38 PM, [EMAIL PROTECTED] wrote: [snip] Is it the intention of Apple that eclipse will be the only viable platform for WO development? No, I dont think that is the intention. Also, Mike Schrag's entity modeller is currently an eclipse plugin but he said that it wouldnt be hard to make it run standalone. I was not aware that Xcode ever was a viable platform for WO development. Grin. I expect that Xcode will always be able to build WO apps. But once the other tools go away, you would need to use Eclipse and WOLips to edit models, components, etc. Well, that or emacs. That might have been a joke, but using a decent text editor to manage model files is a lot easier than you may think. It's also very easy to write scripts using something like perl, to create, update or copy these files or do things like list relationships, attributes, whatever you like. You can do a tonne of things with this approach, for example, list all attributes that have a varchar2 STATUS attribute with length = 1, across all models in an app and all its frameworks. It even easier now than it used to be because the eomodel bundle specs are available. Not using a GUI to build eomodels is actually quite liberating. As is command line build, package, bundle, deploy. For example, I use a single command to clean, build, package, scp, and deploy to a local dev server, its a beautiful thing.. :) YMMV. regards - shaun ___ 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 archive@mail-archive.com
WebObjects Developer position, Melbourne Australia
Hi, The company I work for is looking to hire an experienced WebObjects developer for fulltime work in our Melbourne office. If you are interested, contact me off list. regards, - shaun ___ 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 archive@mail-archive.com
Re: Problem with Oracle adapter and update
Hi, Tarun Reddy wrote: On Oct 10, 2006, at 8:02 PM, shaun wrote: Hi, Tarun Reddy wrote: On Oct 10, 2006, at 7:02 PM, Art Isbell wrote: On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote: Trying this in sqlplus with this statement: UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa" AND IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE = "2006-10-08 00:00:00" AND USER_OID = 1)"; returns: ERROR: ORA-00972: identifier is too long You have an unmatched double quote near the end of the above statement. This might cause the error in your sqlplus test, but probably not in your WO app. If you eliminate the unmatched double quote, replace the remaining double quotes with single quotes, and rerun the statement in sqlplus, does the error still occur? Searching Google for "ORA-00972" produced one response that claimed that this bogus error message can occur when double quotes are used. Another Google search results states that an incorrect column name can cause this error. Is it possible that an attribute in your eomodel has a column name that doesn't match a column name in the IDEA table? Art, First off, I appreciate your help! I changed the SQL to UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date ('2006-10-08 00:00:00', '-mm-dd hh24:mi:ss') AND USER_OID = 1) 2 ; That returned 0 rows updated. It seems like the SQL generated is off. I think it is the SUBMIT_DATE part. My SQL maybe off. UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1); What is the oracle data type for the SUBMIT_DATE attribute? Hi Shaun, SQL> desc IDEA Name Null?Type - AVGRATING FLOAT(126) CATEGORY_OID NOT NULL NUMBER IDEADESC NOT NULL VARCHAR2(4000) IDEANAME NOT NULL VARCHAR2(255) IDEA_OID NOT NULL NUMBER IDEAURLVARCHAR2(255) NUMRATINGS NUMBER PARENT_OID NUMBER STATUSNOT NULL VARCHAR2(1) SUBMIT_DATE NOT NULL DATE USER_OID NOT NULL NUMBER In my EO Model submitDate maps to SUBMIT_DATE with External Type of DATE Value Class (Java) of NSTimestamp Value (not sure what this might affect) of D I have this in my notes regarding value type: -- For attributes with a Value Class of NSTimestamp the following value types are defined: D t T M These value types affect how the data is transfer between the JDBC adaptor and the database. An empty Value Type uses get/setObject() on the ResultSet and PreparedStatement. It assumes the database can provide a value compatible with a java.sql.Timestamp. A 'D' indicates WebObject's JDBC adaptor should use get/setDate. A 't' indicates get/setTime(), and a 'T' uses get/setTimestamp(). The 'M' value type is a workaround for a bug in some MS SQLServer JDBC drivers. It only support java.sql.Date. -- I thought that I used T usually, but looking at some of my models I have nothing set for a lot of the oracle DATE fields. The info above indicates that if you only want the date portion then use a D, if you want Date and time ie) a timestamp then use T. Also, I'm using NSCalendarDate not NSTimestamp for valueClassName in my eomodels. Using NSTimestamp in the classes. I have a much older version of Oracle and WO5.3. FWIW most of my eomodels are also quite old now. HTH. - shaun ___ 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 archive@mail-archive.com
Re: Problem with Oracle adapter and update
Hi, Tarun Reddy wrote: On Oct 10, 2006, at 7:02 PM, Art Isbell wrote: On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote: Trying this in sqlplus with this statement: UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa" AND IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE = "2006-10-08 00:00:00" AND USER_OID = 1)"; returns: ERROR: ORA-00972: identifier is too long You have an unmatched double quote near the end of the above statement. This might cause the error in your sqlplus test, but probably not in your WO app. If you eliminate the unmatched double quote, replace the remaining double quotes with single quotes, and rerun the statement in sqlplus, does the error still occur? Searching Google for "ORA-00972" produced one response that claimed that this bogus error message can occur when double quotes are used. Another Google search results states that an incorrect column name can cause this error. Is it possible that an attribute in your eomodel has a column name that doesn't match a column name in the IDEA table? Art, First off, I appreciate your help! I changed the SQL to UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date ('2006-10-08 00:00:00', '-mm-dd hh24:mi:ss') AND USER_OID = 1) 2 ; That returned 0 rows updated. It seems like the SQL generated is off. I think it is the SUBMIT_DATE part. My SQL maybe off. UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1); What is the oracle data type for the SUBMIT_DATE attribute? regards, - shaun ___ 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 archive@mail-archive.com
Re: Dealing with URLs length
Miguel Arroz wrote: Hi! On 2006/10/10, at 21:50, Chuck Hill wrote: Interesting I never tried that. Thanks for the tip! You just have this then? WebObjectsAlias /WebObjects Yap! :) Taking the cgi-bin part out makes the URL look much better! Yours Cool. Thanks for that info. I think that is definitely Wiki worthy(if its not there already). regards, - shaun ___ 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 archive@mail-archive.com
Re: TextDisplayFormatter.java - any updates? where can gnu.regexp be found?
Hi, Matt Kime wrote: I'm attempting to use TextDisplayFormatter.java in order to solve the common problem of creating a string formatter to insert html paragraph breaks on WOString. I've attempted to use the code as found here - http://wocode.com/cgi-bin/WebObjects/WOCode.woa/2/wa/ShareCodeItem?itemId=352 It requires gnu.regexp but I can't find anywhere to download it. I suspect that its functionality has been moved into a different package a couple of times. Try http://google.com/codesearch. regards, - shaun ___ 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 archive@mail-archive.com
Re: EO/Java class default Values
d Person objects will be automatically initialised! Sometimes when you have a lot of overridden methods code can become a bit harder to grok at a glance. When a developer knows where to look for defaults(awakeFromInsertion) i think that it makes life a lot easier, rather than skimming through a bunch of long method names to see a default value or to understand which values need/should have defaults and what those defaults can be. FWIW. I also like to use the factory method pattern for constructing WOComponents too. YMMV. It seems that quite often something which makes sense to one person doesnt work so well for another, just something to consider I guess.. regards, - shaun ___ 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 archive@mail-archive.com
Re: Who's got the ?
Kurt Werle wrote: On Sep 22, 2006, at 1:48 PM, Paul Lynch wrote: On 22 Sep 2006, at 19:52, Kurt Werle wrote: > I want a row of submit buttons that don't look like crap. Which > means it looks like I can use on safari-like browsers and > on IE-like browsers. Unless someone can > suggest another workaround it looks like I'll be checking the > browser's claim as to it's behavior and substitute one or the other. What's wrong with WOImageButton? The words "Click Here" are not an image, nor should they need to be one. Why not use CSS? ___ 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 archive@mail-archive.com
Re: Flattened relationship and iterator oddness
Hey Fabian, Fabian Peters wrote: Hi John, hi Jean-Pierre, thanks for your replies! [snip] I'm still wondering about this one: Order <->> OrderItem <<->> ProductionRun <-> DeliveryDefect In Order, I've defined a flattened relationship deliveryDefects. It works fine for deliveryDefects that exist when the order is fetched from the DB. However, it fails to include a deliveryDefect that is created and then saved to the DB. Is this a known limitation of flattened relationships? Is this behaviour to be expected? Is this documented anywhere? I couldn't find an awful lot of documentation on flattened relationships anyway. Yes its expected, at least, I would expect it. When I did the WOII course in 2001 I think it was mentioned as a reason to not use flattened relationships, amoung other more obvious reasons. I have not seen any documentation about it though that I can remember. Perhaps searching the omnigroup list archive would give you more info. cheers, - shaun ___ 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 archive@mail-archive.com
Re: Newbie : Obtain the name of a server in Java
James Cicenia wrote: Jerry -- It works with Safari, IE6, and FireFox. I use this to change style sheets for "branded" customers. - James On Sep 6, 2006, at 7:07 PM, Jerry W. Walker wrote: Hi, James & Gilles, On Sep 6, 2006, at 7:37 PM, James Cicenia wrote: I do this in a Direct Action public WOActionResults defaultAction() { String domain = request().headerForKey("host"); It should be noted that this works only for some browsers. I beat my head against that wall more than once. The sad fact is that web browsers are not consistent in putting the host name in, and if so, with what key. I seem to remember needing to use http_host sometimes rather than host, but I dont remember when this is the case. ___ 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 archive@mail-archive.com
Re: Deploying 5.3 on Linux
Joe Little wrote: On 9/1/06, Hunter Hillegas <[EMAIL PROTECTED]> wrote: Joe, Yeah, I think we may have corresponded on this topic before. Thanks for taking it up again. So, from your message I assume that you've done this successfully? Do you know if wotaskd and Monitor are newer than the versions in 5.2.4? Right now the install is in '/opt/Apple' as that's what the Solaris installer recommended. I guess if I move things over to '/ Library' and '/System/Library' then those components will be updated anyway... I'd also want to change my Xcode targets to make the uname change that you recommend to the app launching script - certainly don't want to do that by hand each time. I'd like to know how one would do this, as that bit is all template driven or something. I just remember to go edit `uname -r` to Darwin every time via a sed script. You could create a shell script that echoes "Darwin", call it uname and put it in a dir which is in the path before the real uname binary. cheers, - shaun ___ 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 archive@mail-archive.com
Re: Mysterious EditingContext Swap
Hi Owen, I have seen this error before but I am only guessing as to the cause of it in your case. It seems that all the objects are in the correct context so printing ec.insertedObjects is probably not going to help. From the code and comments you have made in the email, it seems that the active context is getting set somehow. The only way that I know to make the active context is to use it in a fetch or possibly a relationship traversal from an object in a different context. I would try removing the PersonLDAP section of code, it could be the LDAP fetch that is the cause of the error. cheers, - shaun Owen McKerrow wrote: Nope, not paraphrasing. You can see the full error message at bottom of the email. The only time I have heard of the active editing context is for a save. Nope haven't had the chnace yet to separate this out to its own project. Heres the full code ( it includes our RADIUS authentication methods which I did paste before ): // Generated by the WebObjects Assistant Mon Feb 07 14:26:32 Australia/Sydney 2005 import com.webobjects.foundation.*; import com.webobjects.appserver.*; import com.webobjects.eocontrol.*; import com.webobjects.eoaccess.*; import net.sourceforge.jradiusclient.*; import net.sourceforge.jradiusclient.exception.*; public class Main extends WOComponent { protected Application app; protected EOEditingContext ec; protected NSMutableDictionary bindings; protected String userName; protected String password; protected String errorMessage; protected boolean forgotPassword; protected boolean thankyou; protected boolean emailAddress; protected boolean gotMobile; private String secretHandshake; private String hostName; private RadiusClient rc; private String exitCode; //- The Constructors - public Main( WOContext context ) throws Exception { super(context); app = (Application)Application.application(); //ec = ((Session)session()).defaultEditingContext(); ec = new EOEditingContext(); System.out.println("Editing Context just been made : " + ec); //((Session)session()).resetCrumbs(); secretHandshake = "*"; hostName = "radius.uow.edu.au"; RadiusClient rc = null; NSArray mems; forgotPassword = false; thankyou = false; emailAddress = false; gotMobile = false; } //--- WOComponent Functions --- //Called when the Persons clicks the submit button to login public WOComponent checkLogin() throws Exception { errorMessage = ""; WOComponent nextPage = null; //If both fields have some data in them if ( userName != null && password != null ) { userName.trim(); password.trim(); try { rc = new RadiusClient(hostName, 1812,1813,secretHandshake,userName); } catch(java.net.SocketException soex) { app.setErrorMessage("Unable to create Radius Client due to failure to create socket!"); throw soex; } catch(java.security.NoSuchAlgorithmException nsaex) { app.setErrorMessage("Unable to create Radius Client due to failure to create MD5 MessageDigest!"); throw nsaex; } catch(InvalidParameterException ivpex) { app.setErrorMessage("Unable to create Radius Client due to invalid parameter! " + ivpex.getMessage() ); throw ivpex; } try { boolean returned; if (app.debugMode ) { returned = true; } else { returned = authenticate(rc,password,null); } // Radius confirmed the userName and password are valid if (returned) { nextPage = (Menu)pageWithName("Menu"); //check if the user is in the recipient table checkRecipient(); } else { errorMessage = "User name & Password incorrect"; if (isUppercase(password)) { errorMessage += "class=\"failure\">Check Caps lock is not on.&q
Re: ERJavaMail erroneously returns component
Fabian Peters wrote: Hi Drew, see <http://en.wikibooks.org/wiki/Programming:WebObjects/ Project_WONDER/Frameworks/ERJavaMail#Gotchas> cheers Fabian I return "this" from the action method rather than null which seems to work ok, YMMV. Note: The behaviour is not WONDER specific, it happens with the standard WOMailDelivery aswell. Am 01.08.2006 um 12:50 schrieb Drew Thoeni: I'm successfully using ERJavaMail to send HTML components. However, each time this method gets run, the user is returned the HTML component page that is emailed. Instead, I would like the user to remain on the page from which the email was sent (there's a submit button on that page that send the email). Does anyone know why the EMailPage would be returned and, more important, how to stop that behavior? Regards, Drew public void sendEmail() { // Create an instance of an ERMailDelivery subclass ERMailDeliveryHTML mail = new ERMailDeliveryHTML(); // set all needed fields String fromAddress = reportEntryItem.employeeassignedto ().secondaryEmail(); removed code for setting other fields // ERMailDeliveryHTML needs a WOComponent to render the HTML text content. session.setReportEntryItemToEmail( reportEntryItem ); EMailPage pageToEmail = ( EMailPage )pageWithName( "EMailPage" ); mail.setComponent( pageToEmail ); // Here you create a new instance of the message // You can loop over this fragment of code, not forgetting to use newMail(), // before you set the attributes of the message. try { mail.newMail(); mail.setFromAddress( fromAddress, fromName ); // Strings mail.setSubject ( subject ); mail.setToAddress ( toAddress , toName ); // Strings mail.setBCCAddresses ( bccAddresses ); // NSArray mail.sendMail(); } catch (Exception e) { System.out.println( "Email exception: " + e ); //replace with NSLog } } cheers, - shaun ___ 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 archive@mail-archive.com
Re: The most strange problem with bindings...
Hi Miguel, Miguel Arroz wrote: Hi! Thanks for the suggestion, I'll do it. But what I would really like to understand (and this is the main question that bugs me) is why does the error happen ONLY when I switch from a component to another instance of that component. If I switch between two different components, it acts as expected. Any ideias on this? Are you sure it is creating a new instance of the same component? I would guess it's not. Ie) if you println in the component constructor do you see the output when changing to the "new instance". cheers, - shaun ___ 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 archive@mail-archive.com
Re: The most strange problem with bindings...
Hi Miguel, Miguel Arroz wrote: Hi! I'm having a bizarre problem relating to bindings, and I honestly cannot understand why the heck this is happening. I can solve it easily - or should I way, build a work-around - but I impose myself higher levels of quality! ;) Ok, here's the story: 1) I'm building an WO application that should work in two languages. 2) I have a WrapperComponent that wraps all the other components. That wrapper component contains a repetition in the HEAD html code to load JavaScript files. The repetition contains the path of the files to be read (array of strings). That array (let's call it listOfFiles) is on the WrapperComponent API. 3) WrapperComponent has another component inside, NavigationComponent. That component has a form and a pop-up that allows the user to select the language. The pop-up auto-submits when changed. Basically, the code changes the session language array, and returns "return pageWithName(context().page().name());" 4) I have a component, for the example, let's use the Main component. The Main component contains a WrapperComponent, with some stuff inside. On the Java code, I have a method "public NSArray scriptFiles()" that returns an array with the file paths. There's no instance variable or setter, naturally. 5) I have another component, let's call it "SimpleComponent", that contains a WrapperComponent, but no scriptFiles array (and no binding). WrapperComponent is smart enough to handle this OK. Ok. Now imagine we are seeing Main component. Click on a link that shows SimpleComponent. SimpleComponent appears OK. Now change the language while SampleComponent is on the browser. A new instance of SimpleComponent appears in the chosen language. Now, click on a link that returns to Main component. So far, so good. This tells me that we can enter and leave the Main component with no problems. The problem happens on Main component, and any other one that has the "listOfFiles" wrapperComponent binding binded to a component key. When I change the language, I get this: com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: [; 0.17 = ; } >; } >; 0.23 = ; 0.23.2.1.3 = ; 0.23.2.1.5 = ; 0.23.2.1.7 = ; } >; } >; } >; 0.29.1.1 = ; } > takeValueForKey()]: attempt to assign value to unknown key: 'scriptFiles'. This WOComponent does not have an instance variable of the name scriptFiles or _scriptFiles, nor a method of the name setScriptFiles or _setScriptFiles OK... for some reason, WO tries to set the scriptVars key. My question is WHY!? There's absolutely no reason that I can see that forces WO to do this. This apparently only happens when leaving a component and entering another instance of that component class. But why!? Of course, the work-around is easy, ant it works: just putting a setScriptFiles method that does nothing is enough of a hack to make this work. But that's not good enough. Why does this happen? Any tips? In a nutshell, synchronizesVariablesWithBindings returns true, so your parent and child components synchronize there variables and bindings. :) Make your nested component non-synchronizing by overriding the method synchronizesVariablesWithBindings and return false. Then implement the valueForBinding method as you need to pull the binding values into the nested component. HTH. - shaun ___ 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 archive@mail-archive.com
Re: JDBCChannel method failed to update
Hi, Corin Lawson wrote: Hi List, As volume has increased on our woapp so has the occurrence of this particular error, below. I am using WO 5.2.4 with MySQL 5.0. com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextI nformationAdded(EODatabaseContext.java:4685) at com.webobjects.eoaccess.EODatabaseContext.performChanges (EODatabaseContext.java:6393) at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingCo ntext(EOObjectStoreCoordinator.java:415) at com.webobjects.eocontrol.EOEditingContext.saveChanges (EOEditingContext.java:3226) We are currently looking into any network issues that could be causing communication problems between the two servers (the one with the woapp and the other with the database). Can anyone provide light to this exception? Optimistic locking failure perhaps. ie, One client trying to modify a row that has been deleted or modified by another client. The more clients accessing making modifications at the same time the more likely this is to occur. Check which attributes are used for locking on the entity that this occurs on to see if its likely being modified by more than one client. I assume you are able to pin-point the entity or the component at least. Catching this exception, then getting the user to handle the modification somehow is probably the solution you should consider rather than unchecking attributes used for locking. HTH. - shaun ___ 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 archive@mail-archive.com
Re: New T-Shirts
Hi, Nice work Mike. Thanks for putting those together. I've ordered a woeyechart golf shirt but its going to take ~12 days to get here(AU) so it might not arrive before I get on the plane. If it doesnt arrive on time I'll be the black sheep, wearing a linux shirt! :P Mike Schrag wrote: I made a few more T-shirts ... Because of some annoying limitations with CafePress free stores, I have a separate store for each design: http://www.cafepress.com/wobadge - metal Powered By WebObjects badge (http://www.mdimension.com/PoweredByWebObjects.jpg for the full size version) http://www.cafepress.com/wonotdead - "I'm not Dead" Monty Python inspired Rails v. WO http://www.cafepress.com/woaimf - Chuck's infamous "WebObjects. Advertise it. M*F*." - Note: Keep out of reach of children http://www.cafepress.com/woeyechart - An eye chart with "WO" at the top and all the other web acronyms out of focus http://www.cafepress.com/woitms - "iTunes? WebObjects." design (it's hard to tell in the original, but the iTunes screenshot is blurred into the background -- see http://www.mdimension.com/ iTunesPoweredByWebObjects.jpg for the fullsize version, so just you know exactly what you're getting) http://www.cafepress.com/eosimple - The original simple lineart EO icon http://www.cafepress.com/eo3d - My personal favorite, the 3D rendering of the stack of EO's http://www.cafepress.com/wolips - WOLips, the lineart EO icon composed with Eclipse's logo Just as a reminder, I don't charge any profit on these to avoid any potential for these emails to be construed as spam :) Also, I JUST made the five designs at the top this morning, so I haven't personally bought any shirts yet to be able to vouch for the image quality, but I create these things pretty big to hopefully have the shirt image always scale down vs up. The only one that might be an issue is the WO badge -- the background is scaled up and cleaned some, but there are some artifacts around the screws. I recreated all the text + engraving effect on the interior, though, so I think it should look pretty good -- check the full-size one if you're concerned. The 3D EO one looks pretty darn cool on a shirt, IMHO :) Enjoy! ms cheers, - shaun ___ 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 archive@mail-archive.com
Re: WWDC Security concern
Chuck Hill wrote: Besides, this IS America. You can always buy a nice, simple Glock 19 and a fresh box of ammo. :-P hmmf. I was under the impression that I would be issued with one when I got off the plane! Now I find out I have to BUY one! :) Chuck On Jul 21, 2006, at 3:14 PM, Miguel Arroz wrote: Hi! Keep cool! :) I raised this question because of my powerbook. I don't believe that there are serial killers and such on that area in SF - it's probably just a place like anywhere else in USA or Europe - I also don't feel confortable transporting my Powerbook at night in Lisbon, but that doesn't mean I'm afraid to go out for a walk. I just do not want to see my powerbook go away - not only because of the powerbook itself, but because all the data stored on it. But it's perfectly safe to walk around - the worst thing that can happen is being robbed, and the probability is low! :) Yours Miguel Arroz On 2006/07/21, at 22:40, Praveen Boppana wrote: Thank you all for your suggestions. Anyway I have changed my hotel to Marriott which is right across the Moscone center. It looks like a little better place and do not have to deal with those people on streets that much. Only scary thing is Shopping center is right across the street and very much accessible to my wife :-) See you all at conference. Thanks, Praveen Boppana On Jul 21, 2006, at 3:50 PM, Paul Lynch wrote: On 20 Jul 2006, at 14:28, Praveen Boppana wrote: I'm staying in Hilton right across the street to Mark Twain. some one here on the list said not to leave any expensive items in the room. Is it really that bad, even rooms are not secured?. I'm little concerned because I'm bringing my wife with me and she will be staying in the Hotel room all day while I'm at conference. She is pretty new to America. She wanted to walk on the streets alone to look around the city (Which is out of question after seeing this thread). Do I need to consider changing the hotel?. Any suggestions There's absolutely no reason that your wife can't walk freely around the city, provided she follows the usual rules that any newcomer should follow anywhere. Check with the natives where and if it is safe; don't look like an obvious tourist; don't flash money/valuables around in public. Anywhere north of Market and east of Van Ness, apart from the Tenderloin, should be safe during daylight. 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: http://lists.apple.com/mailman/options/webobjects-dev/arroz% 40guiamac.com This email sent to [EMAIL PROTECTED] "I felt like putting a bullet between the eyes of every Panda that wouldn't scr*w to save its species." -- Fight Club Miguel Arroz http://www.ipragma.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/chill% 40global-village.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 archive@mail-archive.com
Re: WWDC WO Meet Up List
Joe Little wrote: Up front we just pay for the food and the bartender, with gratuity and tax included. That's what costing $6/person now (or perhaps $7 if I add a dish). Separately, there is a $15/person drink minimum, so people need to drink up on their own tab. At the end of the day, Sounds good to me. I dont know how much a beer is worth, but I'm planning on having one of each listed on the website, so I dont think that $15 will be a problem, although finding my way back to my hotel afterwards might be.. :) cheers, - shaun ___ 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 archive@mail-archive.com
Re: WO and Memory Management
Chuck Hill wrote: Hi Owen, Comments in-line below. On Jul 13, 2006, at 10:11 PM, Owen McKerrow wrote: Hi All, We are setting up an application of ours on a clients server, they did some stress testing to see if they needed a bigger box and discovered something strange. Their comments The webobjects versions have been stress tested further, we are getting ok results but far worse then I was hoping. RIS Public faired worse the RIS with it starting to get error with only 5 simultaneous users making simple request 5 seconds apart (running with 2 instances each with - mx512M. That is odd. Are you dispatching requests concurrently? No, getting them to retest with it on. That should make a considerable difference, unless the app is doing a lot of EOF activity. A major point of interest is that garbage collection does not appear to be active for these instances. Check for I/O and DB usage. How long does the average request take to process? From the stats page : Transactions 691 Active Session 0 Average transactions 5.031 Averegae idle131.627 Five seconds on average is, IMHO, way too long. Mine 2 :) Either all of your actions are a little slow or some are very slow. Sight unseen, my money is on the latter. Usually this is the result of DB access, either queries that are slow to evaluate due to missing indexes DOH ! **Hits self in the head** Thats one thing I need to do when there DBA gets back from holidays :) We moved the DB from OpenBase to Oracle and we haven't been back an applied indexing yet : ) That would cause problems. :-) or lots of single row queries due to a lack of batch faulting and pre-fetching in the application. I have fiddled with it today. At the beginning of the day it looked like (Note this a request for a page that loads a displaygroup to display every publication I have in the DB and the stats before are for the first time it is accessed for the app ) : 09:45:42,150 DEBUG [WorkerThread0] (PublicationsList:48 ) - Publication Constructor 09:45:43,188 DEBUG [WorkerThread0] (PublicationsList:149 updatePublicationListing) - Update Pubs 09:45:45,001 DEBUG [WorkerThread0] (PublicationsList:208 updatePublicationListing) - End Update Pubs.762 total Pubs 09:45:48,257 OFF [WorkerThread0] (Log.NSLogOut:1546 appendln) - Now asleep After my tweaks ( the biggest time saver here was changing to use EOSharedEditingContext, as its a read only ap ) : 13:32:53,295 DEBUG [WorkerThread0] (PublicationsList:48 ) - Publication Constructor 13:32:54,174 DEBUG [WorkerThread0] (PublicationsList:143 updatePublicationListing) - Update Pubs for Faculty of Education 13:32:54,920 DEBUG [WorkerThread0] (PublicationsList:196 updatePublicationListing) - End Update Pubs.762 total Pubs 13:32:58,467 OFF [WorkerThread0] (Log.NSLogOut:1546 appendln) - Now asleep So between the constructor ( line 1 ) and the time the Pubs have been loaded (line 3) went from 2.8 seconds to 1.6 ( and will hopefully get faster once I index **Hits self in the head again**) But the biggest time is between the end of the updatePublicationsList() and sleep(). I need to do some further testing to see if Im grabbing more objects from the DB ( as you said "lots of single row queries.") or its because of the actual page itself. The site has a quotation style engine in it which basically on the fly changes the way in which a publication is displayed. This is what suspect is chewing up time. The other reason I think this may be the case is the time between line 3 and line 4 doesn't change when I come back to the page i.e. the EO's should be in memory, but the time to "render" the page seems to be the same. I think you have reached the correct conclusion there. Are you a Project Wonder user? Nope, always wonder, never plunged. It may be my pet project while Im at WWDC this year. That sounds like another T-Shirt idea for Mike Schrag: Have you WONDERed? or Always WONDER! How about, WO Problems ? No WONDER : WONDER cheers, - shaun ___ 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 archive@mail-archive.com
Re: WWDC WO Meet
Hi, Mike Schrag wrote: We're about a month out ... What do people think of another WO meet this year? Good times had by all last year ( http://www.flickr.com/ photos/ken_anderson/sets/424925/ ) ms I will be attending this year and would love to meet up with you guys and gals. regards - shaun ___ 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 archive@mail-archive.com
Re: Eclipse, WO and Windows
Hi Owen, I abandoned windows completely quite a few years ago, but it used to be and probably still is, when using WOLips for dev the windows eomodeler and builder were launched when clicking the icon for modeller or builder. Owen McKerrow wrote: Hi All, For those that are developing on Windows under Eclipse what do you use as equivalents to WO-Builder and EOModler ? My understanding is that WOLips doesn't cover these 2. Thanks Owen McKerrow WebMaster, emlab Ph : +61 02 4221 5517 http://emlab.uow.edu.au - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cheers, - shaun ___ 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 archive@mail-archive.com
Re: Problem with webobject attributes in WOBuilder
Hi John, This is a bit of a long winded answer, I apologise for that. On Wed, 2006-06-14 at 12:54 +0100, John Stewart wrote: > OK, I've refined down what I'm trying to do. > > I'd like to keep this as MVC as possible, so the Java code should not > deal directly with the alternative styles, though It will provide the > logic to select the styles. > This is just my opinion and it may not be "correct" as far as some of the more experienced developers will say. So take this however you like. Ignore it completely if it doesn't sit well with you. Or shoot it down if you would prefer. :) Personally I think this is being way too anal about MVC for no really good reason(that I can see anyway). I think its probably a mistake to take a hard line and say that WOComponent subclasses are only the controller. IMO it's valid to say that a WOComponent is, or can be View. After all, a WOComponent+wod+html together are responsible for generating the view - look at the api of WOComponent and you will see this is the case. eg) appendToResponse. on the other hand WOComponent is also controller thanks to pageWithName. I think that stateless components also provide a good argument to say that WOComponent should not be relegated to Controller only. I mean, they don't have to do anything but view. Not to mention you can create WOComponents that have no HTML at all and generate the entire response in code. Probably not the best idea but it is possible regardless. I think the really important point in WO is to always ensure that WOComponent subclasses are never Model(bussines logic) in MVC. You will be very pissed off when you have to move logic from a WOComponent to reuse elsewhere. Copying the logic is not acceptable. Putting the logic in a superclass is not really acceptable unless it passes the is-a test. >From experience, I can say it totally sucks when you have logic in one component that you want to invoke but you don't want to call pageWithName as it screws with the context(the context returned from context() method of WOComponent that is). In the past I have had trouble figuring out if WOComponent is C or V in MVC. I now think it can be either or both. EG) some WOComponents can be built as View components only while others can be more of a Controller type of component and some are a mixture. AFAIK The whole point of MVC is reuse and clean separation to support reuse. How taking the class name for a css style out of the WOComponent will allow for a more reuse I don't see. If you are building a nested reusable component you simply provide a binding for the class name and the parent component or some other object supplies the class name at runtime or you can just stick it in the wod if you know it wont change. > The simplest version of this is a straight boolean describing "open" > or "closed" styles. The java code can, say, provide a boolean > "isOpen". > > If I create a ul wrapper "styleContainer" as below, I'd like to > include the "open" or "closed" styles, as well as a common "clear" > style. > > The output would be of the form: > > > >... > > > > > >... > > > Any ideas how I might do this without providing explicit class strings > in Java? Can a WOConditional be nested inside a WOGenericContainer > definition? > > I could wrap the two versions inside two WOConditionals, but then it > would mean duplicating the whole list. > Sure, but this would meet your MVC requirement. Although it does have some pretty serious drawbacks. > To further complicate things, what if I want more than 2 alternative > styles, e.g. fed by an integer instead of a boolean? > > Or is this one of WO's limitations where I have to include style > names > in the Java code? I don't think its a limitation of WO but rather one of the strict(and possibly misguided) approach taken as far as MVC is concerned. You have already listed an alternate option above. You will just end up with a mess in your WOComponent of nested conditionals. IMO its much better to relax your rules about MVC and put the class name in the component; after all you have stated that the logic will be there! If you want to change the style change the css - no big deal right? However there is another option that I can think of, and that is set the styles using Javascript. Your script might look like: //This would be an integer returned by the class logic or a string or // whatever identifier you want to use. var classToUse = '' //invoke this somewhere to set the class. function setClass(){ var class = (classToUse == 1) ? "open" : "closed"; document.getElementById("myList").class=class; //what
Re: WOUnitTest pattern?
Hi, Wolfram, Anjo, On Sat, 2006-05-13 at 16:54 +0200, Anjo Krank wrote: > OTTOMH, either move the actual methods to test elsewhere ie, don't do > nextPage.setValue(context().stringFormValueForKey("foo")) but instead > create a method that takes all needed info as parameters and test > this, or (preferably) create a request with the URL parameters you > want and create the DA manually, then call the methods you want to test. Or, use composition rather than sticking all the functional code inside the direct action method or class. eg) public WOActionResults myAction(){ String a,b,c; a = formValueForKey("a"); b = formValueForKey("b"); c = formValueForKey("c"); LogicObject lo = LogicObject.newInstance(a,b,c); lo.myAction(); CustomPage p = (CustomPate) lo.ok() ? pageWithName("CustomPageOK") : pageWithName("CustomPageNotOk"); p.setLogicObject(lo); return (WOActionResults)p; } Now you simply test the LogicObject's functionality not the DA. regards, - shaun ___ 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 archive@mail-archive.com
Re: Postgresql + booleans = error
Hi, On Sat, 2006-02-18 at 12:53 +1100, Lachlan Deck wrote: > Hi there, > > further to the other's suggestions... > > On 16/02/2006, at 2:40 AM, Randall Perry wrote: > > > I used eomodeler to generate the model and EO classes from a > > Postgresql db. > > I'm having a problem using the boolean data type. If I reference a > > boolean > > field 'rec.campsiteFri()' like so: > > > > if (rec.campsiteFri()) { > > return true; > > } > > > > I get a compiler error 'incompatible types'. > > Of course you do. For these kinds of Java-based errors you need to > ask yourself: > The return type of campsiteFri() is: > a) a 'boolean' > b) a 'Boolean' > c) a 'Number' > d) a primitive other than 'boolean' > e) some other Object > > You answer will have to be anything other than 'a' because in Java > (as opposed to C) 'if' statements must take a 'boolean' primitive > only (or an expression that returns a boolean primitive). Not an int > or even an Object of type Boolean. > I just thought I'd point out that if your using Java 5.0 that you can do the following: Boolean b = new Boolean(true); if (b){ // its true }else{ // its false } Yay autoboxing! regards -shaun ___ 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 archive@mail-archive.com