Re: Eclipse 4.4 support for WOLips
Works like charm! Great. Can we start building apps for Java 8? Thanks, Farrukh On Aug 31, 2014, at 3:54 PM, Pascal Robert prob...@macti.ca wrote: I just did a build from the master branch and it works for me. I don’t think so. Yesterday, I created a new folder, cloned the repo, and built. it failed until I did the checkout of the 4_4. On Aug 30, 2014, at 9:14 AM, Pascal Robert prob...@macti.ca wrote: Well, looks like I really did merge into master :-/ OK, I guess I misunderstood. Pull request 109 says: “ Eclipse 4.4 compatibility #109 Merged pascalrobert merged 8 commits into wocommunity:master from Wolfy42:eclipse_4_4 20 days ago I didn’t see any commits after that so I assumed everything was in master. FYI, I was able to build WOLips for Eclipse 4.4 without any errors. Tim UCLA GSEIS On Aug 29, 2014, at 2:20 PM, Pascal Robert prob...@macti.ca wrote: I didn't merge into master, I merged the pull request in the Wolfsonething-4.4 branch. Envoyé de mon iPhone Le 2014-08-29 à 16:27, Timothy Worman li...@thetimmy.com a écrit : OK, the reason I was getting an error earlier is because I was working from my own fork on github. So, if anyone else is doing that then the command to checkout pull request 109 is: git remote add upstream https://github.com/wocommunity/wolips.git git fetch upstream pull/109/head:eclipse_4_4 git checkout eclipse_4_4 What is confusing to me is that github indicates that Pascal merged 109 into wocommunity:master 20 days ago. I don’t see changes since then. Am I misunderstanding the current state of things? Is there another branch with further fixes? Tim UCLA GSEIS On Aug 29, 2014, at 12:54 PM, Theodore Petrosky tedp...@yahoo.com wrote: BTW, I googled:git what branch am I on http://stackoverflow.com/questions/5059441/how-to-find-which-git-branch-i-am-on-when-my-disk-is-mounted-on-other-server On Aug 29, 2014, at 2:11 PM, Ruggentaler, JR jr.ruggenta...@experian.com wrote: I started over and did the following but I am still getting compile errors. How do I tell if I am building the correct branch? git clone https://github.com/wocommunity/wolips.git wolips-4_4 cd wolips-4_4 git fetch origin pull/109/head:eclipse_4_4 git checkout eclipse_4_4 ant -Dbuild.version=4.4.0 Buildfile: /Users/a07278a/Repository/wolips-4_4/build.xml definestableupdatesite: print.environment: [echo] [echo] [echo] * java.home = /Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home/jre [echo] * build.compiler = javac1.5 [echo] * ant.home = /Users/a07278a/bin/ant [echo] * user.home = /Users/a07278a [echo] * build.version = 4.4.0 [echo] * build.version.to.replace = 1.0.6 [echo] * build.output.dir = temp [echo] * build.output.java.dir = temp/classes [echo] * build.output.java.test.dir = temp/testclasses [echo] * build.output.build.dir = temp/build [echo] * build.output.dist.dir = temp/dist [echo] * build.output.dist.targz.dir = temp/targz [echo] * deploy.dir = ${deploy.dir} (set by the buildserver) [echo] * eclipse.home = /Applications/eclipseLUNA44 [echo] * eclipse.deps.home = ${eclipse.deps.home}/features [echo] * no.clean = ${no.clean} [echo] * no.docs = ${no.docs} [echo] * compile options [echo] * compile.deprecation= on [echo] * compile.debug= on [echo] * compile.optimize= off [echo] * compile.source= 1.5 [echo] * compile.target= 1.5 [echo] * feature.updateSiteName= WOLips stable [echo] * feature.updateSite= http://webobjects.mdimension.com/wolips/stable/ [echo] [echo] verify.clean: set.clean: [echo] To skip the clean set the property no.clean in your build.properties call.clean: clean: .ds_store: .ds_store: check: check_file: set_other: correct_win: check_env: set_mac: check: prepare: [mkdir] Created dir: /Users/a07278a/Repository/wolips-4_4/temp/classes [mkdir] Created dir: /Users/a07278a/Repository/wolips-4_4/temp/build [mkdir] Created dir: /Users/a07278a/Repository/wolips-4_4/temp/dist [mkdir] Created dir: /Users/a07278a/Repository/wolips-4_4/temp/doc woenvironment: java: java: [javac] /Users/a07278a/Repository/wolips-4_4/buildscripts/ant-style-project.xml:17: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 62 source files to /Users/a07278a/Repository/wolips-4_4/temp/classes [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5 [javac] Note:
Re: angular and rest questions
You can subscribe to my wonder fork. I’ll be commit some code soon under ERAngular framework. https://github.com/ijazfx/wonder Farrukh On Aug 15, 2014, at 8:05 PM, Ray Kiddy r...@ganymede.org wrote: If you guys can put any of what you are doing up on a git repository, please do. I would like to see it. I am currently working on an AngularJS project. It does not have very much need for data, so there is no WO. But I am definitely going to try to be using this with WO in future work. I will be putting stuff up as I can clear work-specific stuff out of it. cheers - ray On Fri, 15 Aug 2014 02:16:51 +0300 Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: On Aug 15, 2014, at 1:41 AM, Larry Mills-Gahl elem...@gmail.com wrote: I’m not trying to build a single-page-app, but I am trying to take advantage of the browser side manipulation of elements to make the user interface more responsive without continually relying on server side. I’m generally a control freak so I tend to favor server-side rendering of elements, but considering the data is already on the client, I don’t think I’m losing anything to let the browser sort and filter the data. The simple test case I’m exploring is a list of reports that can be many hundreds at a time. Normally, I would render a page of raw rows on the server and ship it to the browser. If I use an ajax rest request to get the data, I can render the page (without data) on the server and ship it to the client, then the client makes an ajax request for the data. That pattern gives the browser a response more quickly and can provide feedback on the progress more easily than an interim step like the long response page. Once the json is loaded, the browser sorts and filters the list locally and does not need to go back to the server. So far so good. Assuming your JSON looks like: $scope.reports = [ {oid: ‘1', reportTitle: ’Report 1’}, {oid: ‘2', reportTitle: ‘Report 2’}, ... ]; The next step is to select one of the reports and display the detail page (where I’m using EO’s so that all the WO MVC goodness can be used) Defined another action on your ERRestRouteController which will return Edit or Detail component you want to show for your report details. You can use something like: @Path(“/report/{report:Report}”) public WOActionResults reportDetail(@PathParam Report report) { // load your component, set appropriate binding and return... } In your ng-repeat component, use ng-click e.g. ul li ng-repeat=“report in reports”a ng-click=“reportDetails($index)”{{report.reportTitle}}/a/li /ul The report details function will look like this. function reportDetails(i) { var oid = items[i].oid; window.location = ‘/report/‘ + oid; } I hope this will solve your problem or at least guide you in the right direction. Farrukh I am no angular expert and I may be thinking about this incorrectly, but it seems that if I use the angular MVC pattern with a read-only model, I will not get too screwed up. Angular has directives that compete with some of the WOComponents (like the WORepetition). I’m using the angular repetition component rather than a WORepetition so that I can get the in-browser functions. I will miss the easy data references to specific rows, but that requires a server round trip so I just have to ask the server explicitly for the object in the row rather than just referencing the object bound to the “item” in the WORepetition. I’m not wed to angular and will take another look at Montage. I think Ember is a good framework, but Angular seemed to be more tolerant of mixed environments (where you can have an app context that is a page fragment and even multiple app contexts in the same page.) I’m not an Ember guy either, but the most success I’ve had with Ember is when you can give yourself over to it and do the entire app in Ember. I don’t have that luxury at the moment. It may be my limited (mis-)understanding of Angular and Ember so I am absolutely open for correction and suggestions. Larry Mills-Gahl elem...@gmail.com On Aug 14, 2014, at 4:36 AM, Philippe Rabier prab...@icloud.com wrote: Hi Laurence, It's just by curiosity: what do you try to achieve with angular? Prepare some part of a page on the server side the send back to angular (a mix of data + HTML + javascript)? 1 member of our team gave it a try but didn't like it very much. And personally I don't know Angular. We are redeveloping our back office app with MontageJS and ERRest for several months and we didn't have any problem. So I'm wondering if we missed something. We modified ERRest (and still need to optimize it) but nothing related to MontageJS (we added the capability to choose the set of attributes we need in the request, to return an EPOCH time for NSTimestamp, …). So if you can give more informations that could interest
Re: angular and rest questions
everything on the server and send it to the browser but user experience (and expectations) is less tolerant of request response time for data they already see in the browser. I'm looking for a hybrid server client structure to satisfy my control freak (on the server) and the rich (richer) user experience. There are many fine client side frameworks and I'm looking at angular and polymer as options that don't require a complete takeover of the client side. = Larry Mills-Gahl On Aug 13, 2014, at 4:11 PM, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: In my experience, WebObjects and AngularJS are two opposite dimensions. They do not go well together without some work arounds. I’m trying to build ERAngular framework which could help WO developers to achieve what angular provides still coding on the server side. E.g. a ERAngularModule which could provide server side access to $scope so you don’t need to write any javascript. This will take time… till then you can try following two options. 1. expose your component actions as URLs that can for $http service. 2. Use Apache Cordova and use jars that are used for Android plugins (they are java code) … this may be tricky but once a plugin is written, it’s piece of cake to communicate for posting data. I’ll try to find a better solution for you in the mean time :) Farrukh On Aug 13, 2014, at 10:09 PM, Larry Mills-Gahl elem...@gmail.com wrote: I’ve got a project that I’m testing some angularjs with and am encouraged by some of the things in the browser that are pretty straight forward (loading and filtering json is pretty simple and appears to play well with others) Since I’m using hg-repeat instead of WORepetition, I’m looking for a good way to get the selected item from the angular repetition. (I feel like there should be a better way than hidden fields) Does anybody have any suggestions or javascript mojo to bridge the wo/ng component communication? Yes, this would be easier if it were completely REST, but it’s not (yet) so I’m trying to get the new, more interactive (browser centric) components to work and play well with the old server centric components. Larry Mills-Gahl elem...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/prabier%40icloud.com This email sent to prab...@icloud.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: angular and rest questions
In my experience, WebObjects and AngularJS are two opposite dimensions. They do not go well together without some work arounds. I’m trying to build ERAngular framework which could help WO developers to achieve what angular provides still coding on the server side. E.g. a ERAngularModule which could provide server side access to $scope so you don’t need to write any javascript. This will take time… till then you can try following two options. 1. expose your component actions as URLs that can for $http service. 2. Use Apache Cordova and use jars that are used for Android plugins (they are java code) … this may be tricky but once a plugin is written, it’s piece of cake to communicate for posting data. I’ll try to find a better solution for you in the mean time :) Farrukh On Aug 13, 2014, at 10:09 PM, Larry Mills-Gahl elem...@gmail.com wrote: I’ve got a project that I’m testing some angularjs with and am encouraged by some of the things in the browser that are pretty straight forward (loading and filtering json is pretty simple and appears to play well with others) Since I’m using hg-repeat instead of WORepetition, I’m looking for a good way to get the selected item from the angular repetition. (I feel like there should be a better way than hidden fields) Does anybody have any suggestions or javascript mojo to bridge the wo/ng component communication? Yes, this would be easier if it were completely REST, but it’s not (yet) so I’m trying to get the new, more interactive (browser centric) components to work and play well with the old server centric components. Larry Mills-Gahl elem...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Qualifier against target entity?
Hi Ken, I don't think there is any qualifier key like that. If it's just one or two objects, you can simply remove them from the fetched objects. Farrukh On Dec 8, 2013, at 9:41 PM, Ken Anderson kenli...@anderhome.com wrote: Of course, but not a class property... I swear there was a way to say: Student != EO But maybe I'm just senile :) On Dec 8, 2013, at 1:27 PM, Theodore Petrosky tedp...@yahoo.com wrote: what about the primary key? it is unique to the EO. On Dec 8, 2013, at 12:44 PM, Ken Anderson kenli...@anderhome.com wrote: No, I already have an EO I want to exclude... Not an attribute of an EO. On Dec 8, 2013, at 12:39 PM, Theodore Petrosky tedp...@yahoo.com wrote: Student.STUDENT_LAST_NAME.notIn(Smith) from what I see there is:in, notIn, inObjects, noInObjects is this what you are looking for? On Dec 7, 2013, at 11:01 PM, Ken Anderson kenli...@anderhome.com wrote: All, I know I’ve done this before, but I do it seldom enough that I can’t remember. I want to create a qualifier to select a bunch of objects but to exclude one of the objects that might match the qualifier: Give me all the Students where grade 80 and Student is not “Joe Smith” How do I do that again? and is there any special whizzy wonder ERX Key to do it? Thanks, Ken ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com This email sent to tedp...@yahoo.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RESOLVED: Re: Seems like partial commit to wonder?
Missed git pull. Working fine now. Farrukh On Nov 4, 2013, at 8:25 AM, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: Hi Pascal, It's local build after fetching latest source from github. It used to work fine as I always use fresh build every week. Farrukh On Nov 4, 2013, at 5:41 AM, Pascal Robert prob...@macti.ca wrote: This is a local build or a build coming from jenkins.wocommunity.org ? Hi There! I just updated my frameworks from git and started getting following error when running the application. I searched the local source code and also checked online at github for all branches but couldn't find ERXPatternParser class. Which I suspect as partial commit. Kindly advise. Thanks, Farrukh NSProperties.NestedProperties.load(): /Users/fijaz/WebObjects.properties log4j:WARN No appenders could be found for logger (NSLog). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. [2013-11-3 9:59:55 AST] main java.lang.ExceptionInInitializerError at com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116) at com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317) at com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743) at com.webobjects.appserver.WOApplication.init(WOApplication.java:779) at er.extensions.appserver.ajax.ERXAjaxApplication.init(ERXAjaxApplication.java:30) at er.extensions.appserver.ERXApplication.init(ERXApplication.java:1092) ... Caused by: com.webobjects.foundation.NSForwardException [java.lang.NoClassDefFoundError] er/extensions/logging/ERXPatternParser:java.lang.NoClassDefFoundError: er/extensions/logging/ERXPatternParser at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:697) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562) at com.webobjects.foundation.NSBundle.addBundle(NSBundle.java:853) at com.webobjects.foundation.development.NSBundleFactory.bundleForPathWithRegistry(NSBundleFactory.java:23) at com.webobjects.foundation.NSBundle.LoadBundlesFromClassPath(NSBundle.java:722) at com.webobjects.foundation.NSBundle.clinit(NSBundle.java:341) ... 18 more Caused by: java.lang.NoClassDefFoundError: er/extensions/logging/ERXPatternParser at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2446) at java.lang.Class.getConstructor0(Class.java:2756) at java.lang.Class.newInstance0(Class.java:328) at java.lang.Class.newInstance(Class.java:310) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:337) at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:797) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440) at er.extensions.logging.ERXLogger.configureLogging(ERXLogger.java:191) at er.extensions.logging.ERXLogger.configureLoggingWithSystemProperties(ERXLogger.java:165) at er.extensions.foundation.ERXConfigurationManager.loadConfiguration(ERXConfigurationManager.java:298) at er.extensions.foundation.ERXConfigurationManager.initialize(ERXConfigurationManager.java:203) at er.extensions.ERXExtensions.bundleDidLoad(ERXExtensions.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke
Seems like partial commit to wonder?
Hi There! I just updated my frameworks from git and started getting following error when running the application. I searched the local source code and also checked online at github for all branches but couldn't find ERXPatternParser class. Which I suspect as partial commit. Kindly advise. Thanks, Farrukh NSProperties.NestedProperties.load(): /Users/fijaz/WebObjects.properties log4j:WARN No appenders could be found for logger (NSLog). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. [2013-11-3 9:59:55 AST] main java.lang.ExceptionInInitializerError at com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116) at com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317) at com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743) at com.webobjects.appserver.WOApplication.init(WOApplication.java:779) at er.extensions.appserver.ajax.ERXAjaxApplication.init(ERXAjaxApplication.java:30) at er.extensions.appserver.ERXApplication.init(ERXApplication.java:1092) ... Caused by: com.webobjects.foundation.NSForwardException [java.lang.NoClassDefFoundError] er/extensions/logging/ERXPatternParser:java.lang.NoClassDefFoundError: er/extensions/logging/ERXPatternParser at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:697) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562) at com.webobjects.foundation.NSBundle.addBundle(NSBundle.java:853) at com.webobjects.foundation.development.NSBundleFactory.bundleForPathWithRegistry(NSBundleFactory.java:23) at com.webobjects.foundation.NSBundle.LoadBundlesFromClassPath(NSBundle.java:722) at com.webobjects.foundation.NSBundle.clinit(NSBundle.java:341) ... 18 more Caused by: java.lang.NoClassDefFoundError: er/extensions/logging/ERXPatternParser at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2446) at java.lang.Class.getConstructor0(Class.java:2756) at java.lang.Class.newInstance0(Class.java:328) at java.lang.Class.newInstance(Class.java:310) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:337) at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:797) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440) at er.extensions.logging.ERXLogger.configureLogging(ERXLogger.java:191) at er.extensions.logging.ERXLogger.configureLoggingWithSystemProperties(ERXLogger.java:165) at er.extensions.foundation.ERXConfigurationManager.loadConfiguration(ERXConfigurationManager.java:298) at er.extensions.foundation.ERXConfigurationManager.initialize(ERXConfigurationManager.java:203) at er.extensions.ERXExtensions.bundleDidLoad(ERXExtensions.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) ... 32 more Caused by: java.lang.ClassNotFoundException:
Re: Seems like partial commit to wonder?
Hi Pascal, It's local build after fetching latest source from github. It used to work fine as I always use fresh build every week. Farrukh On Nov 4, 2013, at 5:41 AM, Pascal Robert prob...@macti.ca wrote: This is a local build or a build coming from jenkins.wocommunity.org ? Hi There! I just updated my frameworks from git and started getting following error when running the application. I searched the local source code and also checked online at github for all branches but couldn't find ERXPatternParser class. Which I suspect as partial commit. Kindly advise. Thanks, Farrukh NSProperties.NestedProperties.load(): /Users/fijaz/WebObjects.properties log4j:WARN No appenders could be found for logger (NSLog). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. [2013-11-3 9:59:55 AST] main java.lang.ExceptionInInitializerError at com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116) at com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317) at com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743) at com.webobjects.appserver.WOApplication.init(WOApplication.java:779) at er.extensions.appserver.ajax.ERXAjaxApplication.init(ERXAjaxApplication.java:30) at er.extensions.appserver.ERXApplication.init(ERXApplication.java:1092) ... Caused by: com.webobjects.foundation.NSForwardException [java.lang.NoClassDefFoundError] er/extensions/logging/ERXPatternParser:java.lang.NoClassDefFoundError: er/extensions/logging/ERXPatternParser at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at er.extensions.appserver.ERXApplication$Loader.bundleDidLoad(ERXApplication.java:697) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562) at com.webobjects.foundation.NSBundle.addBundle(NSBundle.java:853) at com.webobjects.foundation.development.NSBundleFactory.bundleForPathWithRegistry(NSBundleFactory.java:23) at com.webobjects.foundation.NSBundle.LoadBundlesFromClassPath(NSBundle.java:722) at com.webobjects.foundation.NSBundle.clinit(NSBundle.java:341) ... 18 more Caused by: java.lang.NoClassDefFoundError: er/extensions/logging/ERXPatternParser at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2446) at java.lang.Class.getConstructor0(Class.java:2756) at java.lang.Class.newInstance0(Class.java:328) at java.lang.Class.newInstance(Class.java:310) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:337) at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:797) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440) at er.extensions.logging.ERXLogger.configureLogging(ERXLogger.java:191) at er.extensions.logging.ERXLogger.configureLoggingWithSystemProperties(ERXLogger.java:165) at er.extensions.foundation.ERXConfigurationManager.loadConfiguration(ERXConfigurationManager.java:298) at er.extensions.foundation.ERXConfigurationManager.initialize(ERXConfigurationManager.java:203) at er.extensions.ERXExtensions.bundleDidLoad(ERXExtensions.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
Re: Ajax Framework Bug?
Hi Johnny, There is a binding called fullSubmit for AjaxObserveField. Set it to false. That should solve the problem I believe. http://jenkins.wocommunity.org/job/WonderIntegration/lastBuild/javadoc/er/ajax/AjaxObserveField.html Farrukh On Nov 17, 2012, at 8:42 PM, Johnny Miller jlmil...@kahalawai.com wrote: Hi Amedeo, Actually, I think they were work the same way. But I tried for sanity's sake and it still is doing the same thing. Johnny On Nov 16, 2012, at 10:06 PM, Amedeo Mantica amedeomant...@me.com wrote: I'm on iPhone now btw wo:AjaxUpdateContainer observeFieldID Is weird. You should use AjaxObserveField Amedeo Sent from my iPhone On 17/nov/2012, at 03:13, Johnny Miller jlmil...@kahalawai.com wrote: Hi, I recently updated my Wonder Frameworks and I have a question about something I am seeing. One of my components broke and I'm thinking that either I misunderstand something or something in Ajax Framework has now changed. Given the following example: wo:form wo:popUpButton list = $arrayOfStrings selection = $selectedString id = StringSelector/wo:popUpButton wo:AjaxUpdateContainer observeFieldID = StringSelector wo:WOKeyValueConditional key = selectedString value = String Two String Two Is Selected /wo:WOKeyValueConditional /wo:AjaxUpdateContainer /wo:form wo:repetition list = $someOtherArrayOfStrings item = $aStringbr/ wo:str value = $aString / /wo:repetition I would assume that when the value of the pop up button changes only the contents of the AjaxUpdateContainer would get touched. However, if I put a logging statement on someOtherArrayOfStrings I can see that it gets called. It's like it is processing the whole component all over again. Is that the way it is supposed to work or has a bug been introduced? Aloha, Mr. Johnny Miller Web Development Manager Kahalawai Media Company Lahaina, HI 96761 tel: (808) 661-7962 | mobile: (808) 283-0791 website | e-mail ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/amedeomantica%40me.com This email sent to amedeomant...@me.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
ERXSequence.DatabaseSequence error
Hi Guys, I've updated my wonder to latest. The application that was running fine all of a sudden seems to be broken. I'm getting following exception what getting a DatabaseSequence object. This is the line of the code: new ERXSequence.DatabaseSequence(editingContext(), MyModel, VisaApplicationProcessNumber); and below is the exception. Caused by: com.webobjects.foundation.NSForwardException [org.postgresql.util.PSQLException] No results were returned by the query.:Error fetching sequence: VisaApplicationProcessNumber at er.extensions.eof.ERXSequence$DatabaseSequence.increasedMaxValue(ERXSequence.java:227) at er.extensions.eof.ERXSequence.nextValue(ERXSequence.java:65) ... 75 more Caused by: org.postgresql.util.PSQLException: No results were returned by the query. at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255) at er.extensions.eof.ERXSequence$DatabaseSequence.selectAndUpdateValue(ERXSequence.java:168) at er.extensions.eof.ERXSequence$DatabaseSequence.increasedMaxValue(ERXSequence.java:210) ... 80 more Here is the database query: qshield= select * from erx_sequence_table; name_ | value_ --+-- VisaApplicationProcessNumber | 2777 Any clue? Thanks, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXSequence.DatabaseSequence error
Hi Johann, I've debugged ERXSequence.java and found that following statement is causing problem: 168:con.createStatement().executeQuery(updateStatement); Since updateStatement does not return any result, it throws exception. I changed this with following which fixed the issue: 168:con.createStatement().execute(updateStatement); This needs to be fixed in Wonder. Thanks, Farrukh On Nov 22, 2012, at 9:21 PM, Johann Werner j...@oyosys.de wrote: Hi Farrukh, what is the SQL that is getting generated? jw Am 22.11.2012 um 18:06 schrieb Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com: Hi Guys, I've updated my wonder to latest. The application that was running fine all of a sudden seems to be broken. I'm getting following exception what getting a DatabaseSequence object. This is the line of the code: new ERXSequence.DatabaseSequence(editingContext(), MyModel, VisaApplicationProcessNumber); and below is the exception. Caused by: com.webobjects.foundation.NSForwardException [org.postgresql.util.PSQLException] No results were returned by the query.:Error fetching sequence: VisaApplicationProcessNumber at er.extensions.eof.ERXSequence$DatabaseSequence.increasedMaxValue(ERXSequence.java:227) at er.extensions.eof.ERXSequence.nextValue(ERXSequence.java:65) ... 75 more Caused by: org.postgresql.util.PSQLException: No results were returned by the query. at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255) at er.extensions.eof.ERXSequence$DatabaseSequence.selectAndUpdateValue(ERXSequence.java:168) at er.extensions.eof.ERXSequence$DatabaseSequence.increasedMaxValue(ERXSequence.java:210) ... 80 more Here is the database query: qshield= select * from erx_sequence_table; name_ | value_ --+-- VisaApplicationProcessNumber | 2777 Any clue? Thanks, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSessionStore deadlocks - SOLVED
Hi Maik, Use -XX:MaxPermSize=your-desired-size-in-mbm Farrukh On Nov 8, 2012, at 1:59 PM, Maik Musall m...@selbstdenker.ag wrote: Hi Chuck, a follow-up on this: Am 19.10.2012 um 20:05 schrieb Chuck Hill ch...@global-village.net: Hi Maik, This can also indicate some other things too: - session did not get checked in (app threw OutOfMemory, sleep() threw an exception) - previous request for this session is still running (deadlock, waiting, infinite loop) - 2+ requests for the same session in rapid sequence where the first terminates the session Looks like my answer that OutOfMemory would be OutOfTheQuestion was not true. I now discovered what lead to my application hanging every afternoon, after *once* it finally cared to log a proper message before hanging: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space Doh, the PermGen. I totally forgot about that. I had the app at -Xmx24576m, but didn't adjust PermGen. Now with a PermGen limit of 512m (of which currently about 154m gets used max according to jvisualvm) everything is finally running smoothly. The app turns out to load about 12000 classes over a workday. I think I need to have a look at what those are sometime... Maik Chuck On 2012-10-19, at 4:00 AM, Maik Musall wrote: Hi, I recently discovered what may be responsible for frequent deadlocks of an application here. In the jstack -l output, I see almost all threads waiting on a single ReentrantLock, and this thread is what holds that lock: WorkerThread4 prio=5 tid=103bc9000 nid=0x132caf000 in Object.wait() [132cae000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 22711d098 (a com.webobjects.appserver.WOSessionStore$TimeoutEntry) at java.lang.Object.wait(Object.java:485) at com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java:191) - locked 22711d098 (a com.webobjects.appserver.WOSessionStore$TimeoutEntry) at com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913) at er.extensions.appserver.ERXApplication.restoreSessionWithID(ERXApplication.java:2440) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:260) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:377) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2139) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2104) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:680) Locked ownable synchronizers: - 20ce7bbc0 (a java.util.concurrent.locks.ReentrantLock$NonfairSync) Now, ERXApplication.restoreSessionWithID contains an interesting call to useSessionStoreDeadlockDetection(), but this detection only works in single threaded mode. I'm afraid I can't afford to switch off concurrent requests even for a testing period in production. I'm looking for someone with experience regarding this problem. The doc for that method mentions that it could help to find cases when a session is checked out twice in a single RR-loop, which will lead to a session store lockup. Since I cannot switch on this detection, what in your experience could lead to that happening? Thanks Maik ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/practical_webobjects Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine! ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: WORequest, Logging IP-Addresses
context().request() Farrukh On Sep 6, 2012, at 2:21 PM, Thomas Grass (01SoftwareSolutions) off...@01softwaresolutions.eu wrote: Hi WO-Developers, i have a question concerning logging IP-Addresses of users. I have to log from which IP-Adresses users are using my WO-Application. To do this, i found a short script: http://en.wikibooks.org/wiki/WebObjects/Web_Applications/Development/Tips_and_Tricks The method clientIP(WORequest request) should return the IP-Address of the client. But how do i get the request on a WOComponent? Thank you very much, Thomas ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: EOSortOrdering first null
Try fetchSpecification.setHints(...) method and see if this can solve your problem? May be there is a way to tell the query optimizer through some hint to use nulls first or nulls last. Farrukh On 2012-07-19, at 9:02 AM, ALEXANDRE Grégoire g.alexan...@symaris.com wrote: hi, thanks for your reply, but i don't have all my object because i use objectInRange function so when i execute my fetchSpecification i just have the first ten element so i need to have last null sql function execute by my fetchSpecification. Le 18/07/12 22:00, Farrukh Ijaz a écrit : I don't think the API supports this function as it appears to be a vendor specific feature. There are two approaches and you can adapt whatever you like: Approach 1: This will make 2 db calls at minimum and will have more memory consumption. NSArrayMyTable objects1 = // objects where myDate() is null; NSArrayMyTable objects2 = // objects where myDate() is not null but sorted as you like... NSArrayMyTable objects = // append objects1 and objects2 Approach 2: This will make 1 db call, uses less memory. It's quite simple and easy to understand. The whole idea is to push the nulls at the end with minimum instructions. Case 1: descs() NSArrayMyTable objects = // sorted objects either using descs() so nulls are already at the end so no worries Case 2: ascs() NSArrayMyTable objects = // sorted objects using ascs() so nulls are in the beginning MyTable object = objects.get(objects.count() / 2); // to check if the if(object.myDate() != null) { EnumerationMyTable e = objects.objectEnumerator(); while(e.hasMoreElements()) { object = e.nextElement(); if(object.myDate() != null) break; objects.remove(object); objects.add(object); } } else { EnumerationMyTable e = objects.reverseObjectEnumerator(); while(e.hasMoreElements()) { object = e.nextElement(); if(object.myDate() == null) break; objects.remove(object); objects.add(0, object); } } // After the above code execution, the nulls are pushed to the end in minimum execution time. Farrukh On 2012-07-18, at 6:06 PM, ALEXANDRE Grégoire g.alexan...@symaris.com wrote: Yes but i need MyTable.MY_DATE.descs() // will put nulls at the end MyTable.MY_DATE.ascs() // will put nulls at the end = nulls last in sql and i used ERXEOControlUtilities.ObjectInRange... Le 18/07/12 16:14, Farrukh Ijaz a écrit : Hi, Should be something like: MyTable.MY_DATE.descs() // will put nulls at the end MyTable.MY_DATE.ascs() // will put nulls at the first Farrukh On 2012-07-18, at 2:02 PM, ALEXANDRE Grégoire g.alexan...@symaris.com wrote: hi, i need to create fecth specification with my null element at the end of the response for example i need tu create this; select * from my_table order by my_date nulls first; thanks for reply. -- Grégoire ALEXANDRE Développeur GIP Sym@ris Pavillon 1 27 rue du 4ème RSM B.P. 29 F-68250 ROUFFACH tel : 0389787406 Courriel : g.alexan...@symaris.com Web : http://www.symaris.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com -- Grégoire ALEXANDRE Développeur GIP Sym@ris Pavillon 1 27 rue du 4ème RSM B.P. 29 F-68250 ROUFFACH tel : 0389787406 Courriel : g.alexan...@symaris.com Web : http://www.symaris.com -- Grégoire ALEXANDRE Développeur GIP Sym@ris Pavillon 1 27 rue du 4ème RSM B.P. 29 F-68250 ROUFFACH tel : 0389787406 Courriel : g.alexan...@symaris.com Web : http://www.symaris.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: EOSortOrdering first null
On 2012-07-19, at 9:39 AM, Maik Musall m...@selbstdenker.ag wrote: Am 18.07.2012 um 22:00 schrieb Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com: Approach 2: This will make 1 db call, uses less memory. It's quite simple and easy to understand. The whole idea is to push the nulls at the end with minimum instructions. It uses less memory, but still does the null filtering in Java. I think the question was how to delegate that task to the database. I agree, that's why suggested to check median to find whether nulls are more or less and use reverse enumeration if needed and this null repositioning is much faster with worst case O(n/2) which is linear but still faster if records are in millions as repositioning will be done of at most half of the data size and basically is memory pointer relocation. Yes the question was about delegating to database but my opinion is this is vendor specific feature and perhaps not available from WO / Wonder API directly. EnumerationMyTable e = objects.objectEnumerator(); while(e.hasMoreElements()) { object = e.nextElement(); } Java side note: if you can't use a Java 5 foreach loop and still have to use Enumeration, you can at least do it in a for loop so that the reference to the Enumeration object is contained inside the loop: for( EnumerationMyTable e = objects.objectEnumerator(); e.hasMoreElements(); ) { object = e.nextElement(); } In regard to the original question: I'm not sure what you're up to, Grégoire. If you just don't want to deal with the null columns, include that in the fetchspec: new EOKeyValueQualifier( key, EOQualifier.QualifierOperatorNotEqual, NSKeyValueCoding.NullValue ); That's plain WO. Perhaps there's even a shorter way using some Wonder stuff I don't know about yet. Maik ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: EOSortOrdering first null
Hi, Should be something like: MyTable.MY_DATE.descs() // will put nulls at the end MyTable.MY_DATE.ascs() // will put nulls at the first Farrukh On 2012-07-18, at 2:02 PM, ALEXANDRE Grégoire g.alexan...@symaris.com wrote: hi, i need to create fecth specification with my null element at the end of the response for example i need tu create this; select * from my_table order by my_date nulls first; thanks for reply. -- Grégoire ALEXANDRE Développeur GIP Sym@ris Pavillon 1 27 rue du 4ème RSM B.P. 29 F-68250 ROUFFACH tel : 0389787406 Courriel : g.alexan...@symaris.com Web : http://www.symaris.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: EOSortOrdering first null
I don't think the API supports this function as it appears to be a vendor specific feature. There are two approaches and you can adapt whatever you like: Approach 1: This will make 2 db calls at minimum and will have more memory consumption. NSArrayMyTable objects1 = // objects where myDate() is null; NSArrayMyTable objects2 = // objects where myDate() is not null but sorted as you like... NSArrayMyTable objects = // append objects1 and objects2 Approach 2: This will make 1 db call, uses less memory. It's quite simple and easy to understand. The whole idea is to push the nulls at the end with minimum instructions. Case 1: descs() NSArrayMyTable objects = // sorted objects either using descs() so nulls are already at the end so no worries Case 2: ascs() NSArrayMyTable objects = // sorted objects using ascs() so nulls are in the beginning MyTable object = objects.get(objects.count() / 2); // to check if the if(object.myDate() != null) { EnumerationMyTable e = objects.objectEnumerator(); while(e.hasMoreElements()) { object = e.nextElement(); if(object.myDate() != null) break; objects.remove(object); objects.add(object); } } else { EnumerationMyTable e = objects.reverseObjectEnumerator(); while(e.hasMoreElements()) { object = e.nextElement(); if(object.myDate() == null) break; objects.remove(object); objects.add(0, object); } } // After the above code execution, the nulls are pushed to the end in minimum execution time. Farrukh On 2012-07-18, at 6:06 PM, ALEXANDRE Grégoire g.alexan...@symaris.com wrote: Yes but i need MyTable.MY_DATE.descs() // will put nulls at the end MyTable.MY_DATE.ascs() // will put nulls at the end = nulls last in sql and i used ERXEOControlUtilities.ObjectInRange... Le 18/07/12 16:14, Farrukh Ijaz a écrit : Hi, Should be something like: MyTable.MY_DATE.descs() // will put nulls at the end MyTable.MY_DATE.ascs() // will put nulls at the first Farrukh On 2012-07-18, at 2:02 PM, ALEXANDRE Grégoire g.alexan...@symaris.com wrote: hi, i need to create fecth specification with my null element at the end of the response for example i need tu create this; select * from my_table order by my_date nulls first; thanks for reply. -- Grégoire ALEXANDRE Développeur GIP Sym@ris Pavillon 1 27 rue du 4ème RSM B.P. 29 F-68250 ROUFFACH tel : 0389787406 Courriel : g.alexan...@symaris.com Web : http://www.symaris.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com -- Grégoire ALEXANDRE Développeur GIP Sym@ris Pavillon 1 27 rue du 4ème RSM B.P. 29 F-68250 ROUFFACH tel : 0389787406 Courriel : g.alexan...@symaris.com Web : http://www.symaris.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Installing Tools and Framework is a mess
Imagine you are not a swimmer, wearing a life jacket you jump in the pool. Suddenly the jacket deflates and you feel drowning, then you shout for help. Soon after you realize that someone holds your hand, it's Pascal, Chuck, Ramsay, David, ... and then you take your time and become a swimmer to save others :) I've been part of various communities and the best part of this community is, it's ghostly alive. Just post your question and you'll find the answer, even faster than you find things on Google or in a Wiki. Perhaps the documentation is already there and when you ask, you get the direct link to the document. I just enjoy being part of this live community. Farrukh On 2012-07-18, at 4:30 AM, G Brown gsbr...@umich.edu wrote: What do you all think? ...Oh, let me explain There is documentation for WOLips scattered in the Wonder wiki, the WOLips wiki, (WebObjects wiki?) etc. Why? Would it be a good idea to have it in one place/wiki? And then refer with those fancy hyperlink things to that one place? It would seem to me that would make updating it and finding it easier. It would seem that the natural place would be in the WOLips wiki. I can see how having it spread around makes extra documentation work and difficulties. Also, everything changes, but maybe the documentation can be set up to deal with the changes better. For example, a writer could refer to the current version throughout a document and maybe a note at the top would say the current recommended version is 4.5 (July 2014) and so on. Updating the document often would just be changing the 4.5 to 4.6, the date, July 2014 to March 2015, etc. Anything to help keep the documentation easy to update and provide clues as to what year the documentation was written. It is too bad we don't have IBM's Watson computer to read the mailing list, extract the juicy bits, assemble a rough draft of documentation, and email it to somebody for proof reading, probably to a Dave. Next decade? On Jul 17, 2012, at 5:19 PM, G Brown wrote: There is also: http://wiki.wocommunity.org/display/WOL/WOLips Getting Started The easiest way to install WOLips is to follow the steps in the Install WOLips with Eclipse Update Manager tutorial. If this is your first time using WOLips, this is the recommended method for installing WOLips. Also the installer should have a list of materials, or a page telling what all it does. On Jul 17, 2012, at 12:46 PM, Pascal Robert wrote: I do agree that we need to have an installer that will install Eclipse, WOLips, Wonder and the core WO frameworks. But we did cleanup the wiki a lot a couple of months ago, so I would like to know which pages on the wiki you followed, because this page: http://wiki.wocommunity.org/display/WONDER/Project+Wonder+Installation does specify that Java is not installed by default on Lion and launching a Java app will install the JVM. G Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/gsbrown%40umich.edu This email sent to gsbr...@umich.edu G Brown gsbr...@umich.edu ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Custom property returning NSDictionary with values appear nil in ERRest response
That's great if that solves the issue. Thanks Pascal! Farrukh Pascal Robert prob...@macti.ca wrote: Hi Farrukh, Looks like ERRest is thinking that a dict is a relationship, so add a filter with all keys when you include the dict in your main filter: filter.include(SocialPost.NETWORK_PROPERTIES, ERXKeyFilter.filterWithAll()); Hi Guys, I'm facing a situation and shall appreciate if anyone can lead to some possibility to achieve this? I've an entity named SocialPost which I use to link a social post with my entity where user can comment. The SocialPost has a toOne relationship with SocialNetwork and SocialNetwork has toMany relationship to NetworkProperty. I've defined a getter which returns a dictionary of network properties so in my rest response, I want to have the network properties as key value pairs. class SocialPost extends _SocialPost { public NSDictionaryString, String networkProperties() { NSDictionaryString, String _props = new NSMutableDictionaryString, String(); for(EntityProperty prop : toEntityProperties) { _props.put(prop.propertyName(), prop.propertyValue()); } return _props; } } The problem is the networkProperties() remains empty in the rest response: toSocialPosts = ( { networkProperties = { nil = true; }; toSocialNetwork = { type = SocialNetwork; id = 1; toNetworkProperties = (); }; id = 2; networkName = Facebook; type = SocialPost; postId = 256807467747310_351040008267284; }, { networkProperties = { nil = true; }; toSocialNetwork = { type = SocialNetwork; id = 2; toNetworkProperties = ( { type = NetworkProperty; id = 2; propertyKeyName = twitterMention; } ); }; id = 6; networkName = Twitter; type = SocialPost; postId = 20120409T102500; } ); It should be something like: toSocialPosts = ( { networkProperties = { nil = true; }; toSocialNetwork = { type = SocialNetwork; id = 1; toNetworkProperties = (); }; id = 2; networkName = Facebook; type = SocialPost; postId = 256807467747310_351040008267284; }, { networkProperties = { twitterMention = @ijazfx; }; toSocialNetwork = { type = SocialNetwork; id = 2; toNetworkProperties = ( { type = NetworkProperty; id = 2; propertyKeyName = twitterMention; } ); }; id = 6; networkName = Twitter; type = SocialPost; postId = 20120409T102500; } ); Am I missing something? Thanks in advance, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERREST response and NSDictionary
That someone is supposed to fix the issue :) Hafid, looks like the dictionary you're returning is empty. Farrukh Pascal Robert prob...@macti.ca wrote: Someone at WOWODC reported a similar bug and he was supposed to create a new issue on GitHub, looks like he forgot :-) Hi, I'm trying to return an NSDictionaryString, Boolean in ERREST response, my response is: {nil:true} It should be something like: {string1:true} any suggestion?? Thanks in advance, ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrations create issue with single-table inheritance
Can you confirm that the child entities are using the same Table Name? Can you share what is the error log on the console when migration fails? I've been using single table inheritance and so far didn't face any issues in migration. Farrukh On 2012-07-15, at 6:23 PM, Jesse Tayler jtay...@oeinc.com wrote: last time I setup migrations, there were prototypes that failed, I just cleaned up by hand I think -- what exactly is your error? I doubt is has to do with your inheritance... On Jul 15, 2012, at 1:48 AM, Mr. Robert Hanviriyapunt roberth...@mac.com wrote: I was trying out Migrations just now with a model that has single-table inheritance. I had some issues, namely that it choked on lines that added columns for the sub-entities. Anyone have the same issue? My work-around was to just move them to the parent entity before the create() is called. = Robert = ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com This email sent to jtay...@oeinc.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrating from EOF to Cayenne
Sorry for late response, just landed last night. The idea is very simple to understand and implement. E.g. I've a third party library which has a method named with following signature: String encode(String someString) { // some crappy encoding performed on someString and saved as encoded... return encoded; } Now this method can be private, public, protected, static, final, blah blah etc. I find that encoding is buggy, how to fix it? There are two ways: 1. Get the source code, fix the method and submit patch. (This is sometimes not possible and for sure not possible in case of WebObjects) 2. Use AOP Forget about option 1. In Option 2 we have to use some AOP mechanism and the one that I've tested with my Wonder apps is AspectJ. I'm not going into details as it's a vast subject but providing links which are sufficient to experiment :) http://www.eclipse.org/aspectj/ http://www.eclipse.org/aspectj/doc/released/progguide/starting-aspectj.html#the-dynamic-join-point-model As far as weaving is concerned, I would suggest to use dynamic join point as they can be used to intercept calls and invoke different code rather than modifying the original classes. The idea is we need to define join point for the method which is buggy or where we want to provide our own implementation. When the code is executed, the class loader reroutes the request for incoming method calls to our code. AOP is different that OOP. In contrast with OOP where methods are associated with Objects, AOP is used to classify those methods under common aspects and normally we use regular expressions for that. Two very common aspects I can explain here: 1. You may have lots of methods and you want to collect execution type for each method call. (A logging aspect) 2. A developer like me who put all the code in try block and catch one super Exception, someone would like to perform different operations on each sub-exception can write an aspect to catch my exceptions and do whatever he wants and then continue the original processing. I'm not familiar with internals of the WebObjects but the code that's responsible for single thread can be studied and multithreaded solution can be provided using AOP. If someone is interested to work with me to on this, I'm more than happy to help where I can :) Farrukh On 2012-07-11, at 10:25 PM, Chuck Hill ch...@global-village.net wrote: Hi Farrukh, I like the idea of using AOP to address bugs in WO. Can you give us any details on how you did that? As for making EOF multi-threaded that is a very fundamental part of the design. Fixing that with AOP would be challenging. :-) Chuck On 2012-07-11, at 11:12 AM, Farrukh Ijaz wrote: Hi, In past I've used AOP to address issues of closed source. This I believe if carefully used can help convert the EOF from single to multi threaded and/or solve other bottleneck problems. Having said this doesn't mean I'm against Cayane. However if the current EOF issues get fixed with AOP patched code would be better for those who don't want to or for some reasons can't switch to Cayane. Farrukh Chuck Hill ch...@global-village.net wrote: I agree that we need to more closely examine Cayenne before jumping in with both feet. How mature are the tools? What is the functionality gap? How important is the missing functionality? How costly is adding any needed functionality? Will the missing functionality fit in with the Cayenne architecture? How stable is it? How well does it scale (scaling is more than multi-threaded EOF)? And Cayenne is only EOAccess/EOControl. What do we do about the presentation layer? Getting rid of 2/3 of WO still leaves you with WO. Chuck On 2012-07-11, at 11:29 AM, Theodore Petrosky wrote: Hurray someone actually started talking about this. I want to add my two cents without starting a this is better than that conversation. If Cayenne is to be utilized, someone in the know must look not only at the current state of Cayenne, but at the developers. What is/was their philosophy behind what they write/wrote? If we don't, it will be a very short and costly marriage. Costly, because we either buck up and foot the bill to rewrite Webobjects or continue in a bad relationship. I am writing this not as a diatribe but because I am concerned that in the excitement of looking at Cayenne, the obvious impact of differing philosophies of the original authors may be ignored. BTW, I say original authors because the person that wrote the first line of code left his/her imprint on the direction of all code that follows. JMHO (i mean that sincerely). Ted Message: 4 Date: Wed, 11 Jul 2012 10:09:08 -0500 From: John Huss johnth...@gmail.com To: WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Subject: Migrating from EOF to Cayenne Message-ID: CAOUwSGtOwEayxK4im97HucAUANo=cfnrkq9ej5z+679bcd7
Re: Migrating from EOF to Cayenne
Weaving is different than Dynamic join point interception. Farrukh On 2012-07-11, at 10:40 PM, John Huss johnth...@gmail.com wrote: My understanding is that AOP requires weaving or rewriting of the bytecode. If so, this is not allowed by the license - it prohibits modification. But people may not care about that. Decompiling whole classes to fix bugs has been done before. It makes me quesy though. On Wed, Jul 11, 2012 at 1:12 PM, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: Hi, In past I've used AOP to address issues of closed source. This I believe if carefully used can help convert the EOF from single to multi threaded and/or solve other bottleneck problems. Having said this doesn't mean I'm against Cayane. However if the current EOF issues get fixed with AOP patched code would be better for those who don't want to or for some reasons can't switch to Cayane. Farrukh Chuck Hill ch...@global-village.net wrote: I agree that we need to more closely examine Cayenne before jumping in with both feet. How mature are the tools? What is the functionality gap? How important is the missing functionality? How costly is adding any needed functionality? Will the missing functionality fit in with the Cayenne architecture? How stable is it? How well does it scale (scaling is more than multi-threaded EOF)? And Cayenne is only EOAccess/EOControl. What do we do about the presentation layer? Getting rid of 2/3 of WO still leaves you with WO. Chuck On 2012-07-11, at 11:29 AM, Theodore Petrosky wrote: Hurray someone actually started talking about this. I want to add my two cents without starting a this is better than that conversation. If Cayenne is to be utilized, someone in the know must look not only at the current state of Cayenne, but at the developers. What is/was their philosophy behind what they write/wrote? If we don't, it will be a very short and costly marriage. Costly, because we either buck up and foot the bill to rewrite Webobjects or continue in a bad relationship. I am writing this not as a diatribe but because I am concerned that in the excitement of looking at Cayenne, the obvious impact of differing philosophies of the original authors may be ignored. BTW, I say original authors because the person that wrote the first line of code left his/her imprint on the direction of all code that follows. JMHO (i mean that sincerely). Ted Message: 4 Date: Wed, 11 Jul 2012 10:09:08 -0500 From: John Huss johnth...@gmail.com To: WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Subject: Migrating from EOF to Cayenne Message-ID: CAOUwSGtOwEayxK4im97HucAUANo=cfnrkq9ej5z+679bcd7...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 At WOWODC there was a lot of interest in migrating from EOF to Cayenne, and even entirely rebasing Wonder to run on top of Cayenne instead of EOF. *Why would anyone want to do this? * 1. Cayenne is open-source and is actively being developed 2. Cayenne has great concurrency support which is in stark contrast to EOF single-threaded architecture 3. Cayenne is conceptually very similar to EOF so the transition is fairly straightforward For those reasons it is a much better long term solution than EOF, which is now frozen in time. Cayenne can be used inside a WO application as an EOF replacement while continuing to use the rest of WebObjects. *I'm interested. Now what?* - Learn about Cayenne. The best source of information for comparing EOF and Cayenne is on the wikihttp://wiki.wocommunity.org/display/WO/Alternative+Technologies-Cayenne. In addition, you can look at the documentationhttp://cayenne.apache.org/for Cayenne. - Use Cayenne in your new projects. Cayenne runs just fine inside a WebObjects application. Wonder has the ERCayenne framework and ERCayenneExample to help you get started. I suggest working with the trunk of the Cayenne source (and Wonder too) since some things are just being added to make this easier. - Help work on easing and automating the migration from EOF to Cayenne. It is possible to automate a large part of the work involved in moving from EOF to Cayenne. But it requires effort. ERCayenne in Wonder has a class that will convert an EOModel to a Cayenne model (the class is CayenneConverter). This works well, but could be improved. I've started working on an Eclipse refactoring script that will convert from one API to the other. Yes, you may not have known (I didn't) that Eclipse can record a series of refactorings and save it as a script. The bulk of the migration work is creating refactoring scripts in Eclipse by performing refactorings on a stubbed out version of the EOF API to convert the API
Re: Migrating from EOF to Cayenne
On 2012-07-12, at 2:01 PM, Hugi Thordarson h...@karlmenn.is wrote: I think Hugi also use it. Is that a point for or against it? :-P PastedGraphic-1.png But yes, I've used Cayenne on a couple of projects. As you know it feels a *lot* like EOF and was by far the nicest ORM I could legally use at my previous pure java workplace. (protip: never go anywhere near JPA, it *will* rape your dog and kill your grandmother.) Apart from the technical similarities, Cayenne also has another important thing in common with WO: A good community and an active mailing list full of nice and helpful people, so you never get stuck along the way. What do you mean by it feels a *lot* like EOF? Is it because the method calls look alike? Regarding JPA, I've observed since I started working on EOF in 2010, very few know about J2EE in this community. JPA is not a standard, it's a specification. A clever WO developer can use EOF with JPA too :) http://en.wikibooks.org/wiki/Java_Persistence/What_is_JPA%3F Farrukh Cayenne is still missing a lot of functionality when compared to EOF/Wonder and generally feels less mature (understandably, since EOF is ancient). This is perhaps not such a huge problem, since functionality can always be added—but there is indeed a *lot* of work to be done to reach feature parity with EOF. It's clear that at some point most of us will have to stop using EOF in it's current form. In a perfect world (that's the world where I have endless time and money) I'd do a clean room implementation of EOF and live happily ever after. But this is indeed not a perfect world, so helping making Cayenne better and more integrated with WO seems like a more realistic goal (besides, it allows more resources to be spent on a re-implementation of WO; something I'd love to participate in). - hugi ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrating from EOF to Cayenne
On 2012-07-12, at 6:32 PM, arosenzw...@clinworx.com wrote: Hi WOrriors, I still question why we are fighting so hard for Object-relational mapping. If we are contemplating doing work, shouldn't we consider going straight for object databases? Take out the transcription layer. Let's get more productive. Only use OR-mapping for old systems that we must interface with but new work should consider the advantages of being pure objects, all the time. I don't think we've many reporting and charting tools that work directly with Objects. Capturing data is not an issue, the real challenge is to reuse captured data for BI. Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrating from EOF to Cayenne
Just a fix, I mean JPA is not a product but a specification :) Farrukh On 2012-07-13, at 3:41 PM, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: On 2012-07-12, at 2:01 PM, Hugi Thordarson h...@karlmenn.is wrote: I think Hugi also use it. Is that a point for or against it? :-P PastedGraphic-1.png But yes, I've used Cayenne on a couple of projects. As you know it feels a *lot* like EOF and was by far the nicest ORM I could legally use at my previous pure java workplace. (protip: never go anywhere near JPA, it *will* rape your dog and kill your grandmother.) Apart from the technical similarities, Cayenne also has another important thing in common with WO: A good community and an active mailing list full of nice and helpful people, so you never get stuck along the way. What do you mean by it feels a *lot* like EOF? Is it because the method calls look alike? Regarding JPA, I've observed since I started working on EOF in 2010, very few know about J2EE in this community. JPA is not a standard, it's a specification. A clever WO developer can use EOF with JPA too :) http://en.wikibooks.org/wiki/Java_Persistence/What_is_JPA%3F Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrating from EOF to Cayenne
Sorry for late response, just landed last night. The idea is very simple to understand and implement. E.g. I've a third party library which has a method named with following signature: String encode(String someString) { // some crappy encoding performed on someString and saved as encoded... return encoded; } Now this method can be private, public, protected, static, final, blah blah etc. I find that encoding is buggy, how to fix it? There are two ways: 1. Get the source code, fix the method and submit patch. (This is sometimes not possible and for sure not possible in case of WebObjects) 2. Use AOP Forget about option 1. In Option 2 we have to use some AOP mechanism and the one that I've tested with my Wonder apps is AspectJ. I'm not going into details as it's a vast subject but providing links which are sufficient to experiment :) http://www.eclipse.org/aspectj/ http://www.eclipse.org/aspectj/doc/released/progguide/starting-aspectj.html#the-dynamic-join-point-model As far as weaving is concerned, I would suggest to use dynamic join point as they can be used to intercept calls and invoke different code rather than modifying the original classes. The idea is we need to define join point for the method which is buggy or where we want to provide our own implementation. When the code is executed, the class loader reroutes the request for incoming method calls to our code. AOP is different that OOP. In contrast with OOP where methods are associated with Objects, AOP is used to classify those methods under common aspects and normally we use regular expressions for that. Two very common aspects I can explain here: 1. You may have lots of methods and you want to collect execution type for each method call. (A logging aspect) 2. A developer like me who put all the code in try block and catch one super Exception, someone would like to perform different operations on each sub-exception can write an aspect to catch my exceptions and do whatever he wants and then continue the original processing. I'm not familiar with internals of the WebObjects but the code that's responsible for single thread can be studied and multithreaded solution can be provided using AOP. If someone is interested to work with me to on this, I'm more than happy to help where I can :) Farrukh On 2012-07-11, at 10:25 PM, Chuck Hill ch...@global-village.net wrote: Hi Farrukh, I like the idea of using AOP to address bugs in WO. Can you give us any details on how you did that? As for making EOF multi-threaded that is a very fundamental part of the design. Fixing that with AOP would be challenging. :-) Chuck On 2012-07-11, at 11:12 AM, Farrukh Ijaz wrote: Hi, In past I've used AOP to address issues of closed source. This I believe if carefully used can help convert the EOF from single to multi threaded and/or solve other bottleneck problems. Having said this doesn't mean I'm against Cayane. However if the current EOF issues get fixed with AOP patched code would be better for those who don't want to or for some reasons can't switch to Cayane. Farrukh Chuck Hill ch...@global-village.net wrote: I agree that we need to more closely examine Cayenne before jumping in with both feet. How mature are the tools? What is the functionality gap? How important is the missing functionality? How costly is adding any needed functionality? Will the missing functionality fit in with the Cayenne architecture? How stable is it? How well does it scale (scaling is more than multi-threaded EOF)? And Cayenne is only EOAccess/EOControl. What do we do about the presentation layer? Getting rid of 2/3 of WO still leaves you with WO. Chuck On 2012-07-11, at 11:29 AM, Theodore Petrosky wrote: Hurray someone actually started talking about this. I want to add my two cents without starting a this is better than that conversation. If Cayenne is to be utilized, someone in the know must look not only at the current state of Cayenne, but at the developers. What is/was their philosophy behind what they write/wrote? If we don't, it will be a very short and costly marriage. Costly, because we either buck up and foot the bill to rewrite Webobjects or continue in a bad relationship. I am writing this not as a diatribe but because I am concerned that in the excitement of looking at Cayenne, the obvious impact of differing philosophies of the original authors may be ignored. BTW, I say original authors because the person that wrote the first line of code left his/her imprint on the direction of all code that follows. JMHO (i mean that sincerely). Ted Message: 4 Date: Wed, 11 Jul 2012 10:09:08 -0500 From: John Huss johnth...@gmail.com To: WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Subject: Migrating from EOF to Cayenne Message-ID: CAOUwSGtOwEayxK4im97HucAUANo=cfnrkq9ej5z+679bcd7
Re: Migrating from EOF to Cayenne
Yes, the JPA is a spec, I just think it is a bad spec :). The Criteria API alone made me want to grab my head by the eyesockets and remove it from my torso. That's pretty big statement, I might have agreed with you if I wasn't aware of what's JPA is all about. Here is the specification detail page and I believe all big giants are listed there in experts group. No more religious war please :) http://jcp.org/en/jsr/detail?id=220 Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrating from EOF to ????
On 2012-07-13, at 11:11 PM, Chuck Hill ch...@global-village.net wrote: Is rewriting EOF and webobjects even a possibility? If yes, what about an outline of what is required to undertake this magnitude of project. Yes, it is possible. It was written once, it can be written again. I don't know if it is practical though. I doubt that any or even all of us have the resources to fund that. Apple has a LOT of man years in WO. Rewriting EOF + new Bugs + Lots of Man Hours = Existing EOF + AOP Patched Code + Few Man Hours The only issue I would say which is an issue is maintenance of the patched code. Since aspects reside outside and integrate at runtime, it will be difficult for someone to trace where the bug is lying (in EOF or in the patched code) unless it's well documented. The choice is in the hands of community but I think we should give AOP a try before we start rewriting the whole EOF or go for alternatives, it's much faster to test. After all, I will do what Romans do in Rome :) Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Who uses ERDirectToRest ?
AFAIK, nobody use it, except maybe Anjo. Using the routes based API in ERRest in quite easy, but I do agree that being able to use D2W rules instead of ERXKeyFilter to decide what is going to be send or accepted would be cool. One can use following methods in the Route Controller class. I have create a BaseRouteController and defined all useful methods in it. Farrukh private D2WContext d2wContext; protected D2WContext d2wContext() { if (d2wContext == null) { d2wContext = new D2WContext(); } return d2wContext; } synchronized public NSArrayString inferFilterKeysForEntity(String entityName) { EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName); d2wContext().setEntity(entity); d2wContext().setTask(request().method()); return (NSArrayString) d2wContext().inferValueForKey(displayPropertyKeys); } synchronized public NSArrayString inferFilterKeysForPage(String page) { d2wContext().setDynamicPage(page); d2wContext().setTask(request().method()); return (NSArrayString) d2wContext().inferValueForKey(displayPropertyKeys); } public ERXKeyFilter showFilter(String entityName) { NSArrayString keys = inferFilterKeysForEntity(entityName); ERXKeyFilter filter = null; if (keys != null !keys.isEmpty()) { filter = ERXKeyFilter.filterWithNone(); for (String key : keys) { filter.include(new ERXKeyString(key)); } } else { filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships(); } return filter; } The D2WRule should be something like: LHS: entity.name = 'Employee' and task = 'GET' RHS: displayPropertyKeys = ('firstName', 'lastName', 'position') I've just started to use REST with our business logic. I wanted to use ERDirectToRest because it seems very interesting to quickly delivery access to the business logic but there are a lot of warning to NOT use it: - In the read me: This framework uses the old and deprecated REST APIs, avoid using it. - Classes are deprecated So my questions: - Can this framework be used ? - Does anybody use it ? - What people use instead ? Dominique ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Who uses ERDirectToRest ?
Thanks Pascal for adding it to WIKI. My first indirect community contribution :) Farrukh On 2012-07-14, at 1:59 AM, Pascal Robert prob...@macti.ca wrote: Le 2012-07-13 à 17:21, Farrukh Ijaz a écrit : AFAIK, nobody use it, except maybe Anjo. Using the routes based API in ERRest in quite easy, but I do agree that being able to use D2W rules instead of ERXKeyFilter to decide what is going to be send or accepted would be cool. One can use following methods in the Route Controller class. I have create a BaseRouteController and defined all useful methods in it. Thanks. I added it to the wiki: http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-UsingD2WruleswithERRest Farrukh private D2WContext d2wContext; protected D2WContext d2wContext() { if (d2wContext == null) { d2wContext = new D2WContext(); } return d2wContext; } synchronized public NSArrayString inferFilterKeysForEntity(String entityName) { EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName); d2wContext().setEntity(entity); d2wContext().setTask(request().method()); return (NSArrayString) d2wContext().inferValueForKey(displayPropertyKeys); } synchronized public NSArrayString inferFilterKeysForPage(String page) { d2wContext().setDynamicPage(page); d2wContext().setTask(request().method()); return (NSArrayString) d2wContext().inferValueForKey(displayPropertyKeys); } public ERXKeyFilter showFilter(String entityName) { NSArrayString keys = inferFilterKeysForEntity(entityName); ERXKeyFilter filter = null; if (keys != null !keys.isEmpty()) { filter = ERXKeyFilter.filterWithNone(); for (String key : keys) { filter.include(new ERXKeyString(key)); } } else { filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships(); } return filter; } The D2WRule should be something like: LHS: entity.name = 'Employee' and task = 'GET' RHS: displayPropertyKeys = ('firstName', 'lastName', 'position') I've just started to use REST with our business logic. I wanted to use ERDirectToRest because it seems very interesting to quickly delivery access to the business logic but there are a lot of warning to NOT use it: - In the read me: This framework uses the old and deprecated REST APIs, avoid using it. - Classes are deprecated So my questions: - Can this framework be used ? - Does anybody use it ? - What people use instead ? Dominique ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Migrating from EOF to Cayenne
Hi, In past I've used AOP to address issues of closed source. This I believe if carefully used can help convert the EOF from single to multi threaded and/or solve other bottleneck problems. Having said this doesn't mean I'm against Cayane. However if the current EOF issues get fixed with AOP patched code would be better for those who don't want to or for some reasons can't switch to Cayane. Farrukh Chuck Hill ch...@global-village.net wrote: I agree that we need to more closely examine Cayenne before jumping in with both feet. How mature are the tools? What is the functionality gap? How important is the missing functionality? How costly is adding any needed functionality? Will the missing functionality fit in with the Cayenne architecture? How stable is it? How well does it scale (scaling is more than multi-threaded EOF)? And Cayenne is only EOAccess/EOControl. What do we do about the presentation layer? Getting rid of 2/3 of WO still leaves you with WO. Chuck On 2012-07-11, at 11:29 AM, Theodore Petrosky wrote: Hurray someone actually started talking about this. I want to add my two cents without starting a this is better than that conversation. If Cayenne is to be utilized, someone in the know must look not only at the current state of Cayenne, but at the developers. What is/was their philosophy behind what they write/wrote? If we don't, it will be a very short and costly marriage. Costly, because we either buck up and foot the bill to rewrite Webobjects or continue in a bad relationship. I am writing this not as a diatribe but because I am concerned that in the excitement of looking at Cayenne, the obvious impact of differing philosophies of the original authors may be ignored. BTW, I say original authors because the person that wrote the first line of code left his/her imprint on the direction of all code that follows. JMHO (i mean that sincerely). Ted Message: 4 Date: Wed, 11 Jul 2012 10:09:08 -0500 From: John Huss johnth...@gmail.com To: WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Subject: Migrating from EOF to Cayenne Message-ID: CAOUwSGtOwEayxK4im97HucAUANo=cfnrkq9ej5z+679bcd7...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 At WOWODC there was a lot of interest in migrating from EOF to Cayenne, and even entirely rebasing Wonder to run on top of Cayenne instead of EOF. *Why would anyone want to do this? * 1. Cayenne is open-source and is actively being developed 2. Cayenne has great concurrency support which is in stark contrast to EOF single-threaded architecture 3. Cayenne is conceptually very similar to EOF so the transition is fairly straightforward For those reasons it is a much better long term solution than EOF, which is now frozen in time. Cayenne can be used inside a WO application as an EOF replacement while continuing to use the rest of WebObjects. *I'm interested. Now what?* - Learn about Cayenne. The best source of information for comparing EOF and Cayenne is on the wikihttp://wiki.wocommunity.org/display/WO/Alternative+Technologies-Cayenne. In addition, you can look at the documentationhttp://cayenne.apache.org/for Cayenne. - Use Cayenne in your new projects. Cayenne runs just fine inside a WebObjects application. Wonder has the ERCayenne framework and ERCayenneExample to help you get started. I suggest working with the trunk of the Cayenne source (and Wonder too) since some things are just being added to make this easier. - Help work on easing and automating the migration from EOF to Cayenne. It is possible to automate a large part of the work involved in moving from EOF to Cayenne. But it requires effort. ERCayenne in Wonder has a class that will convert an EOModel to a Cayenne model (the class is CayenneConverter). This works well, but could be improved. I've started working on an Eclipse refactoring script that will convert from one API to the other. Yes, you may not have known (I didn't) that Eclipse can record a series of refactorings and save it as a script. The bulk of the migration work is creating refactoring scripts in Eclipse by performing refactorings on a stubbed out version of the EOF API to convert the API into the equivalent Cayenne API. After performing the refactorings, a script can be exported using Refactor-Create Script. For EOF methods that do not have a direct Cayenne equivalent, helper methods (or classes) will need to be written that can serve as a direct replacement. *How can I help specifically with the migration effort?* - CayenneConverter in ERCayenne (for converting the model) does not convert the connection dictionaries in the EOModel yet. - CayenneConverter does a poor job converting fetch specs defined in the model currently. - We need to create new
Re: failed to find a snapshot for EO with Global ID
Hi Ramsey, I think, the parent ec doesn't know anything what's in the child ec. So according to your code, the employee records belong to child ec. ec.saveChanges() after nested.saveChanges() inside the inner loop has no effect as there are no changes in parent ec to save at this point. Try nestC.delete() after nested.saveChanges(). I this works, then I guess you need to refetch the relationships for c before you call c.delete(). But I am confused why it's working for lesser items :) Farrukh Ramsey Gurley rgur...@smarthealth.com wrote: Hi all, I have a suspicion that something is wrong with the way nested ECs are currently working. The errors I see are the result of missing snapshots. The errors are very sporadic and hard to reproduce. I've managed to distill this down to a simple test case. If I drop this: public void testNestedECs() { try { EOEditingContext ec = ERXEC.newEditingContext(); for(int i = 0; i 100; i++) { Company c = (Company) EOUtilities.createAndInsertInstance(ec, Company.ENTITY_NAME); c.setName(UUID.randomUUID().toString()); ec.saveChanges(); EOEditingContext nested = ERXEC.newEditingContext(ec); Company nestC = c.localInstanceIn(nested); for(int j = 0; j 10; j++) { Employee e = (Employee) EOUtilities.createAndInsertInstance(nested, Employee.ENTITY_NAME); e.setFirstName(UUID.randomUUID().toString()); e.setLastName(UUID.randomUUID().toString()); e.setManager(Boolean.FALSE); e.addObjectToBothSidesOfRelationshipWithKey(nestC, Employee.COMPANY_KEY); nested.saveChanges(); ec.saveChanges(); } c.delete(); ec.saveChanges(); //Line 78 } } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } } into ERXECTest.java, I get fairly reliable failures due to missing snapshots. java.lang.IllegalStateException: recordDeleteForObject: com.webobjects.eoaccess.EODatabaseContext com.webobjects.eoaccess.EODatabaseContext@489bb457 failed to find a snapshot for EO with Global ID:_EOIntegralKeyGlobalID[Employee (java.lang.Integer)491] that has been deleted from er.extensions.eof.ERXECer.extensions.eof.ERXEC@44581ea2. Cannot delete an object that has not been fetched from the database at com.webobjects.eoaccess.EODatabaseContext.recordDeleteForObject(EODatabaseContext.java:4732) at com.webobjects.eoaccess.EODatabaseContext.recordChangesInEditingContext(EODatabaseContext.java:5890) at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:373) at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192) at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1177) at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1100) at er.extensions.eof.ERXECTest.testNestedECs(ERXECTest.java:78) If I drop the number of loops down to 10 instead of 100, I don't see the exceptions. Does anyone see an obvious problem with my test case or perhaps have ideas about what's going wrong before I begin digging? :-) Ramsey ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Creating Wonder D2W Application using WOLips without ERModernLook?
Hi, I was wondering if I could possibly create a Wonder D2W Application using WOLips without the dependency on ERModernLook? Right now ERModernLook seems to be tightly coupled with Wonder D2W Application and I don't find any option to choose from one of the old looks and, there is no option in WOLips to create a WebObjects D2W Application which used to be there in previous versions of WOLips I remember. ERModernLook is an excellent D2W framework, I just need a bare D2W application to test my own look and feel framework. Thanks for your advice, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Creating Wonder D2W Application using WOLips without ERModernLook?
Thanks David, The answer No is a kind of disappointing :( I need to know what areas are affected with this change so I could remove it completely. I shall figure that out. I believe it's better if could move it back in WOLips and make modern look as separate project template. May be we would be able to contribute our look too :) Farrukh David Holt programming...@mac.com wrote: I am pretty sure the answer is no. Are you having challenges removing the Modern Look dependencies? Sent from my iPad On 2012-06-09, at 12:37 AM, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: Hi, I was wondering if I could possibly create a Wonder D2W Application using WOLips without the dependency on ERModernLook? Right now ERModernLook seems to be tightly coupled with Wonder D2W Application and I don't find any option to choose from one of the old looks and, there is no option in WOLips to create a WebObjects D2W Application which used to be there in previous versions of WOLips I remember. ERModernLook is an excellent D2W framework, I just need a bare D2W application to test my own look and feel framework. Thanks for your advice, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com This email sent to programming...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Custom property returning NSDictionary with values appear nil in ERRest response
Hi Guys, I'm facing a situation and shall appreciate if anyone can lead to some possibility to achieve this? I've an entity named SocialPost which I use to link a social post with my entity where user can comment. The SocialPost has a toOne relationship with SocialNetwork and SocialNetwork has toMany relationship to NetworkProperty. I've defined a getter which returns a dictionary of network properties so in my rest response, I want to have the network properties as key value pairs. class SocialPost extends _SocialPost { public NSDictionaryString, String networkProperties() { NSDictionaryString, String _props = new NSMutableDictionaryString, String(); for(EntityProperty prop : toEntityProperties) { _props.put(prop.propertyName(), prop.propertyValue()); } return _props; } } The problem is the networkProperties() remains empty in the rest response: toSocialPosts = ( { networkProperties = { nil = true; }; toSocialNetwork = { type = SocialNetwork; id = 1; toNetworkProperties = (); }; id = 2; networkName = Facebook; type = SocialPost; postId = 256807467747310_351040008267284; }, { networkProperties = { nil = true; }; toSocialNetwork = { type = SocialNetwork; id = 2; toNetworkProperties = ( { type = NetworkProperty; id = 2; propertyKeyName = twitterMention; } ); }; id = 6; networkName = Twitter; type = SocialPost; postId = 20120409T102500; } ); It should be something like: toSocialPosts = ( { networkProperties = { nil = true; }; toSocialNetwork = { type = SocialNetwork; id = 1; toNetworkProperties = (); }; id = 2; networkName = Facebook; type = SocialPost; postId = 256807467747310_351040008267284; }, { networkProperties = { twitterMention = @ijazfx; }; toSocialNetwork = { type = SocialNetwork; id = 2; toNetworkProperties = ( { type = NetworkProperty; id = 2; propertyKeyName = twitterMention; } ); }; id = 6; networkName = Twitter; type = SocialPost; postId = 20120409T102500; } ); Am I missing something? Thanks in advance, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: AjaxFileUpload succeeded message disappearing
Hi, Try setting progressBarAfterDone=true for AjaxFileUpload bindings. Farrukh Sent from my iPhone On 2012-05-04, at 1:47 AM, Larry Mills-Gahl l...@webfarm.com wrote: I have an AjaxFileUpload component that is working well except that when it is finished with the upload, the success message goes away. The progress bar also goes away and there is no confirmation that the file has been succesfully uploaded (even though it has) Does anybody have an idea of what is happening or how I can track down this behavior? Larry Larry Mills-Gahl l...@webfarm.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Components Trouble
Hi Ron,Is this happing with any project you create? If not then check the file resources.include.patternset under woproject folder. It should be something like this. Looks like the app can't locate the .wo folder.FarrukhOn 2012-04-26, at 11:56 AM, Ron X wrote:hii have some problem with components:@Override public WOActionResults defaultAction() { WOComponent page = pageWithName(Main.class);return page; }DEBUG 42.53 MB used/38.53 MB free [WorkerThread0] (ERXNSLogLog4jBridge.java:46) - com.webobjects.appserver._private.WOComponentDefinition No template found for component Main at "file:/Users/user/Documents/workspace/XMobile/". and so happens with any component if i change Main to it - for example PageWrapper or another.what is it? ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.comThis email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [ANN] WOInject 1.0
Hi Ron, See my comments below: On 2012-04-13, at 10:55 AM, Ron X wrote: hi public class Application extends InjectableApplication { private static Logger log = Logger.getLogger(Application.class); public static void main(String[] argv) { WOInject.init(com.legalsounds.Application, argv); } @Facebook Socialable socialPerson; public Application() { Injector injector = injector(); socialPerson = injector.getInstance(Socialable.class); You are confusing the injector by providing Socialable.class, it must be socialPerson = injector.getInstance(FacebookPerson.class); I tell you the reason: E.g. you've another bindable annotation named Twitter and you've TwitterPerson extending Socialable, what you expect the injector to return when you call injector.getInstance(Socialble.class) when it has no means to understand what implementation you're looking for? Hope this helps. Farrukh ..fails at this line @Override protected Module[] modules() { return new Module[] { new SocialModule() }; } } public class SocialModule extends AbstractModule { @Override protected void configure() { bind(Socialable.class).annotatedWith(Facebook.class).to(FacebookPerson.class).in(WOScopes.SESSION); } } public class FacebookPerson implements Socialable { private static Logger log = Logger.getLogger(FacebookPerson.class); @Override public void send(ListSocialable socialPersonList) { log.info(this); } } stack trace: WARN 32.7 MB used/48.36 MB free [ProcessChangesQueue] (ERXNSLogLog4jBridge.java:43) - A fatal exception occurred: Guice configuration errors: 1) No implementation for com.ronx.module.Socialable was bound. while locating com.ronx.module.Socialable 1 error [2012-4-13 0:49:49 PDT] ProcessChangesQueue com.google.inject.ConfigurationException: Guice configuration errors: 1) No implementation for com.ronx.module.Socialable was bound. while locating com.ronx.module.Socialable 1 error at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004) why it happens? 13 апреля 2012 г. 0:05 пользователь Henrique Prange hpra...@gmail.com написал: Hi Ron, On 12/04/2012, at 08:04, Ron X wrote: please tell me - how you start app with woinject? i can't do that! Your Application class should look like this: package com.ronx; import com.woinject.InjectableApplication; import com.woinject.WOInject; public class Application extends InjectableApplication { public static void main(String[] args) { WOInject.init(com.ronx.Application, args); } ... } everytime i have Exception in thread main java.lang.NoClassDefFoundError: com/ronx/Application Caused by: java.lang.ClassNotFoundException: com.ronx.Application at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) or if i comment ERXApplication.main(argv, Application.class); You should not start your application with the ERXApplication class when using WOInject. Cheers, Henrique ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [ANN] WOInject 1.0
This (WOIject) is an excellent framework and I feel the community should collectively sponsor Henirique to come and present it to WOWODC :) Good work Henrique! Farrukh On 2012-04-11, at 10:35 AM, ISHIMOTO Ken wrote: In the case you can't come : Maybe we can have a Session with your Video.^^ I know it is very expensive to Canada. I was thinking this time to save Money also, but I read about the EO Bootcamp and decide to go. Last year I got payed from a Company, but this Time I have to pay everything myself, and it's a lot of Money^^ Ken On 2012/04/04, at 19:11, Henrique Prange wrote: Hi Paul, Don't get me wrong. I really appreciate the interest in WOInject. It is an honor for me to talk on WOWODC again. I'm working hard here to make it happen. However, I'm still not sure if I'll be able to afford the trip to Canada. :( So, I don't want to create expectations for something I may not be able to deliver. Cheers, Henrique On 04/04/2012, at 02:02, Paul Hoadley wrote: On 15/03/2012, at 5:04 PM, Johann Werner wrote: Am 15.03.2012 um 07:12 schrieb ISHIMOTO Ken: Would be nice to see that at WOWODC in Action. +1 Hey, Henrique, I didn't see a response to this―any chance you'll be at WOWODC 12 and in the mood for a talk/demo/workshop on WOInject? Even informally? -- Paul. http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com This email sent to hpra...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/ken%40ksroom.com This email sent to k...@ksroom.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NullPointerException
Hi Ken, Also we should not call toString() method on e.getCause() because it's not always necessary you get a cause if the exception is already at it's origin. Here is a sample code to test this: Farrukh public class ExceptionTest { public static void printCause(Throwable t) { System.err.println(t.toString()); printCause(t.getCause()); } public static void main(String[] args) { try { throw new Exception(Testing); } catch(Exception e) { printCause(e); } } } Farrukhs-MacBook-Pro:TopCoder fijaz$ java ExceptionTest java.lang.Exception: Testing Exception in thread main java.lang.NullPointerException at ExceptionTest.printCause(ExceptionTest.java:4) at ExceptionTest.printCause(ExceptionTest.java:5) at ExceptionTest.main(ExceptionTest.java:12) On 2012-04-12, at 9:08 PM, Ken Anderson wrote: 94try{ 95System.out.println(editingContext.toString()); 96me.editingContext().saveChanges(); 97 } catch (Exception e){ 98System.out.println(me._primaryKey); 99 System.out.println(editingContext.objectForGlobalID(me.__globalID()).valueForKey(ADDRESS1_KEY)); 100 System.out.println(e.getCause().toString()); ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: New Framework on the way
Great work Ken! Are they stateless or stateful? Farrukh ISHIMOTO Ken k...@ksroom.com wrote: Hi, I am thinking to release one of our WOdka Frameworks. But at first, I have to check some code, and make some commits to Wonder. The Framework : WOJQueryMobile is a Wrapper on Top of JQueryMobile. You can take a look here with your iPad or iPhone : http://ksmini02.ksroom.com/App/WebObjects/SampleApp.woa Also I will change the Logo after I know which is the winner. Thank you Ken Ishimoto K's ROOM [E-Mail] k...@ksroom.com [iChat:] ibase_...@mac.com [HP] http://www.ksroom.com/ _ This e-mail has not been scanned for viruses because it was written on an Mac, and there are NO Viruses on an Apple Computer. For further information visit http://www.apple.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Wrong Session class
Just sharing my experience too that It also does not like the case where the project name and project folder have different names. Farrukh Sent from my iPad 2 On 2012-04-02, at 10:39 PM, Ted Archibald ted.archib...@gmail.com wrote: I can duplicate the bug on my computer by creating a new wonder app called test1.0 Something in wolips doesn't like the period, or at least something on my computer doesn't. And I can assure it's not a classpath issue because I meticulously copied and pasted EVERY file between a non-working app and a working app and the only difference came from 3 things: 1) turning off bundleless builds 2) setting natureorg.objectstyle.wolips.incrementalframeworknature/nature in .project or 3) removing the period from the app name. Moreover, this ONLY affected my eclipse builds and not my jenkins builds. So IMO, everything seems to be pointing to something in the incremental app builder and the name of the app. Luckily I just migrated over to git the last weekend, so now I'm not so scared to rename apps and merge it back, so I can finally move on. On Mon, Apr 2, 2012 at 1:02 PM, Chuck Hill ch...@global-village.net wrote: That also seems unlikely. This should be a classpath order problem and having ERExtensions first on the classpath (assuming you are using it, WOLips should do this) should prevent this error. Chuck On 2012-04-02, at 9:32 AM, Ted Archibald wrote: Well I think I got it cased now, I think it's because the app name had a period in the name, perhaps that freaks out the incremental builder. On Mon, Apr 2, 2012 at 9:34 AM, Ted Archibald ted.archib...@gmail.com wrote: The plot thickens... I'm not sure if this is a bug in wolips or what. But the symptoms are: -When you run the app you get an error like: Class 'Session' exists (interfacce org.jabsorb.client.Session) but is not a subclass of WOSession. -In the component validation, some (but not all components) will give: The class for 'X' is either missing or does not extend WOElement. -Bundleless builds do not work, but Bundle builds work fine. I discovered a bizarre fix... in the .project file for the app if you switch natureorg.objectstyle.wolips.incrementalapplicationnature/nature to natureorg.objectstyle.wolips.incrementalframeworknature/nature then everything works fine again. But that doesn't quite make sense to me. I downloaded the wolips source and I haven't a clue why this would or would not work. On Fri, Feb 17, 2012 at 5:06 PM, John Huss johnth...@gmail.com wrote: I think you should spend a few more weeks on this. That's the responsible thing to do. On Fri, Feb 17, 2012 at 2:06 PM, Ted Archibald ted.archib...@gmail.com wrote: Feels like I'm beating a dead horse: After trying many combinations of changes I finally found one change that helps. If I have wolips generate bundles, everything works perfectly. But I wonder how I can get bundleless builds to work again. If I have wolips generate bundles, clean the project then run, everything is back to normal. But if I go back to bundleless builds, then the issues come back. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/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: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JasperReports and D2W
Hi Ted, can you be more specific what are you trying to do? Are you building a Jasper client? Embedding Jasper server in a D2W app? Or Trying to build a report for D2W Models? Each of them have different issues to that need to resolve. IIRC Jasper server is based on servlet model if your trying to package it them you need to deploy the D2W app in Java EE environment. What issues you've faced so far? Farrukh Theodore Petrosky tedp...@yahoo.com wrote: Has anyone implemented JasperReports in a D2W app? I am having problems trying to bring in the Wonder app version. I just don't get some of the issues. Ted ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JasperReports and D2W
That should not be a problem. You can use iReports to design the report that is built using Java objects. You need to create an action that should invoke this report using Jasper api and perhaps you need to collect its rendered output as input stream and generate a response object and return from the action. If you are getting an compile or runtime issues pls share the stack trace. Thanks, Farrukh Theodore Petrosky tedp...@yahoo.com wrote: I am just beginning a D2W app. I am collecting reports and I want to use JR to print beautifully formatted reports. So basically, I have a List view and put a print link on each line. Ted --- On Sat, 3/31/12, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: From: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Subject: Re: JasperReports and D2W To: Theodore Petrosky tedp...@yahoo.com, webobjects-dev@lists.apple.com Date: Saturday, March 31, 2012, 3:15 PM Hi Ted, can you be more specific what are you trying to do? Are you building a Jasper client? Embedding Jasper server in a D2W app? Or Trying to build a report for D2W Models? Each of them have different issues to that need to resolve. IIRC Jasper server is based on servlet model if your trying to package it them you need to deploy the D2W app in Java EE environment. What issues you've faced so far? Farrukh Theodore Petrosky tedp...@yahoo.com wrote: Has anyone implemented JasperReports in a D2W app? I am having problems trying to bring in the Wonder app version. I just don't get some of the issues. Ted ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Apple and WO (Google Moderator thread)
There are certain parts of Apple's website which is using WebObjects. Which version, I don't know. You can easily identify by looking at the URL which contains /WebObjects/wo/ Some parts are also based on Struts and JavaEE framework where you can find a /.../Something.do type of URLs. These are by conventions but what lies beneath is a secret. Why don't we just consider what we've as WebObjects and Wonder as Foundation and keep building on top of it? How many updates you've seen in JDK itself in the last 15 years? They are still using most of the foundation classes with few enhancements. They add new features and that's it. To me WebObjects is not just a framework or a platform. It's a foundation of something which is robust in reality. If Apple didn't have patents for its technologies, all those companies out there could have stolen what Apple owned decades ago. As an example Apache Cayenne, Rails, Grails, EJBs, Microsoft Dynamic Data are all attempts to copy what you already have in WebObjects. Technology doesn't matter much if it's already stable. What matters is the idea. What is Facebook? It's just a better networking idea which killed Orkut and it's standing on the same open source PHP and Graph model. Although Google is trying to persude Facebook users to start using Google+ but I don't see this will happen unless 51% of the Facebook users become Google employees or in case of some Force Majeure, Facebook infrastructure collapses. We've great people, we need to remain enthusiastic and energised. Things will change and this community will grow. We just need better marketing strategy and clear roadmap and lots of contribution. We'll discuss all this and much more and will finalize a doable roadmap when we meet. Farrukh On 2012-03-29, at 10:55 AM, Denis Frolov wrote: If Apple is still using and plans to use WO in the future, then we have and will have killer examples of web apps that validate the tech and make marketing it to new developers much easier. On the contrary, if Apple is moving away from WO, this can be a detractor. That's the only reason I've asked the question. On Thu, Mar 29, 2012 at 12:19 AM, Chuck Hill ch...@global-village.net wrote: On 2012-03-28, at 12:16 PM, Johann Werner wrote: We should stop asking those questions. What would that change anyway? That there is an excellent point. Who cares if Apple is still using it? What difference does that make to you? They are NOT going to release a new version so if they have developed cool new features, you are not going to see them. You have what you have. Either it is better than anything else you can have, and you should use it, or it is not and you should move. If Apple is not using it, then they are either using something else better that is public (unlikely as I don't see it) or they are using something else that is better but private. But how is the latter different from if they are still using WO? It does not benefit us outside either way. Chuck Don't look at the past and mourn, look at the now and future and how you (with your commits, ideas and help for the community) could make Wonder even better and more useful for you and everyone else! Pascal wrote what is needed: […] we need help on documentation, unit testing, marketing, the list of needs is quite long. So anyone who wants Wonder to keep a sexy technology and to continue to grow should contribute his/her part. If you don't have any patches to commit but have other strengths, those are needed too. In one word: participate! :) Am 28.03.2012 um 20:46 schrieb Pascal Robert: If Mike still works there, I guess they are still working on it :-) But are they using it for new stuff, I don't know. By the way, do we have any evidences of Apple's commitment to continue using WO internally? Did anyone check - do they continue using it for their own new projects? On Wed, Mar 28, 2012 at 1:27 PM, Pascal Robert prob...@macti.ca wrote: Le 2012-03-28 à 05:24, Gino Pacitti a écrit : Well I for one would like to have some sort of contribution scheme fixed on an annual membership for development etc... And just so I am not too behind on what is the current state of the union - what is the Apple current think on WO. I think I read here that they are no longer contributing to its development. Is that correct? Any one know of their plans for the software? They keep it for themselves, and it won't change, plain and simple. Many things have been done to try to change that, and nothing worked. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill
Re: Compact vs Verbose
Heard you guys, I'll make sure my submission gets compiled and run within the constraints set in community contribution :) Farrukh On 2012-03-29, at 7:58 PM, Chuck Hill wrote: On 2012-03-29, at 9:55 AM, Ramsey Gurley wrote: Longer? Just nest them! a? b? f(): c? g(): h(): d? i(): j(); Avendasora's lips are going to get sore trying to decipher that! :-P -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/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: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Most requested stuff on Google Moderator
On 2012-03-28, at 9:22 AM, David Avendasora wrote: On Mar 28, 2012, at 2:13 PM, Johann Werner wrote: Perhaps now it is the time to define a mandatory Wonder code formatter all commits have to use. I think that would make it easier for many committers to send patches without worrying about formatting – and it would improve the code readability/quality. Code formatting can turn into a religious war. Lots of fervent belief, with little evidence to back it up. I _love_ how I format my code. I've had other's heads explode when they look at it. (Hi Dawn!) WIth that said, I think some basics would certainly be helpful, and it's easy to create a set of formatting rules that can be imported into Eclipse. I'd say #1 change that would make the code easier for me to read is no freakin' conditionals in the return statement. return contentDisposition != null (contentDisposition.indexOf(inline) -1 || contentDisposition.indexOf(attachment) -1); Seriously, who can read that and make sense of it immediately?! This is programmers shorthand. They master it with time. If you find these statements somewhere in the code, consider that piece of code been written by an experienced programmer which is less likely to have bugs. This is style is still not difficult than what you can find in a TopCoder algorithm which contains is full of boolean and bit manipulation operators. I would say, whoever can contribute a single bit, just do it. Formatting is not a major issue. I would do what the following statement returns :) return does it exist what you're looking for ? (do you find any performance issues ? improve, use and share : use and appreciate) : implement, use and share; Farrukh Dave — WebObjects - so easy that even Dave Avendasora can do it!™ — David Avendasora Senior Software Abuser Kaiten, Inc. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Most requested stuff on Google Moderator
On 2012-03-28, at 11:23 AM, David Avendasora wrote: On Mar 28, 2012, at 3:31 PM, Farrukh Ijaz wrote: return contentDisposition != null (contentDisposition.indexOf(inline) -1 || contentDisposition.indexOf(attachment) -1); Seriously, who can read that and make sense of it immediately?! This is programmers shorthand. They master it with time. If you find these statements somewhere in the code, consider that piece of code been written by an experienced programmer which is less likely to have bugs. This is style is still not difficult than what you can find in a TopCoder algorithm which contains is full of boolean and bit manipulation operators. I have to _vehemently_ disagree. One way many people learn how to be good coders it by looking at other people's code and being able to see what it does. Not only that, but the assumption that it's less likely to have bugs because it is obtuse?! Are you serious? You've the freedom agree or disagree but not _vehemently_. Everyone should respect other's opinion and so do I with respectfully. One must learn the language syntax. Why should I use such a verbosity in code when it's already easy to understand. int max = (x y) ? x : y; is much better in readability than: int max = 0; if (x y) { max = x; } else { max = y; } This is one of the most elitist things I've heard said on the WO-dev list. If this is so bad practice then why Project Coin introduces Strings in switches, developer can still do if-elseif-elseif-elseif...else coding. This is in fact elite coding style :) Following is excerpt for String.java public boolean equalsIgnoreCase(String s) { return this != s ? s != null s.count == count regionMatches(true, 0, s, 0, count) : true; } We really shouldn't go into coding convention domain. I respect everyone's style and we should try to learn the best practices. Trust me verbosity is good for examples but in practice, we should compact our code as much as we can. Thanks, Farrukh Dave — WebObjects - so easy that even Dave Avendasora can do it!™ — David Avendasora Senior Software Abuser Kaiten, Inc. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: *.xcode *.xcodeproj PB.project Files
Hi Ted, You shouldn't delete any files from your Xcode project if it's created by the IDE itself. You should however exclude certain files from your version commit ignore list. E.g. I use subversion and here are my global-ignores. global-ignores = xcuserdata .idea .git .svn *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.pyc *.pyo bin build *.rej *~ #*# .#* .*.swp .DS_Store Some of them are irrelavent to you but here you can specify which files, extensions or folders you want to ignore. Normally we should ignore user specific changes to xcode project and workspace. Hope this helps. Farrukh On 2012-03-27, at 10:23 AM, Ted Archibald wrote: Well I just deleted them from a project then ran my selenium tests, nothing appears to break... On Tue, Mar 27, 2012 at 1:13 AM, Ted Archibald ted.archib...@gmail.com wrote: Quick question, are the *.xcode *.xcodeproj PB.project files actually needed for anything to function or can I stop creating them and yank 'em out of version control? I have no intention of ever using XCode for anything WO, are they used by WO for something I'm unaware of? ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: RuleModeler Xcode project
Hi Pascal, Try setting Mac OSX Deployment target to 10.5 and use Base SDK 10.6. This should build the application that can run on both I believe. Farrukh On 2012-03-10, at 4:41 PM, Pascal Robert wrote: Le 2012-03-10 à 08:37, Johann Werner a écrit : Am 10.03.2012 um 13:58 schrieb Pascal Robert: I was trying to build RuleModeler on Lion with Xcode 4 and it failed because the target SDK is 10.5. Should we move it to 10.6 since Xcode 4 doesn't have the 10.5 SDK or should we keep a 10.6 machine around? While we are at it, should we distribute RuleModeler on the Mac App Store? Might give some visibility to WO… That's a goot idea and as the App Store if only available for 10.6 and newer this would imply to go with 10.6 SDK. We can keep the current build for people still on 10.5. If you are still on 10.5, good chance you don't want the new stuff anyway :-) But since I'm not a Cocoa developer, I don't know what is needed to make an app clean for distribution on the App Store so I will need some help on this. And I guess we will need a Mac developer account for WOCommunity when the community finally become a real organization. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: bug : nullablePropertyKeys won't work with an array as a property...
Hi James, In practice you should use either d2wContext.setDynamicPage(...) or d2wContext.setEntity(...) and d2wContext.setTask(...) methods prior to call d2wContext.valueForKey(...). Farrukh On 2012-02-07, at 11:24 PM, James Cicenia wrote: Here is the code: if (null == _nullablePropertyKeys) { NSMutableArray array = new NSMutableArray(); String preKey = propertyKey(); D2WContext d2wContext = d2wContext(); for (Enumeration keysEnum = displayPropertyKeys().objectEnumerator(); keysEnum.hasMoreElements();) { String key = (String)keysEnum.nextElement(); setPropertyKey(key); Object isMandatory = d2wContext.valueForKey(isMandatory); if (isMandatory != null !ERXValueUtilities.booleanValue(isMandatory)) { array.addObject(key); } } _nullablePropertyKeys = array; setPropertyKey(preKey); // Restore the property key. } return _nullablePropertyKeys; } Since it brings back all property keys... it doesn't work with Grouped/Tabbed/Sectioned property lists as those are arrays. - James ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: bug : nullablePropertyKeys won't work with an array as a property...
My bad, I just overlooked you're using d2wContext(). Is this something you're writing? If yes, where exactly? Farrukh On 2012-02-08, at 5:25 PM, James Cicenia wrote: Not sure that is relevant. When instantiating a D2WQueryPage and you pass in Grouped or Sectioned property keys it will fail: String key = (String)keysEnum.nextElement(); James On Feb 8, 2012, at 6:13 AM, Farrukh Ijaz wrote: Hi James, In practice you should use either d2wContext.setDynamicPage(...) or d2wContext.setEntity(...) and d2wContext.setTask(...) methods prior to call d2wContext.valueForKey(...). Farrukh On 2012-02-07, at 11:24 PM, James Cicenia wrote: Here is the code: if (null == _nullablePropertyKeys) { NSMutableArray array = new NSMutableArray(); String preKey = propertyKey(); D2WContext d2wContext = d2wContext(); for (Enumeration keysEnum = displayPropertyKeys().objectEnumerator(); keysEnum.hasMoreElements();) { String key = (String)keysEnum.nextElement(); setPropertyKey(key); Object isMandatory = d2wContext.valueForKey(isMandatory); if (isMandatory != null !ERXValueUtilities.booleanValue(isMandatory)) { array.addObject(key); } } _nullablePropertyKeys = array; setPropertyKey(preKey); // Restore the property key. } return _nullablePropertyKeys; } Since it brings back all property keys... it doesn't work with Grouped/Tabbed/Sectioned property lists as those are arrays. - James ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXPatcher / WOBrowser / NSArray.addAll()
Hi David, From the exception it looks like you're trying to call addAll method on NSArray which is not mutable. Since NSArray is an instance of List interface therefore the check at line 532 returns true and therefore addAll get's called at link 533 and that's actually raising exception. Fix: Make sure listClassInContext(context) method is returning mutable object most likely NSMutableArray. Farrukh On 2012-01-25, at 1:21 PM, David Avendasora wrote: Hey all, I'm in over my head again. But at least the good news is that I think I'm finally inching my way toward the deep end of the pool... We're suddenly running into the WOBrowser java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray problem as others have run into. We have a WOComponent that has three WOBrowsers on it. One selects one or more Categories from all possibilities. The other two manage what related objects are related to the selected Categories. One with Available Objects, and one with Assigned Objects. Basically, with 3 WOBrowsers we are managing a Many-to-Many relationship. Now, we can easily avoid the error by just making sure that the selections bindings of the WOBrowsers are not null. Initializing them with NSArray.emptyArray() works just fine. There are two odd things: 1) We just started running into this problem and this code has been running unchanged for years, and Wonder's last change was 16+ months ago 2) There are three WOBrowsers on the Page (2 in one component, 1 in a parent component) and only ONE of the WOBrowsers is causing this error. I believe there is a bug in WO's or WOnder's handling of WOBrowser, but maybe (probably) I'm just not fully understanding the implications of multiple WOBrowsers in one Page and the Request-Response loop. 526if(_selections != null _selections.isValueSettable()) { 526try { 527Class resultClass = listClassInContext(context); 528Object result = resultClass.newInstance(); 529if(result instanceof NSMutableArray) { 530((NSMutableArray)result).addObjects(selections.toArray()); 531} else { 532if(result instanceof List) { 533((List)result).addAll(selections); 534} 535} 536_selections.setValue(result, context.component()); 537} catch(Exception exception) { If I add the following two lines: 531 + } else if (result instanceof NSArray) { 532 + result = new NSArray(selections.toArray()); Or surround lines 529 - 535 with the following if clause: 529 + if (selections != null !selections.isEmpty()) { ... 537 +} Then everything works just fine, even if the selections bindings end up null. That's all very special, but it just covers up the real problem by intercepting the bad data before it can cause an error. They don't fix what is causing the bad data in the first place. It appears that for some reason line 527's call to EOAssociation#listClassInContext(context) for just ONE of the three WOBrowsers returns an instance of NSArray instead of an NSMutableArray. The one that gets an NSArray Class is the third WOBrowser on the page, but possibly more significantly it's the second with a null selections binding. What I don't get is why would EOAssociation#listClassInContext(context) return different Class objects (NSMutableArray for the first, NSArray for the second) even when both WOBrowser selections bindings are null? Does anybody have any ideas? (Clarification for Chuck: I mean ideas that don't directly or indirectly involve bourbon and/or hookers) Dave ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERD2W qualifying restrictingFetchSpecification
Hi Markus, I guess you can write a getter to build the groups subset in your Category class and use that getter as display key? Farrukh On 2012-01-24, at 6:50 PM, Markus Ruggiero wrote: Can I qualify dynamically a restrictingFetchSpecification? I have the following model: Category one-2-many Group one-2-many Statement For pageConfiguration EditStatement I have displayPropertyKeys = (group.category.name, group.name, and others) group.category.name is displayString, group.name is ERD2WEditToOneRelationship popup I need the subset of all possible Groups within the Category for the popup. So I thought I could use a restrictingFetchSpecification but this thing needs to be qualified by the Category. Can this be done, and what would I write for the fetch spec in my EOModel? Thanks a lot ---markus--- ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Tomcat deployment - how do you allocate memory to app
Hi Tim, You can specify these options in your Catalina script file. On windows it's catalina.bat and for other platforms it's catalina.sh IIRC. When you deploy your application in J2EE or JavaEE, your application shares the JVM in which the application server is running. If you want to run multiple apps with one JavaEE application server, better switch to GlassFish. You can create multiple instances under one domain server and each can run multiple applications and thus you can specify different JVM settings for each instance. Farrukh Sent from my iPad 2 On 2012-01-25, at 3:14 AM, D Tim Cummings t...@triptera.com.au wrote: When I am using JavaMonitor I just put -Xmx256m in additional arguments. How do I set this when I am deploying in Tomcat 6? Thanks Tim ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Questions about ERJQuery
Hi Guys, Few questions about ERJQuery: 1. Is it stable and can be used for production applications? 2. I've noticed it uses '$' sign. Shouldn't it be a conflict with wonder components which use prototype? 3. If answer for 2 is yes then how can I force it use resolve the conflict. In practice we use var $j = jQuery.noConflict() and use $j instead of $ to avoid conflict. Thanks, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Questions about ERJQuery
Thanks Pascal for the update. Any answer to my question no. 3? Farrukh On 2012-01-20, at 4:10 PM, Pascal Robert wrote: Ravi Mendis wrote it. I think it's stable but it's stateless only IIRC. Hi Guys, Few questions about ERJQuery: 1. Is it stable and can be used for production applications? 2. I've noticed it uses '$' sign. Shouldn't it be a conflict with wonder components which use prototype? 3. If answer for 2 is yes then how can I force it use resolve the conflict. In practice we use var $j = jQuery.noConflict() and use $j instead of $ to avoid conflict. Thanks, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Is there a way to create rules programatically?
Try this: Implement your own D2WModel the way you like but make sure you can actually add remove rules to your model. Perhaps you need to define your own methods similar to addMyRule or removeMyRule etc. Override application's didFinishLaunching() method and add following code. @Override public void didFinishLaunching() { super.didFinishLaunching(); D2WModel.setDefaultModel(MyD2WModel.singleton()); } From this point and onwards I hope you'll be able to use your dynamic rules in d2w components as well. Even if you add rules to by adding / removing rules in your code anywhere using MyD2WModel.singleton().addMyRule(...) will affect the behaviour of d2w components. Farrukh On 2012-01-16, at 4:52 PM, James Cicenia wrote: You already seem experienced in this manner! :-) I could see how this works. Creating my own on the fly rule model could solve the problem. But like you said... where? Have to be session specific. James On Jan 15, 2012, at 1:50 AM, Farrukh Ijaz wrote: It's possible. You need to play around with the D2WContext, D2WModel and Rule classes. Start with creating your own D2WModel class since it has methods to update Rules. public class MyD2WModel extends D2WModel { public MyD2WModel(NSArrayRule rules) { super(rules); } public void addMyRule(Rule newRule) { super.addRule(newRule); } } You can override other methods as needed. I would suggest implement a singleton pattern for MyD2WModel, and use that whenever you want to infer keys. Whenever you need to access D2WContext with your rules, do something like this: D2WContext d2wContext = new D2WContext(session); d2wContext._setModel(MyD2WModel.singleton()); Just hack around and see where you need to place it to make it accessible in your templates. May be some guru out there can point out the exact place to hack ;) Have fun coding! Farrukh On 2012-01-13, at 8:20 PM, James Cicenia wrote: Ok, is it possible to dynamically load up a rule set? If that is possible I could create the a rule for each dynamic key. Thanks James ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Is there a way to create rules programatically?
On 2012-01-16, at 8:51 PM, Ramsey Gurley wrote: Not that I condone the approach, but if you're gonna do it, why not ERD2WModel.erDefaultModel().addRule(Rule)? +1 In fact the addRule(...) method is protected in D2WModel and didn't look at ERD2WModel :) Farrukh Ramsey On Jan 16, 2012, at 10:20 AM, Farrukh Ijaz wrote: Try this: Implement your own D2WModel the way you like but make sure you can actually add remove rules to your model. Perhaps you need to define your own methods similar to addMyRule or removeMyRule etc. Override application's didFinishLaunching() method and add following code. @Override public void didFinishLaunching() { super.didFinishLaunching(); D2WModel.setDefaultModel(MyD2WModel.singleton()); } From this point and onwards I hope you'll be able to use your dynamic rules in d2w components as well. Even if you add rules to by adding / removing rules in your code anywhere using MyD2WModel.singleton().addMyRule(...) will affect the behaviour of d2w components. Farrukh On 2012-01-16, at 4:52 PM, James Cicenia wrote: You already seem experienced in this manner! :-) I could see how this works. Creating my own on the fly rule model could solve the problem. But like you said... where? Have to be session specific. James On Jan 15, 2012, at 1:50 AM, Farrukh Ijaz wrote: It's possible. You need to play around with the D2WContext, D2WModel and Rule classes. Start with creating your own D2WModel class since it has methods to update Rules. public class MyD2WModel extends D2WModel { public MyD2WModel(NSArrayRule rules) { super(rules); } public void addMyRule(Rule newRule) { super.addRule(newRule); } } You can override other methods as needed. I would suggest implement a singleton pattern for MyD2WModel, and use that whenever you want to infer keys. Whenever you need to access D2WContext with your rules, do something like this: D2WContext d2wContext = new D2WContext(session); d2wContext._setModel(MyD2WModel.singleton()); Just hack around and see where you need to place it to make it accessible in your templates. May be some guru out there can point out the exact place to hack ;) Have fun coding! Farrukh On 2012-01-13, at 8:20 PM, James Cicenia wrote: Ok, is it possible to dynamically load up a rule set? If that is possible I could create the a rule for each dynamic key. Thanks James ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.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/rgurley%40smarthealth.com This email sent to rgur...@smarthealth.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Is there a way to create rules programatically?
It's possible. You need to play around with the D2WContext, D2WModel and Rule classes. Start with creating your own D2WModel class since it has methods to update Rules. public class MyD2WModel extends D2WModel { public MyD2WModel(NSArrayRule rules) { super(rules); } public void addMyRule(Rule newRule) { super.addRule(newRule); } } You can override other methods as needed. I would suggest implement a singleton pattern for MyD2WModel, and use that whenever you want to infer keys. Whenever you need to access D2WContext with your rules, do something like this: D2WContext d2wContext = new D2WContext(session); d2wContext._setModel(MyD2WModel.singleton()); Just hack around and see where you need to place it to make it accessible in your templates. May be some guru out there can point out the exact place to hack ;) Have fun coding! Farrukh On 2012-01-13, at 8:20 PM, James Cicenia wrote: Ok, is it possible to dynamically load up a rule set? If that is possible I could create the a rule for each dynamic key. Thanks James ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Validation Exceptions, Localization Unit Testing
Try reordering your application classpath and I guess moving Extensions Framework above will solve the problem. It happened to me a couple of times and I discovered it's related to loading the classes in specific order. Farrukh Henrique Prange hpra...@gmail.com wrote: Hi Kevin, I'm not an expert on ERXValidation, but you're correct. The ERXLocalizer class has not been initialized properly. Unfortunately, WOUnit doesn't load the Properties file before the test execution as well as it doesn't provide means for the ERXLocalizer to initialize properly. As a workaround, you can manually load the Properties file and initialize the ERXLocalizer in a static method annotated with @BeforeClass. I've created two issues [1] [2] and will take a closer look at this requirement. [1]https://github.com/hprange/wounit/issues/24 [2]https://github.com/hprange/wounit/issues/25 Cheers, Henrique On 15/12/2011, at 17:15, Kevin Hinkson wrote: Hi everyone, I have a model framework that I am currently testing using WOUnit. For the Account EO I have a unit test to ensure that the email attribute is valid before saving. That worked fine until I started changing the code to be localizable. I have a ValidationTemplate.strings in the framework under Resources - English.lproj - ValidationTemplate.strings Values in the template { EmailFormatException = A valid b@@displayNameForProperty@@/b is required.; Account.email.EmailFormatException = b@@displayNameForProperty@@/b must be a valid email address.; } Properties set: # Localization er.extensions.ERXLocalizer.defaultLanguage=English er.extensions.ERXLocalizer.fileNamesToWatch=(Localizable.strings,ValidationTemplate.strings) er.extensions.ERXLocalizer.availableLanguages=(English) er.extensions.ERXLocalizer.frameworkSearchPath=(app,ERDirectToWeb,ERExtensions) er.extensions.ERXLocalizer.useLocalizedFormatters=true Validation code: public String validateEmail(String newEmail) { ERXValidationFactory factory = ERXValidationFactory.defaultFactory(); if (!Account.isValidEmail(newEmail)) { ERXValidationException exception = factory.createCustomException(this, Account.EMAIL_KEY, newEmail, EmailFormatException); throw exception; } return newEmail; } When I run the unit test for the Account EO I get a stack trace in the logs: - Undefined Validation Template entity Account property EmailFormatException type CustomMethodException target language English java.lang.Throwable at er.extensions.validation.ERXValidationFactory.templateForEntityPropertyType(ERXValidationFactory.java:554) at er.extensions.validation.ERXValidationFactory.templateForException(ERXValidationFactory.java:448) at er.extensions.validation.ERXValidationFactory.messageForException(ERXValidationFactory.java:394) at er.extensions.validation.ERXValidationException.getMessage(ERXValidationException.java:133) at com.wounit.matchers.CanBeSavedMatcher.describeTo(CanBeSavedMatcher.java:53) at org.hamcrest.BaseDescription.appendDescriptionOf(BaseDescription.java:21) at com.wounit.matchers.EOAssert.confirmImplementation(EOAssert.java:253) at com.wounit.matchers.EOAssert.confirm(EOAssert.java:216) at com.coralstone.envoy.modeltests.AccountTest.cannotSaveInvalidEmail(AccountTest.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at com.wounit.rules.AbstractEditingContextRule$1.evaluate(AbstractEditingContextRule.java:141) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at
Re: Can someone explain how this ERXKey works?
Hi James, The filter is passed to response object in ERRest framework, and that filter is applied to the object. E.g. return response(object, filter); The filter includes keypaths that can be reached from object. Now this object must implement NSKeyValueCodingAdditions interface. The family filter is just a reference to the filter object which is returned after includeing FoodItem.FOOD_FAMILY, so basically you're manupulating the fiter object itself. You should use it as following: ERXKeyFilter filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships(); filter.include(FoodFamily.MAIN_IMAGE); return filter On 2011-12-13, at 9:37 PM, James Cicenia wrote: The base object is a FoodItem and it has a to-one foodFamily relationship. I was trying to get the foodFamily mainImage (ERAttachment) attributes. After much trial and error this worked! why? ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes(); ERXKeyFilter family = filter.include(FoodItem.FOOD_FAMILY); family.include(FoodFamily.MAIN_IMAGE).includeAttributesAndToOneRelationships(); return filter How does the family filter affect the returned filter? Thanks James ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Can someone explain how this ERXKey works?
This is strange: /** * Shortcut to return a new ERXKeyFilter(AttributesAndToOneRelationships) * @return a new ERXKeyFilter(AttributesAndToOneRelationships) */ public static ERXKeyFilter filterWithAttributesAndToOneRelationships() { return new ERXKeyFilter(ERXKeyFilter.Base.AttributesAndToOneRelationships); } /** * Sets the base rule to AttribtuesAndToOneRelationships. */ public void includeAttributesAndToOneRelationships() { setBase(ERXKeyFilter.Base.AttributesAndToOneRelationships); } The first method is the static method and second is instance and the instance method sets the base after creating the instance. Farrukh On 2011-12-13, at 11:14 PM, James Cicenia wrote: I had originally used what you suggested. And this was the response: ERXKeyFilter filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships(); filter.include(FoodFamily.MAIN_IMAGE); gives: foodFamily type=FoodFamily id=1/ When I did what I did I get this response (all notice that it says ERDatabaseAttachment, this is wrong it is a File): foodFamily type=FoodFamily id=1 mainImage type=ERDatabaseAttachment id=1 availabletrue/available configurationName nil=true/ creationDate2011-11-09T01:32:39Z/creationDate height nil=true/ mimeTypeimage/jpeg/mimeType originalFileNametomato.jpg/originalFileName ownerID nil=true/ proxiedtrue/proxied size4951/size smallData nil=true/ storageTypedb/storageType thumbnail nil=true/ webPath/1.jpg/webPath width nil=true/ attachmentData type=ERAttachmentData id=1/ parentAttachment nil=true/ /mainImage /foodFamily Regards James On Dec 13, 2011, at 1:08 PM, Farrukh Ijaz wrote: Hi James, The filter is passed to response object in ERRest framework, and that filter is applied to the object. E.g. return response(object, filter); The filter includes keypaths that can be reached from object. Now this object must implement NSKeyValueCodingAdditions interface. The family filter is just a reference to the filter object which is returned after includeing FoodItem.FOOD_FAMILY, so basically you're manupulating the fiter object itself. You should use it as following: ERXKeyFilter filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships(); filter.include(FoodFamily.MAIN_IMAGE); return filter On 2011-12-13, at 9:37 PM, James Cicenia wrote: The base object is a FoodItem and it has a to-one foodFamily relationship. I was trying to get the foodFamily mainImage (ERAttachment) attributes. After much trial and error this worked! why? ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes(); ERXKeyFilter family = filter.include(FoodItem.FOOD_FAMILY); family.include(FoodFamily.MAIN_IMAGE).includeAttributesAndToOneRelationships(); return filter How does the family filter affect the returned filter? Thanks James ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: setting properties ??
Hi Ted, try following: NSProperties.sharedInstance().setPropertyForKey(value-from-db, desired-key); Farrukh On 2011-10-29, at 1:35 AM, Theodore Petrosky wrote: but how do you handle the situation where you don't know the smtp server, or the smtp server is changing? I want to store the smtp server (and port) as an attribute in my database then I can adjust it as needed. Am I thinking about this 'wrong'? TEd -- Message: 1 Date: Tue, 25 Oct 2011 00:34:43 +0200 From: Philippe Rabier prab...@me.com Subject: Re: setting properties ?? To: WebObjects Development webobjects-dev@lists.apple.com Message-ID: 476a4ac8-52de-4901-aa2f-df45dd3d4...@me.com Content-Type: text/plain; CHARSET=US-ASCII Theodore, I'm afraid you use properties the wrong way. Personally, I never set properties in my own code, only read them (except for frameworks I wrote of course). Properties are used to initialize informations. By setting default values in your framework, you can change them in your application. And you can have several properties files in your have with a different suffix (Properties.staging, Properties.production for example). Then you can set a user through the WOMonitor in the additional arguments like -Duser.name=staging and the right file will be opened. I hope you read the wiki because there are useful informations like http://wiki.objectstyle.org/confluence/display/WO/Project+Wonder+Properties+Files Now if you want to modify on the fly ERJavaMail, use the accessors like setCentralize(boolean) for example because properties can be read once during initialization. If you don't find an accessor, maybe you can't change it. I wouldn't be surprised if the smtp host is one of them. Philippe On 24 oct. 2011, at 16:39, Theodore Petrosky wrote: --- On Sun, 10/23/11, Kieran Kelleher kelleh...@gmail.com wrote: From: Kieran Kelleher kelleh...@gmail.com Subject: Re: setting properties ?? To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Sunday, October 23, 2011, 10:42 PM You can specify the properties in your Properties file (inside Resources folder in your project), for example: er.javamail.centralize=false what I am discovering is that there are some ERJavaMail attributes that can be adjusted on the fly. centralize is not one of them. I have a little dummy app for testing and after I put the er.javamail.centralize=false in the Properties file, I can put: ERXProperties.setStringForKey(mail.agencysacks.com, mail.smtp.host); in my component and it will use this mail server. however if it is commented out, it will not find a mail server and the sending will fail. Now I will experiment to discover what other attributes MUST be in the Properties file and which can be adjusted on the fly. Ted On Oct 23, 2011, at 7:34 AM, Theodore Petrosky wrote: I am working with sending email notifications when my users save edits to EOs. I discovered that I can update the properties from my app (in the application constructor) with: ERXProperties.setStringForKey(mail.agencysacks.com, mail.smtp.host); ERXProperties.setStringForKey(35, mail.smtp.port); ERXProperties.setStringForKey(false, er.javamail.centralize); ERXProperties.setStringForKey(tpetrosky, er.javamail.smtpUser); ERXProperties.setStringForKey(, er.javamail.smtpPassword); ERXProperties.setStringForKey(true, er.javamail.smtpAuth); ERXProperties.setStringForKey(tpetro...@agencysacks.com, er.javamail.adminEmail); so (as I am just playing because I need to learn more) I added some log statements in my save method: public WOActionResults saveChangesToItem() { . . . . . ERMailDeliveryHTML mail = new ERMailDeliveryHTML (); IOChangeEmail component = pageWithName(IOChangeEmail.class); mail.setComponent(component); System.out.println(inside try mail.smtp.host = + ERXProperties.stringForKey(mail.smtp.host)); System.out.println(inside try mail.smtp.port = + ERXProperties.stringForKey(mail.smtp.port)); System.out.println(inside try er.javamail.centralize = + ERXProperties.stringForKey(er.javamail.centralize)); System.out.println(inside try er.javamail.adminEmail = + ERXProperties.stringForKey(er.javamail.adminEmail)); mail.newMail(); mail.setToAddress(tedp...@yahoo.com, Theodore Petrosky); mail.setFromAddress(tpetro...@agencysacks.com, Ted Petrosky); mail.setReplyToAddress(tpetro...@agencysacks.com, Ted Petrosky); mail.setSubject(An IO was edited and saved!!); mail.sendMail(); . . . . } this is the console: Oct 23 02:27:06 ASChelseaLoginGrid[56901] DEBUG NSLog - === Commit Internal Transaction inside try mail.smtp.host =
Question about restrictedChoiceKey
Hi, I've a situation. I've three entities: Country CountryGroup Customer The Customer has toOne relationship with Country and Country has toMany relationship with CountryGroup. The customer doesn't know about CountryGroup at all. In the Customer query page, I want to present the user list of CountryGroup for which following rules: LHS: (propertyKey = 'toCountry.toCountryGroups' and task = 'query') RHS: componentName = 'ERD2WQueryToManyRelationship' LHS: (propertyKey = 'toCountry.toCountryGroups' and task = 'query') RHS: restrictedChoiceKey = 'object.availableCountryGroups' The availableCountryGroups() returns NSArrayCountryGroup and is defined in Customer class. It doesn't work as I guess in the query page, the object seems to be null. What could be the possible solution. I don't want to define method in the session object so 'session.availableCountryGroups' is not desired. Is there a way we can use FQCN instead of 'object' such as 'com.xyz.entity.CountryGroup.availableCountryGroups' so this could work generically? or is there a way I can extend my own D2WContext class such as MyD2WContext and tell the application to use this and I can resolve FQCN prefixed methods. Thanks for any suggestions in advance. Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about restrictedChoiceKey
Hi Ramsey, The issue has been solved. The reason to hessitate using 'session.keyName' was my understanding to implement a getter for keyName inside Session class. But this has been solved using 'session.objectStore.keyName'. Thanks, Farrukh On 2011-10-17, at 6:34 PM, Ramsey Gurley wrote: On Oct 17, 2011, at 3:02 AM, Farrukh Ijaz wrote: Hi, I've a situation. I've three entities: Country CountryGroup Customer The Customer has toOne relationship with Country and Country has toMany relationship with CountryGroup. The customer doesn't know about CountryGroup at all. In the Customer query page, I want to present the user list of CountryGroup for which following rules: LHS: (propertyKey = 'toCountry.toCountryGroups' and task = 'query') RHS: componentName = 'ERD2WQueryToManyRelationship' LHS: (propertyKey = 'toCountry.toCountryGroups' and task = 'query') RHS: restrictedChoiceKey = 'object.availableCountryGroups' The availableCountryGroups() returns NSArrayCountryGroup and is defined in Customer class. How is the current user tied to a particular customer object that you want to use for restricted choices? Ramsey ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to get selected Object of AjaxAutoComplete
Hi Raymond, You should be able to retrieve the value from session().selectedMotCalefs property. You don't need to use select attribute. Simple code below using inline bindings: wo:AjaxAutoComplete list=$items item=$item value=$value selection=$selectedItem displayString=$item.propertyYouWantToShow / Farrukh On 2011-10-13, at 11:04 AM, Raymond NANEON wrote: Hi All, I have a lill' problem with AjaxAutoComplete. I am having difficult to get the selected Object bind to selection attribute. Here is my HMTL code : div id = searchFormwo name = autoCompAOF1webobject name = motClefsAutoComplete1//wo/div Here is WOD code : motClefsAutoComplete1 : AjaxAutoComplete { list = session.matchMotcClefs; value = session.motClefs; item = session.motClefsRepetition; displayString = session.motClefsRepetition.refidxval; selection = session.selectedMotClefs; select = session.selectedMotClefs.refidxval; //afterUpdateElement = ctrl.refreshPop2; } autoCompAOF1 : AjaxObserveField { fullSubmit = true; elementName = span; action = ctrl.refreshPop2; updateContainerID = pop2; } Here is my java method to get Selected Object : // Module de recherches public WOActionResults refreshPop2() { if (getSelectedMotClefs() != null) { // } return null; } am I doing something wrong in using AjaxAutoComplete? Thanks Envoyé depuis iCloud ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to get selected Object of AjaxAutoComplete
Hi, Try following: 1. Move the AAC out of AOF and see you get the selected value or 2. Make sure your AjaxObserveField is wrapped by a form, typically ERXOptionalForm otherwise the values will never be set. I use quite often the AAC and I works just fine. It's a matter of setting it up properly. Farrukh On 2011-10-13, at 3:47 PM, Raymond NANEON wrote: Hi Farrukh, The Object session().selectedMotClefs is null when my AjaxObserveField run the method refreshPop2. When I retired the attribute select, there is the same thing. I get always null value in session().selectedMotClefs. Thaks for your help Envoyé depuis iCloud Le 13 oct 2011 à 05:16, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com a écrit : Hi Raymond, You should be able to retrieve the value from session().selectedMotCalefs property. You don't need to use select attribute. Simple code below using inline bindings: wo:AjaxAutoComplete list=$items item=$item value=$value selection=$selectedItem displayString=$item.propertyYouWantToShow / Farrukh On 2011-10-13, at 11:04 AM, Raymond NANEON wrote: Hi All, I have a lill' problem with AjaxAutoComplete. I am having difficult to get the selected Object bind to selection attribute. Here is my HMTL code : div id = searchFormwo name = autoCompAOF1webobject name = motClefsAutoComplete1//wo/div Here is WOD code : motClefsAutoComplete1 : AjaxAutoComplete { list = session.matchMotcClefs; value = session.motClefs; item = session.motClefsRepetition; displayString = session.motClefsRepetition.refidxval; selection = session.selectedMotClefs; select = session.selectedMotClefs.refidxval; //afterUpdateElement = ctrl.refreshPop2; } autoCompAOF1 : AjaxObserveField { fullSubmit = true; elementName = span; action = ctrl.refreshPop2; updateContainerID = pop2; } Here is my java method to get Selected Object : // Module de recherches public WOActionResults refreshPop2() { if (getSelectedMotClefs() != null) { // } return null; } am I doing something wrong in using AjaxAutoComplete? Thanks Envoyé depuis iCloud ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Integration with JSF and IceFaces
Hi Ken, First of all you need to use J2EE deployment of your application. Second as far as I remember there is no WO direct integration with any J2EE web technologies such as Struts or JSF. However I developed a framework long time back which provides integration between any web technology with any backend server as long as you can build a Facade layer between backend and servlets. It's called Vroom Web Framework. It's based on XML configuration. You can find a Netbeans plugin for that too. http://vroom-framework.blogspot.com/2008_07_01_archive.html http://plugins.netbeans.org/plugin/12248/vroom-web-framework http://netbeans.dzone.com/news/interview-farrukh-ijaz-vroom-f Hope this may open doors for you. Farrukh Sent from my iPad 2 On 2011-08-20, at 5:48 PM, Ken Anderson kenli...@anderhome.com wrote: All, Our organization is looking into using IceFaces, a set of JSF tools that have a very nice web presentation. The larger organization is all leaning this way, so there are a lot of resources. My question is, does anyone have an experience using JSF and IceFaces with WO? Ideally, I would like to continue to use EOF on the back end, even if the presentation layer is JSF/ICEFaces. Any thoughts? Thanks! Ken ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERRest wrapped JSON format
Hi Charles, Just create an NSDictionary object and set a key User the value you are returning. It will serialize it the way you intend to. Farrukh Sent from my iPad 2 On 2011-08-06, at 3:17 AM, Charles Young char...@neuralglue.com wrote: Hi, I am currently using ERRest to output some fairly simple JSON describing a user. It looks like this: [{ id:1, type:User, creationDate:2011-02-11T10:20:48Z, email:null, lastLogin:null, password:W6ph5Mm5Pz8GgiULbPgzG37mj9g=, username:charles }] I'd like it to look like: {User:[ { id:1, type:User, creationDate:2011-02-11T10:20:48Z, email:null, lastLogin:null, password:W6ph5Mm5Pz8GgiULbPgzG37mj9g=, username:charles }] } I'm assuming this is a pretty simple configuration change on the net.sf.json.JSONSerializer, but I can't see it. Am I trying to do something out of the ordinary? Cheers, Charles ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: disposing of an EC
Hi Ted, You don't need to dispose it off explicitly. It will automatically be disposed off during garbage collection. Farrukh On 2011-07-20, at 2:15 PM, Theodore Petrosky wrote: I am using an AjaxModalDialog when I create a new object for my app. The content of the AMD is from a component. When this component is created, I create an EC. should I dispose() of this EC when I close the dialog? I guess this is a question of style. Will it be garbage collected on its own? or Do I gain anything if I theEC.dispose(); when I am done? Ted ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERRest - problem outputting xml as JSON object
Hi Liz, That's a common issue. Suppose you receive the JSON mentioned below, once you get the value of data attribute which is a JSON object in string format, evaluate it using eval() method of javascript and it will be converted to JSON. Farrukh Sent from my iPad 2 On 2011-07-15, at 3:58 PM, Elizabeth Lynch l...@plsys.co.uk wrote: Hi Pascal Sorry, I didn't explain the problem clearly. I am doing that already. The problem is that it comes as a string in my JSON output, not as an object. Liz Sent from my iPhone On 15 Jul 2011, at 12:39, Pascal Robert prob...@macti.ca wrote: I think the best way would be to transform the XML to a Java object and transform that object back to JSON. I am building an ERRest application (read only), and am having a problem with one field. This field holds an xml string, which I need to embed into the output from show and index actions; it will be consumed as json (mainly; possibly only). For example, I would like to receive: {name : A Record, data : { fieldA : valueA, fieldB : valueB } } where the data attribute comes from: SomeElement FieldA=valueAFieldBvalueB/FieldB/SomeElement Or something similar to that. I can use net.sf.json to do the conversion directly, which produces satisfactory strings, but that doesn't cope with the XML output format case, and I can't figure out how to pass it into my JSON output. If I do that with a String field, then obviously it is output as a string value, not as a JSON object, which isn't what I want. In short, the XML is a moderately complex object, which I need to output as an object in the JSON format. All ideas appreciated. Liz ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERRest - problem outputting xml as JSON object
I think you can define an additional getter method over data as dataDictionary() which should return the data xml as NSDictionary. This will solve the problem for both XML and JSON. Farrukh On 2011-07-15, at 7:24 PM, Elizabeth Lynch wrote: Hi Farrukh Thanks: that's a good suggestion, but I need to get it into JSON before it leaves the server, so that technique won't work for me. Liz On 15 Jul 2011, at 15:55, Farrukh Ijaz wrote: Hi Liz, That's a common issue. Suppose you receive the JSON mentioned below, once you get the value of data attribute which is a JSON object in string format, evaluate it using eval() method of javascript and it will be converted to JSON. Farrukh Sent from my iPad 2 On 2011-07-15, at 3:58 PM, Elizabeth Lynch l...@plsys.co.uk wrote: Hi Pascal Sorry, I didn't explain the problem clearly. I am doing that already. The problem is that it comes as a string in my JSON output, not as an object. Liz Sent from my iPhone On 15 Jul 2011, at 12:39, Pascal Robert prob...@macti.ca wrote: I think the best way would be to transform the XML to a Java object and transform that object back to JSON. I am building an ERRest application (read only), and am having a problem with one field. This field holds an xml string, which I need to embed into the output from show and index actions; it will be consumed as json (mainly; possibly only). For example, I would like to receive: {name : A Record, data : { fieldA : valueA, fieldB : valueB } } where the data attribute comes from: SomeElement FieldA=valueAFieldBvalueB/FieldB/SomeElement Or something similar to that. I can use net.sf.json to do the conversion directly, which produces satisfactory strings, but that doesn't cope with the XML output format case, and I can't figure out how to pass it into my JSON output. If I do that with a String field, then obviously it is output as a string value, not as a JSON object, which isn't what I want. In short, the XML is a moderately complex object, which I need to output as an object in the JSON format. All ideas appreciated. Liz ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERRest - problem outputting xml as JSON object
Use ERXKeyFilter.filterWithAll() or ERXKeyFilter.filterWithAllRecrusive() Farrukh On 2011-07-15, at 11:12 PM, Elizabeth Lynch wrote: Hi That should work. What key filter are you using? Are you not allowing keys in from the nested dictionary? Here is my implementation of data for testing (from Category.java): public NSDictionary data() { return new NSDictionary(key, stringValue); } and my showFilter (from CategoryController.java): public static ERXKeyFilter showFilter() { ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes(); filter.include(new ERXKeyNSDictionaryString,String(data)); return filter; } results in: data:{nil:true} I assume this is the result of something incredibly obvious that I have overlooked :-). Liz On Jul 15, 2011, at 1:43 PM, Elizabeth Lynch wrote: Hi I think you can define an additional getter method over data as dataDictionary() which should return the data xml as NSDictionary. This will solve the problem for both XML and JSON. Unfortunately that isn't working for me. Here's some more information I've discovered about the ERREST problem; it looks like it can't cope with Collections (List/Map, or ArrayList/HashMap). Perhaps it wants nasty beans? Below is an example showing it not coping with a dictionary. 'data' is a derived attribute, returning a dictionary, declared as ERXKeyObject in the ERXKeyFilter (or NSDictionary), it returns: data:{nil:true} An NSArray returns: data:[stringValue]} which is much better. But an array of dictionary gives: data:[{nil:true}]} So it seems that the JSON converter is having issues with NSDictionary/Hashmap (I've tried both). Does anyone have any ideas? Liz Farrukh On 2011-07-15, at 7:24 PM, Elizabeth Lynch wrote: Hi Farrukh Thanks: that's a good suggestion, but I need to get it into JSON before it leaves the server, so that technique won't work for me. Liz On 15 Jul 2011, at 15:55, Farrukh Ijaz wrote: Hi Liz, That's a common issue. Suppose you receive the JSON mentioned below, once you get the value of data attribute which is a JSON object in string format, evaluate it using eval() method of javascript and it will be converted to JSON. Farrukh Sent from my iPad 2 On 2011-07-15, at 3:58 PM, Elizabeth Lynch l...@plsys.co.uk wrote: Hi Pascal Sorry, I didn't explain the problem clearly. I am doing that already. The problem is that it comes as a string in my JSON output, not as an object. Liz Sent from my iPhone On 15 Jul 2011, at 12:39, Pascal Robert prob...@macti.ca wrote: I think the best way would be to transform the XML to a Java object and transform that object back to JSON. I am building an ERRest application (read only), and am having a problem with one field. This field holds an xml string, which I need to embed into the output from show and index actions; it will be consumed as json (mainly; possibly only). For example, I would like to receive: {name : A Record, data : { fieldA : valueA, fieldB : valueB } } where the data attribute comes from: SomeElement FieldA=valueAFieldBvalueB/FieldB/SomeElement Or something similar to that. I can use net.sf.json to do the conversion directly, which produces satisfactory strings, but that doesn't cope with the XML output format case, and I can't figure out how to pass it into my JSON output. If I do that with a String field, then obviously it is output as a string value, not as a JSON object, which isn't what I want. In short, the XML is a moderately complex object, which I need to output as an object in the JSON format. All ideas appreciated. Liz ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.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/mschrag%40pobox.com This email sent to msch...@pobox.com ___ Do not post admin requests to the list. They will be ignored
Re: ERRest - problem outputting xml as JSON object
Below is a the running sample with filterWithAttributes and filterWithAllRecursive() public WOActionResults testAction() throws Throwable { ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes(); NSMutableDictionaryString, Object dict = new NSMutableDictionaryString, Object(); dict.put(x, 1); dict.put(data, new NSDictionaryString, Object(2, y)); return response(dict, filter); } HTTP/1.1 200 Apple Date: Fri, 15 Jul 2011 20:50:10 GMT Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.3.4 Cache-Control: max-age=604800 Content-Length: 8 Content-Type: application/json Connection: close {x:1} public WOActionResults testAction() throws Throwable { ERXKeyFilter filter = ERXKeyFilter.filterWithAllRecursive(); NSMutableDictionaryString, Object dict = new NSMutableDictionaryString, Object(); dict.put(x, 1); dict.put(data, new NSDictionaryString, Object(2, y)); return response(dict, filter); } HTTP/1.1 200 Apple Date: Fri, 15 Jul 2011 20:51:35 GMT Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.3.4 Cache-Control: max-age=604800 Content-Length: 23 Content-Type: application/json Connection: close {x:1,data:{y:2}} On 2011-07-15, at 11:12 PM, Elizabeth Lynch wrote: Hi That should work. What key filter are you using? Are you not allowing keys in from the nested dictionary? Here is my implementation of data for testing (from Category.java): public NSDictionary data() { return new NSDictionary(key, stringValue); } and my showFilter (from CategoryController.java): public static ERXKeyFilter showFilter() { ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes(); filter.include(new ERXKeyNSDictionaryString,String(data)); return filter; } results in: data:{nil:true} I assume this is the result of something incredibly obvious that I have overlooked :-). Liz On Jul 15, 2011, at 1:43 PM, Elizabeth Lynch wrote: Hi I think you can define an additional getter method over data as dataDictionary() which should return the data xml as NSDictionary. This will solve the problem for both XML and JSON. Unfortunately that isn't working for me. Here's some more information I've discovered about the ERREST problem; it looks like it can't cope with Collections (List/Map, or ArrayList/HashMap). Perhaps it wants nasty beans? Below is an example showing it not coping with a dictionary. 'data' is a derived attribute, returning a dictionary, declared as ERXKeyObject in the ERXKeyFilter (or NSDictionary), it returns: data:{nil:true} An NSArray returns: data:[stringValue]} which is much better. But an array of dictionary gives: data:[{nil:true}]} So it seems that the JSON converter is having issues with NSDictionary/Hashmap (I've tried both). Does anyone have any ideas? Liz Farrukh On 2011-07-15, at 7:24 PM, Elizabeth Lynch wrote: Hi Farrukh Thanks: that's a good suggestion, but I need to get it into JSON before it leaves the server, so that technique won't work for me. Liz On 15 Jul 2011, at 15:55, Farrukh Ijaz wrote: Hi Liz, That's a common issue. Suppose you receive the JSON mentioned below, once you get the value of data attribute which is a JSON object in string format, evaluate it using eval() method of javascript and it will be converted to JSON. Farrukh Sent from my iPad 2 On 2011-07-15, at 3:58 PM, Elizabeth Lynch l...@plsys.co.uk wrote: Hi Pascal Sorry, I didn't explain the problem clearly. I am doing that already. The problem is that it comes as a string in my JSON output, not as an object. Liz Sent from my iPhone On 15 Jul 2011, at 12:39, Pascal Robert prob...@macti.ca wrote: I think the best way would be to transform the XML to a Java object and transform that object back to JSON. I am building an ERRest application (read only), and am having a problem with one field. This field holds an xml string, which I need to embed into the output from show and index actions; it will be consumed as json (mainly; possibly only). For example, I would like to receive: {name : A Record, data : { fieldA : valueA, fieldB : valueB } } where the data attribute comes from: SomeElement FieldA=valueAFieldBvalueB/FieldB/SomeElement Or something similar to that. I can use net.sf.json to do the conversion directly, which produces satisfactory strings, but that doesn't cope with the XML output format case, and I can't figure out how to pass it into my JSON output. If I do that with a String field, then obviously it is output as a string value, not as a JSON object, which isn't what I want. In short, the XML is a moderately complex object, which I need to output as an object in the JSON format. All ideas appreciated. Liz
Fwd: ERXResponseRewriter.addStylesheetResourceInHead(...)
Re-sent to grab attention :), may be some of you could have a solution! Thanks, Farrukh Begin forwarded message: From: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Date: July 13, 2011 6:47:15 AM GMT+03:00 To: WebObjects Development webobjects-dev@lists.apple.com Subject: ERXResponseRewriter.addStylesheetResourceInHead(...) Hi Guys, I've an issue. In the ERXResponseRewriter is a method called addStylesheetResourceInHead(...). This method adds the stylesheet right before the /head tag. According to CSS style inheritance, I should load the CSS in proper sequence. The CSS I'm adding is the base CSS but because it's being inserted just before the /head tag, the inheriting CSS appear before this CSS in the final response and therefore whole CSS hierarchy breaks. Is there a way I could make the CSS inserted right after the head tag? Thanks in advance, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ERXResponseRewriter.addStylesheetResourceInHead(...)
Thanks Jean, I can manage with this. This will solve the problem and there is only one css that I insert once so no worries about checking if it already inserted or not. Farrukh On 2011-07-14, at 3:43 PM, Jean-Francois Veillette wrote: By default ERXResponseRewriter will insert just before the /head tag, you can call You could use insertInResponseBeforeTag directly and use it like this: 1- keep an 'early-tag' in your html, like: html head !-- EARLY_TAG -- ... 2- use use that tag as a reference: public void appendToResponse(WOResponse response, WOContext context) { super.appendToResponse(response, context); String content = link rel=\stylesheet\ type=\text/css\ href=\+ URL + ... you get the idea ...; tagMissingBehavior ERXResponseRewriter.insertInResponseBeforeTag(response, context, content, !-- EARLY_TAG, TagMissingBehavior.Top); } Warning: If you make your call manually, you do not benefit from many automatic checking done for you: - making sure the resources is loaded only once - resources replacement - ajax style response support (that may not have head in it at all). - probably other things ... look at what ERXResponseRewriter is doing when you simply call ERXResponseRewriter.addStylesheetResourceInHead Le 2011-07-14 à 05:48, Farrukh Ijaz a écrit : Re-sent to grab attention :), may be some of you could have a solution! Thanks, Farrukh Begin forwarded message: From: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Date: July 13, 2011 6:47:15 AM GMT+03:00 To: WebObjects Development webobjects-dev@lists.apple.com Subject: ERXResponseRewriter.addStylesheetResourceInHead(...) Hi Guys, I've an issue. In the ERXResponseRewriter is a method called addStylesheetResourceInHead(...). This method adds the stylesheet right before the /head tag. According to CSS style inheritance, I should load the CSS in proper sequence. The CSS I'm adding is the base CSS but because it's being inserted just before the /head tag, the inheriting CSS appear before this CSS in the final response and therefore whole CSS hierarchy breaks. Is there a way I could make the CSS inserted right after the head tag? Thanks in advance, Farrukh ___ 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/jean_francois_veillette%40yahoo.ca This email sent to jean_francois_veille...@yahoo.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
ERXResponseRewriter.addStylesheetResourceInHead(...)
Hi Guys, I've an issue. In the ERXResponseRewriter is a method called addStylesheetResourceInHead(...). This method adds the stylesheet right before the /head tag. According to CSS style inheritance, I should load the CSS in proper sequence. The CSS I'm adding is the base CSS but because it's being inserted just before the /head tag, the inheriting CSS appear before this CSS in the final response and therefore whole CSS hierarchy breaks. Is there a way I could make the CSS inserted right after the head tag? Thanks in advance, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: state of apns?
We had issue of using bundled jar due to some conflicts with some existing libraries. I would suggest to use the separate jars. It should work without any problem. You need: apns-0.1.5.jar (available at notnoop website) jackson-all-1.8.0.jar mina-core-2.0.3.jar You should be able to find them easily. If not, let me know and I'll send you in a separate email. Try this and I'm hopeful you'll get the problem of classpath resolved. Good luck, Farrukh On 2011-06-30, at 3:48 PM, Jesse Tayler wrote: thanks - let me take this one step at a time. from Eclipse, I can seemingly send a push without a return error or exception - from my server, I get the classdef trouble in each case, my iphone has yet to actually receive a push and yes, for now, I have hard coded a token id which I'm confident is correct. the javaclass jar issue seems odd to me -- I see the jar is packed up with my WOApp: /Library/WebObjects/Applications/WOMan.woa/Contents/Resources/Java/apns-0.1.5-jar-with-dependencies.jar and if I look over at deployment, I can see it where I'd expect and along with others. /opt/WOApplications/WOMan.woa/Contents/Resources/Java/apns-0.1.5-jar-with-dependencies.jar and yes, I use ant to build to install, but it's been a while since I've added a jar from external sources. could this be a JVM issue with the jar somehow? On Jun 30, 2011, at 1:53 AM, Farrukh Ijaz wrote: So in short, what I understand is: 1. You are able to send push notification to the device for which you have the deviceToken hardcoded in the code. 2. Push notification is not working in your deployed application and gives following error: Could not initialize class com.notnoop.apns.internal.Utilities Can you send the complete stack trace? Also make sure you have your jars exported in following folder: /Library/WebObjects/Applications/WOMan.woa/Contents/Resources/Java/ If you don't find the jar here, you still need to figure out the your packaging method. Just do a Clean and Rebuild your application using Project Clean... from the top menu. If you have WOLips Ant Tools installed, you can use following: Right Click the project node WOLips Ant Tools Install... Screen shot 2011-06-30 at 8.45.13 AM.png This will automatically build, package and copy your application and required frameworks in /Library/WebObjects/Applications and /Library/Frameworks folders respectively. In practice, I delete my application from the /Library/WebObjects/Applications folder prior to reinstall it to avoid retention of stale contents. Same I do for my own frameworks if I make any changes in them. Hope this works for you. Farrukh On 2011-06-29, at 11:41 PM, Jesse Tayler wrote: thanks for the insights - still able to send from eclipse without error but I've not quite gotten a push through just yet. On Jun 29, 2011, at 3:44 PM, Farrukh Ijaz wrote: The purpose of the url is to store deviceToken in your application so you could retrieve it for notifications. This doesn't need to be part of your WO application. It can be a .php url as long as you can retrieve the deviceToken. I see, so the NSURLConnection code there is just to send to my own server app (WO) the device's ID so the server is aware. I think get the idea there. just for test, the app sends the push to the hard coded device id returned from the iphone for now - I removed the ID's spaces as you noted earlier. ClassDefNotFound erros are raised when you don't have the .jar file exported as part of your application and it's not available any any of the classpath of your jvm running the application. If it's part of your WO app, make sure you've marked it exported. ahh, I hadn't checked anything about the export -- I kinda see that I've not checked much, even the mysql adaptor isn't checked... So, I went ahead and checked the jar for export, and the path looks ok to me but I still get an error Could not initialize class com.notnoop.apns.internal.Utilities not sure if utilities was the same class as last error, but the jar suggests it has all it's own dependencies - aside from the jar, I've not installed anything on the server and I include frameworks in the app and install as one big ball of WO, as I think most people do. here's a screen of what Ive got for eclipse config - look ok to you? PastedGraphic-1.tiff ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: state of apns?
Did you generate apns-cert for your application using developer account? You can't make it work unless you have a properly configured and generated certificate. Farrukh Sent from my iPad 2 On 2011-06-30, at 5:42 PM, Jesse Tayler jtay...@oeinc.com wrote: oh, thanks -- for some reason, I think it's my provisioning - I can see the cert. included aps-environment in the .mobilprovisioning but I note that this is the only profile that doesn't seem to list my company name and so just to double check, I'm re-generating and 'dirty' my provisioning and download those again as a test. On Jun 30, 2011, at 10:34 AM, Andrew Kinnie wrote: Yes, I had to use the separate jars myself. If you're using Java-APNS I would also recommend trying the google group set up for Java-APNS. The guy who wrote it is absurdly helpful and attentive to the list. On Jun 30, 2011, at 10:26 AM, webobjects-dev-requ...@lists.apple.com wrote: Date: Thu, 30 Jun 2011 08:48:33 -0400 From: Jesse Tayler jtay...@oeinc.com Subject: Re: state of apns? To: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Cc: WebObjects Development webobjects-dev@lists.apple.com Message-ID: 286ba121-5ea2-4a23-b272-db5febc5a...@oeinc.com Content-Type: text/plain; charset=us-ascii thanks - let me take this one step at a time. from Eclipse, I can seemingly send a push without a return error or exception - from my server, I get the classdef trouble in each case, my iphone has yet to actually receive a push and yes, for now, I have hard coded a token id which I'm confident is correct. the javaclass jar issue seems odd to me -- I see the jar is packed up with my WOApp: /Library/WebObjects/Applications/WOMan.woa/Contents/Resources/Java/apns-0.1.5-jar-with-dependencies.jar and if I look over at deployment, I can see it where I'd expect and along with others. /opt/WOApplications/WOMan.woa/Contents/Resources/Java/apns-0.1.5-jar-with-dependencies.jar and yes, I use ant to build to install, but it's been a while since I've added a jar from external sources. could this be a JVM issue with the jar somehow? ___ 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/jtayler%40oeinc.com This email sent to jtay...@oeinc.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: state of apns?
This may help you. I guess you are not removing the spaces in your device token. - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSString *dt = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@]]; dt = [dt stringByReplacingOccurrencesOfString:@ withString:@]; NSURL *url = // URL of your web application ... NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url]; [req setHTTPMethod:@POST]; NSString *udid = [[UIDevice currentDevice] name]; // This is perfectly legal. You just need to make sure it's not visible publicly. NSString *post = [NSString stringWithFormat:@deviceToken=%@deviceId=%@, dt, udid]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; [req setHTTPBody:postData]; NSURLConnection *conn = [NSURLConnection connectionWithRequest:req delegate:self]; [conn start]; } - (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse { NSLog(@Starting: %@, request); return request; } - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSLog(@Device registration with APNS failed with Error: %@, error); } Farrukh On 2011-06-29, at 8:36 PM, Jesse Tayler wrote: I'm missing just a little something -- I'm able to send apns running my wo-app in eclipse - I now send without returning an error at least. String payload = APNS.newPayload().alertBody(Alert!).build(); String token = 3a09e272 3668c411 .; service.push(token, payload); I got my device token string from the return value on the ios device - so it seems my device has properly registered - yes? - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { The token string I'm sending from WO is the token string returned in my iOS device but still no notification gets received? Something I've missed or should check? ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to create plist from ERXGenericRecord ?
Hi Fred, Use: NSPropertyListSerialization.stringFromPropertyList(yourObject); yourObject can be NSArray, NSDictionary or any object that implements NSKeyValueCoding interface I believe. This works for me without any problems. Farrukh On 2011-06-25, at 3:06 PM, Fred Opims wrote: Hi! I have an iPhone application that talks with a webOject application using Entreprise Object. From iPhone application to the WOObject application, i'm using a plist to send data. It works great! I can parse my plist and feed my EO entity. I want to use plist to send data in the other way but i don't know how. I want to convert any fetch result into a Plist or a dictionary but i haven't found a way to do that. Is there a way to do this from a ERXGenericRecord ? I tried with ERXPropertyListSerialization, but i couldn't use it with a ERXGenericRecord. Can you help me please? Thank you! Fred ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Hashcode/ETag for EOs
Hi Pascal, On 2011-05-29, at 9:20 PM, Pascal Robert wrote: I did : ERXRouteResults results = (ERXRouteResults)response(someEntity, filter); String etagHash = ERXCrypto.sha256Encode(results.responseNode().toString(results.format(), this.restContext())); IMO, this is an expensive approach because of encryption algorithm. Unless encryption of the data is key requirement, don't use it. Because normally the toString() if not overridden returns a String comprising the memory address of the instance, this is the reason a simple hashCode() call is not sufficient in your case. You can simply override the hashCode() method and compute the values based on your entity attributes. For caching use Hashtable but that will only benefit if your hashCode() generates unique value. In my experience the best way to cache the values is to maintain a binary tree using the hashCode() as the node value. If you want to implement a better caching, try exploring Splay tree model. With a little modification to it, you can make you caching super fast. These things are not normally practiced by API users but they do matter is you develop your own API to be used by someone else :) Farrukh there's not a direct simple way to do it ... probably grab the snapshot off the EO and compute a hash of the values (you can ignore the keys because they're fixed). it might be something where you can make a new interface in ERX that your EO's could implement to provide a more optimal impl (like ERCStamped could use its lastModified as a basis). ms On May 25, 2011, at 1:55 PM, Pascal Robert wrote: I'm trying to find a way to generate a HTTP ETag for EOs so that caching can be done for REST services. What I want to do is to have the same ETag value for each representation of the EO, so when one of the values change, the ETag value will also change, but if the EO have the same value, it will generate the same ETag as another request got. Problem is: I don't know what to use. I tried with myEO.hashCode() but I did some tests and every time I fetch the EO, the hashcode is different even if the data didn't change. I'm thinking of doing a MD5 digest of part of the EO, but I was wondering if another way exist? I could use a last modified date and generate a MD5 of that too, but that date is a better option for the Last-Modified header. -- Pascal Robert prob...@macti.ca WOWODC 2011 : July 1-2-3, Montreal. wowodc.com AIM/iChat : MacTICanada LinkedIn : http://www.linkedin.com/in/macti Twitter : pascal_robert ___ 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/mschrag%40pobox.com This email sent to msch...@pobox.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Consuming REST services
Hi, I wish I could use ERXKeyFilter.filterWithAllRecursive() but it takes forever for some entities. I guess it's because of 2 way relationship causes the call to get into an infinite loop? I am quite satisfied with the ERRest framework. We are using it heavily for iPhone / iPad apps. The built in support for plist is quite handy so never got chance to use JSON or XML format. Perhaps would use it for building Android and Blackberry clients. Farrukh Sent from my iPad 2 On 2011-05-18, at 5:21 PM, Mike Schrag msch...@pobox.com wrote: ERXRestClient was just a proof of concept ... There's really no reason you couldn't just extend the APi to always use ERXKeyFilter.filterWithAllRecursive() and make a default rest delegate that just makes new instances of classes for you. That said, I think RestEasy and Jersey both do a better job on the client side for things like modeling cookie, header, and form parameters. All would be pretty easy to put into ERXRestClient, though -- we certainly have all the primitives to do it. ms On May 18, 2011, at 10:05 AM, Pascal Robert wrote: Le 2011-05-18 à 09:39, Henrique Prange a écrit : Pascal, Just to summarize the simplicity of Jersey client. Here is a sample code of how to do a GET on the resource identified by 10. Client client = Client.create(); WebResource resource = client.resource( http://localhost/my-service; ); MyResource response = resource.path(resource).path(10).type(MediaType.APPLICATION_JSON).get(MyResource.class); RestEasy is not too bad : public interface SimpleClient { @GET @Path(search.json) @Produces(application/json) ClientResponseTwitterSearchResult getSearchResults(@QueryParam(q) String hashtag, @QueryParam(result_type) String resultType); } SimpleClient client = ProxyFactory.create(SimpleClient.class, http://search.twitter.com/;); ClientResponseTwitterSearchResult response = client.getSearchResults(#wowodc,recent); if (response.getResponseStatus().getFamily().equals(Response.Status.Family.SUCCESSFUL)) { NSLog.out.appendln(response.getEntity()); } Problem is that it doesn't understand classes like NSTimestamp and NSArray. ERXRestClient understand the WO unique stuff, but you have to write delegates, use ERXKeyFilter, etc. But ERXRestClient is good if the service you call is the service you are calling are following the same structure as ERRest or RoR. BTW, the Twitter REST API is crap. Cheers, Henrique On 18/05/2011, at 10:20, Henrique Prange wrote: Hi Pascal, We have been using Jersey [1] to produce and consume REST services. We found Jersey the most concise and simple REST implementation. It also offers a good set of tools to test production and consumption of REST services, which is essential in our development process. [1]http://jersey.java.net/ Cheers, Henrique On 18/05/2011, at 10:05, Pascal Robert wrote: Good morning, I see from the 2011 surveys that a good part of the community is consuming REST services. I was wondering what are you using to consume those? Right now, I'm playing with ERXRestClient and JBoss' RestEasy to consume REST services, but I'm curious to see what other people use. Just plain Jakarta HTTPClient with a JSON or XML parser? -- Pascal Robert prob...@macti.ca WOWODC 2011 : July 1-2-3, Montreal. wowodc.com AIM/iChat : MacTICanada LinkedIn : http://www.linkedin.com/in/macti Twitter : pascal_robert ___ 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/hprange%40gmail.com This email sent to hpra...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com This email sent to msch...@pobox.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests
Re: responseForComponentWithName() and session
I don't remember exactly but Paolo I think you need to configure your application not to create sessions when you access a component. You may be able to find some article on sessionless login for a clue. Or you may need to pass appropriate params in your method call instead of null null null... BTW, the stuff you are trying to do will turn into nightmare when you would need to take care of the component bindings programatically. I would suggest to change your approach to get the desired results. Good luck! Farrukh Amedeo Mantica amedeomail...@insigno.it wrote: why u would like to do it ? put programmatically in html? what is your goal? On 11/apr/2011, at 13.07, Paolo Sommaruga wrote: Hi Amedeo, After invoking the child component I use response.contentString() component to retrieve the html generated and insert it programmatically somewhere in the main component html output. With pageWithName doesn't work, I have many exception of type lookup of unknown key in the child component. It seems that WO is searching in the child component the same key of the parent component. Such behavior does not happen with responseForComponentWithName. There isa only the new session problem Regards Paolo Il giorno 10/apr/2011, alle ore 22.33, Amedeo Mantica ha scritto: why not: WOComponent myPage = pageWithName(ComponentName.class); . . WOResponse response = myPage.generateResponse(); return response; regards Amedeo On 10/apr/2011, at 20.31, Paolo Sommaruga wrote: Hi, I have an application in which inside in a component I need to call a child component invoked programmatically in the java code of the parent component. I use (WOApplication.application ()). responseForComponentWithName(ComponentName, null null null uriPrefix, null); and it works. But I see that the component invoked programmatically uses a new session than the one of the calling component. Is there a way to call responseForComponentWithName() in order to open the new component in the same session of the caller component ? Thanks Paolo ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/psomma%40jpaso.com This email sent to pso...@jpaso.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Questions about Deduplication
Hi Guys, In Wonder's documentation there is a method called setDeduplicationEnabled() for ERXKeyFilter. I've the latest code from trunk but couldn't find this method. Can someone help me locate that? or is there any alternative way to implement the similar behaviour? The problem I'm facing is here: I've following entities, Horse, HorseDetail, HorseType, HorseColor. Following are the relationships. Horse - toMany - HorseDetail Horse - toOne - Horse (Sir) Horse - toOne - Horse (Dam) Horse - toOne - HorseType Horse - toOne - HorseColor There are many horses in the database and I fetch record based on HorseDetail because it contains the horseName. E.g. I fetch all the instances of HorseDetail where the horseName contains letter a. It works fine when I set the rule for entity = HorseDetail, task = GET: displayPropertyKeys = ( horseName, horseBio, toLanguage, toHorseProfile.toHorseType.typeName, toHorseProfile.toHorseColor.colorName ) For all the horses the filter works fine. But when I modify the above rule as following: displayPropertyKeys = ( horseName, horseBio, toLanguage, toHorse.toHorseType.typeName, toHorse.toHorseColor.colorName, toHorse.toSirHorse.toHorseDetails.horseName, toHorse.toDamHorse.toHorseDetails.horseName ) This also works fine but for only those horses which have toSirHorse and toDamHorse set. If any of them is missing, the returned data for those horses only contain the horseName. Here is the method that I use for creating the ERXKeyFilter for HorseDetail. Basically the inferFilterKeysForEntity checks the d2w rules for the entity where the task is GET and gets the displayPropertyKeys. public ERXKeyFilter showFilter(String entityName) { NSArrayString keys = inferFilterKeysForEntity(entityName); ERXKeyFilter filter = null; if (keys != null !keys.isEmpty()) { filter = ERXKeyFilter.filterWithNone(); for (String key : keys) { filter.include(new ERXKeyString(key)); } } else { filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships(); } return filter; } Here is the action defined in the custom rest controller for the horses method: public WOActionResults searchAction() throws Throwable { NSArrayEOQualifier quals = new NSMutableArrayEOQualifier(); String name = request().stringFormValueForKey(name); if (name != null) { quals.add(HorseDetail.TO_LANGUAGE.eq(language())); quals.add(HorseDetail.PROFILE_NAME.ilike(name)); } EOFetchSpecification fs = new EOFetchSpecification( HorseDetail.ENTITY_NAME, new ERXAndQualifier(quals), null); NSArrayHorseDetail elements = editingContext() .objectsWithFetchSpecification(fs); HorseColor horseColor = horseColor(); if (horseColor != null) { elements = HorseDetail.TO_HORSE .append(Horse.TO_HORSE_COLOR).eq(horseColor) .filtered(elements); } HorseType type = type(); if (type != null) { elements = HorseDetail.TO_HORSE .append(Horse.TO_HORSE_TYPE).eq(type) .filtered(elements); } return response(elements, showFilter(HorseDetail.ENTITY_NAME)); } I guess modifying the value of deduplication can give me the intended results. or is there any other solution to this problem? Here is the link: http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/extensions/eof/ERXKeyFilter.html#setDeduplicationEnabled(boolean) Thanks, Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Another dumb ERRest question
Hi Andrew, I think you shouldn't return a filtered response when you're deleting the object. Your response should indicate your operation was successful or not based on the editingContext().saveChanges() out come. response(entity, showFilter()) should be used for GET (fetch / select) and optionally in PUT (insert) and POST (update). Farrukh On 2011-03-28, at 10:36 PM, Andrew Kinnie wrote: I am again working on my ERRest based push notification server, and am having an issue with the framework. I am using a version of Wonder from last week (the 5.4 branch), in eclipse 3.6 using a MySQL database on the development machine. I looked at the example app, and copied the key functions from it (after wasting time trying to over-think it for a while going back to the easy method). I can add a new object, it stores it in the database, but if I then attempt to delete it using the code: @Override public WOActionResults destroyAction() throws Throwable { NotificationType type = notificationType(); type.delete(); editingContext().saveChanges(); return response(type, showFilter()); } The type gets the delete message, saveChanges deletes the row in the database (the EO_PK_TABLE still shows it's pk as the current pk, which I gather is normal) but then the returned method response(type, showFilter()); crashes with an NPE deep in the guts of ERRest: requestNode._fillInWithObjectAndFilter(obj, classDescription, keyFilter, delegate, new HashSetObject()); This is called in ERXRestRequestNode.java. It appears (though I'm not completely sure) that the method is asking for the old object it just deleted, and there isn't one, because it just deleted it. However, I copied this code directly from the example, so something somewhere is going wrong that doesn't go wrong in the example app. So, I can avoid all this by just returning null, as the user will not actually need to get a response, but I thought I'd ask the question, what should I be doing here, and what might be going wrong? Andrew ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: java.lang.OutOfMemoryError
Hi, Try using this: -Xms256m -Xms1024m -XX:MaxPermSize=256m This works very well if you don't have a memory leak in your code. Farrukh Theodore Petrosky tedp...@yahoo.com wrote: Thanks honey, I love you too.. :-) I found that and a wonderful video explaining how to set the -Xms and -Xmx values in the run configuration of my app. so I added: -Xms256m -Xmx512m to my VM arguments and there was no change. So either I totally misunderstood what to fix or I need more drugs. Ted --- On Mon, 3/14/11, Mark Ritchie mark.ritc...@mac.com wrote: From: Mark Ritchie mark.ritc...@mac.com Subject: Re: java.lang.OutOfMemoryError To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Monday, March 14, 2011, 5:13 PM On 14/Mar/2011, at 1:57 PM, Theodore Petrosky wrote:java.lang.OutOfMemoryError: Java heap space where can I adjust this value? I am on a mac mini os x 10.6.6 http://tinyurl.com/5vgejad That should get you started! ;-)M ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Reverse Engineer?
Shouldn't the mysql jar be placed in Java/ext folder? Farrukh Pascal Robert prob...@macti.ca wrote: Bundle-less project without having WO 5.4 and a recent Wonder version? If JavaFoundation is in the classpath, that problem look like the one we had when the bundle-less option was enabled but we were using WO 5.3. Hello - I am trying to reverse engineer a mysql db with Eclipse 3.6x and all I get are error messages. First about JavaMail and then thereafter, NSBundle ? Am I missing some setup config? Thanks James java.lang.NoClassDefFoundError: Could not initialize class com.webobjects.foundation.NSBundle at com.webobjects.eoaccess.EOAdaptor.infoDictionaryForAdaptorNamed(EOAdaptor.java:230) at com.webobjects.eoaccess.EOAdaptor.classNameForAdaptorNamed(EOAdaptor.java:246) at com.webobjects.eoaccess.EOAdaptor.classForAdaptorNamed(EOAdaptor.java:262) at com.webobjects.eoaccess.EOAdaptor.adaptorWithName(EOAdaptor.java:287) at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLReverseEngineer53.init(EOFSQLReverseEngineer53.java:28) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLReverseEngineerFactory.reverseEngineer(EOFSQLReverseEngineerFactory.java:23) at org.objectstyle.wolips.eomodeler.actions.ReverseEngineerAction.run(ReverseEngineerAction.java:86) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Disable Back button in IE and Safari Browser
Hi Pavan, What John has suggested is what you need to enable the client side cache so your javascript code could work. Using the window.history.go() and window.history.forward() will bring you back to the same page. However, I personally think it's not a good practice to implement such behaviour in your application. It's better you launch your page in a new browser window and hide the browser tool bar. Farrukh On 2011-02-24, at 6:31 PM, pavan.jayam wrote: Thank you John.. i will try this... but what exactly i need is, the user should be in the same page, i dont want the user to move back. John Huss wrote: Page caching versus regeneration is determined by: WOApplication.*setPageRefreshOnBacktrackEnabled http://webobjects.mdimension.com/javadoc/WebObjects/5.4/com/webobjects/appserver/WOApplication.html#setPageRefreshOnBacktrackEnabled%28boolean%29*(boolean aFlag) But I would suggest that breaking the back button is a very bad idea; it is a fundamental part of the browser. John On Thu, Feb 24, 2011 at 2:52 AM, pavan.jayam pavan.ja...@prithvisolutions.com mailto:pavan.ja...@prithvisolutions.com wrote: Dear All, How to disable back button when user clicks browser back button, the formal way is window.history.forward() and window.history.go() are working with normal html pages... but when implemented with webobjects its giving webpage is expired. can any one suggest on this. -- ThanksRegards, *Pavan Jayam *Software Trainee *Prithvi Information Solutions Ltd* 10Q3A1, Cyber Towers HITEC City, Madhapur Hyderabad - 500 081 Desk: +091 - 040 - 66846019 tel:%2B091%20-%20040%20-%2066846019 XT:304 http://www.prithvisolutions.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com mailto:Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com mailto:johnth...@gmail.com -- ThanksRegards, *Pavan Jayam *Software Trainee *Prithvi Information Solutions Ltd* 10Q3A1, Cyber Towers HITEC City, Madhapur Hyderabad - 500 081 Desk: +091 - 040 - 66846019 XT:304 http://www.prithvisolutions.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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Quick survey: who's deploying on VMWare?
On 2011-02-24, at 6:57 PM, Pascal Robert wrote: Quick survey: who is deploying on VMWare (ESX or otherwise)? Maybe we could make a pre-configured VM with CentOS and everything (wotaskd, Monitor, Apache, etc.) needed for WO in a VMWare template? I configured one for development using Ubuntu 9 and Sun Virtual Box in 2009. It was good for new comers and trainees who don't have a mac. I think it would be good to have for development too... we need to see the alternative for Rule Editor for non-Mac platforms. Farrukh ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: java.lang.NoClassDefFoundError
Hi Dave,Is your framework is checked under Order and Export tab of the Java Build Path? May be that would be the reason for this NoClassDefFoundError.FarrukhOn 2011-01-25, at 9:00 AM, David Avendasora wrote:Hi all,I've been refactoring/modernizing a rather large app that has had the model as part of the application. I've split out the Model, the model classes and a bunch of supporting classes that are required by the model classes into a new Wonder Framework project.I've gotten everything to compile correctly in both the new framework project and the original application in eclipse, but when I the application it in eclipse, the app fails stating that it can't initialize the model files. (see stack trace below)I know that this is almost certainly a classpath issue, but the Framework is added to the build path just as the Wonder and WebObjects frameworks are. The framework only exists as source code in the Eclipse workspace, and I have tried it with bundles enabled, and disabled and I get the exact same results.Why would an app not be able to find classes at runtime, when it can find them in the source code? It's got to be something incredibly simple that I'm just overlooking.Davecom.webobjects.foundation.NSForwardException [java.lang.NoClassDefFoundError] Could not initialize class com.mycompany.ac.model.GlobalLU:java.lang.NoClassDefFoundError: Could not initialize class com.mycompany.ac.model.GlobalLU at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43) at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1140) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) at com.webobjects.appserver.WOApplication.valueForKey(WOApplication.java:5575) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:216) at com.webobjects.appserver.WOApplication.valueForKeyPath(WOApplication.java:5645) at com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyPath(NSKeyValueCodingAdditions.java:149) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:217) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at er.extensions.components._private.ERXWOString.appendToResponse(ERXWOString.java:70) at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126) at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136) at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122) at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574) at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543) at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538) at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278) at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158) at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949) at com.mycompany.ac.Application.dispatchRequest(Application.java:178) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:680)Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.mycompany.ac.model.GlobalLU at com.mycompany.ac.Application.currentProgram(Application.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.mycompany.ac.KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:35) at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134) ... 26 more ___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
Re: java.lang.NoClassDefFoundError
What about the generated entity classes? Did you move them to the new framework as part of refactoring or they are part of the application? Just trying to guess what could be the reason as we have many frameworks which contain models and we have re-factored some of them and found no problem at all. Farrukh On 2011-01-25, at 9:20 AM, David Avendasora wrote: Hi Farrukh, I did not have it checked, and checking it made no difference. As far as I know, the only things you really need to mark for export are .jar libraries that you want to make sure are included in the build. I don't think that makes any difference when you are running in Eclipse. But maybe I'm wrong... Dave On Jan 25, 2011, at 1:08 AM, Farrukh Ijaz wrote: Hi Dave, Is your framework is checked under Order and Export tab of the Java Build Path? May be that would be the reason for this NoClassDefFoundError. Screen shot 2011-01-25 at 9.06.37 AM.png Farrukh On 2011-01-25, at 9:00 AM, David Avendasora wrote: Hi all, I've been refactoring/modernizing a rather large app that has had the model as part of the application. I've split out the Model, the model classes and a bunch of supporting classes that are required by the model classes into a new Wonder Framework project. I've gotten everything to compile correctly in both the new framework project and the original application in eclipse, but when I the application it in eclipse, the app fails stating that it can't initialize the model files. (see stack trace below) I know that this is almost certainly a classpath issue, but the Framework is added to the build path just as the Wonder and WebObjects frameworks are. The framework only exists as source code in the Eclipse workspace, and I have tried it with bundles enabled, and disabled and I get the exact same results. Why would an app not be able to find classes at runtime, when it can find them in the source code? It's got to be something incredibly simple that I'm just overlooking. Dave com.webobjects.foundation.NSForwardException [java.lang.NoClassDefFoundError] Could not initialize class com.mycompany.ac.model.GlobalLU:java.lang.NoClassDefFoundError: Could not initialize class com.mycompany.ac.model.GlobalLU at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43) at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1140) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324) at com.webobjects.appserver.WOApplication.valueForKey(WOApplication.java:5575) at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:216) at com.webobjects.appserver.WOApplication.valueForKeyPath(WOApplication.java:5645) at com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyPath(NSKeyValueCodingAdditions.java:149) at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:217) at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804) at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50) at er.extensions.components._private.ERXWOString.appendToResponse(ERXWOString.java:70) at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126) at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136) at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122) at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574) at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543) at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538) at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278) at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158) at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949) at com.mycompany.ac.Application.dispatchRequest(Application.java:178) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144
Re: AjaxTabbedPanel ??? V2
Are you using a separate WOForm for each tab? If yes, then you should revise your code and use 1 form for all your fields no matter they span across multiple tabs. Farrukh On 2011-01-16, at 5:32 PM, Theodore Petrosky wrote: I am copying from the ajaxexample. in a nutshell I have: Tab1 displays and edits $theUser.firstName and various other fields. Tab2 displays checkboxes for various fields like: wo:WOCheckBox checked = $theUser.securitySettings.seesUserManagement / Tab1 is set as isSelected = true; when i display the AMD, Tab1 looks beautiful however, when I display Tab2 all the securitySettings are unchecked (this user should have them all checked (true)). If I make a change on Tab1, and save the EC, all the securitySettings are set to false and overwritten. If I go to Tab2 and check the settings to make them true, saving saves these settings. So although I can set the values from Tab2, it doesn't display the current settings. If you understand better the workings of the AjaxTabbedPanel, maybe you could look at my code from last week and see if my error is obvious. You did say, I think you need to specify the name property for you tabbed panel. What does this mean? Thanks, Ted --- On Sun, 1/16/11, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: From: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Subject: Re: AjaxTabbedPanel ??? V2 To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Sunday, January 16, 2011, 8:24 AM Hi Ted, I think you need to specify the name property for you tabbed panel. Anyhow, working with AjaxTabbedPanel is a bit tricking. The easiest way is to copy the code from the Ajax examples and tweak it for your need. Farrukh On 2011-01-16, at 4:20 PM, Theodore Petrosky wrote: Is there some secret that I am missing about using the AjaxTabbedPanel? Nothing I do seems to allow it to display the data I need. I posted earlier in the week my problem, if anyone has an idea what I can do to learn this feature. I posted what I thought was an appropriate amount of detail (including my code) last week. I could repost it. Help, I really like what this looks like if only I could get it to work. Ted ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: AjaxTabbedPanel ??? V2
Apparently nothing is wrong with your code. Try using ERXOptionalForm instead of WOForm. Also try moving the form inside the tabbed panel. I think you may need AjaxObserveField too around your fields inside the form. wo:ERXOptionalForm multipleSubmit = $true wo:AjaxObserveField fullSubmit=$true action=$dummy !-- Your stuff here including tabs -- /wo:AjaxObserveField /wo:ERXOptionalForm Farrukh On 2011-01-16, at 9:13 PM, Theodore Petrosky wrote: I have one form: wo:WOForm multipleSubmit = true div class = tabBox webObject name = TabbedPanel webObject name = Tab1 table class = tableDefs width = 550 tr class = meta1 td width = 110First Name/td tdwo:WOTextField value = $theUser.firstName size = 65 //td /tr tr class = meta1 td width=35%Last Name/td tdwo:WOTextField value = $theUser.lastName size = 65 //td /tr tr class = meta1 tdTitle/td tdwebobject name = EmployeeTitlePopUp //td /tr /table /webObject name = Tab1 webObject name = Tab2 table width = 250 tr td div class = twoLineSees Employee Management: wo:WOCheckBox checked = $theSecuritySettings.seesUserManagement / br / br / Sees Client Management: wo:WOCheckBox checked = $theSecuritySettings.seesClientManagement / br / br / Sees Settings Management: wo:WOCheckBox checked = $theUser.securitySettings.seesSettingsManagement / /div br / /td /tr /table /webObject /webObject /div br / wo:AjaxSubmitButton action = $save value = Save /wo:AjaxSubmitButton action = $cancelEdits value = Cancel / /wo:WOForm --- On Sun, 1/16/11, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: From: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Subject: Re: AjaxTabbedPanel ??? V2 To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Sunday, January 16, 2011, 12:24 PM Are you using a separate WOForm for each tab? If yes, then you should revise your code and use 1 form for all your fields no matter they span across multiple tabs. Farrukh On 2011-01-16, at 5:32 PM, Theodore Petrosky wrote: I am copying from the ajaxexample. in a nutshell I have: Tab1 displays and edits $theUser.firstName and various other fields. Tab2 displays checkboxes for various fields like: wo:WOCheckBox checked = $theUser.securitySettings.seesUserManagement / Tab1 is set as isSelected = true; when i display the AMD, Tab1 looks beautiful however, when I display Tab2 all the securitySettings are unchecked (this user should have them all checked (true)). If I make a change on Tab1, and save the EC, all the securitySettings are set to false and overwritten. If I go to Tab2 and check the settings to make them true, saving saves these settings. So although I can set the values from Tab2, it doesn't display the current settings. If you understand better the workings of the AjaxTabbedPanel, maybe you could look at my code from last week and see if my error is obvious. You did say, I think you need to specify the name property for you tabbed panel. What does this mean? Thanks, Ted --- On Sun, 1/16/11, Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com wrote: From: Farrukh Ijaz farrukh.i...@fuegodigitalmedia.com Subject: Re: AjaxTabbedPanel ??? V2 To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Sunday, January 16, 2011, 8:24 AM Hi Ted, I think you need to specify the name property for you tabbed panel. Anyhow, working with AjaxTabbedPanel is a bit tricking. The easiest way is to copy the code from the Ajax examples and tweak it for your need. Farrukh On 2011-01-16, at 4:20 PM, Theodore Petrosky wrote: Is there some secret that I am missing about using the AjaxTabbedPanel? Nothing I do seems to allow it to display the data I need. I posted earlier in the week my problem, if anyone has an idea what I can do to learn this feature. I posted what I thought was an appropriate amount of detail (including my code) last week. I could repost it. Help, I really like what this looks like if only I could get it to work. Ted ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com
Re: Hudson and frameworks reference
It's overly advertised extended behaviour of ant to resolve dependencies. Farrukh On 2011-01-15, at 5:27 PM, Ramsey Lee Gurley wrote: On Jan 15, 2011, at 6:49 AM, Lachlan Deck wrote: On 15/01/2011, at 2:12 PM, Mike Schrag wrote: I'm all for Q's approach, too. For me, Ivy is the part of Maven that isn't so bad. You get the dependency management without all the other stuff on top. And, of course, you can interpret 'all the other stuff on top' in one of two ways: a) negatively, which seems to be the way this particular community keeps the myth going that it'll be too much pain. (Perhaps certain people have a hang-over from maven 1?). b) positively, as meaning all the additional benefits maven provides and with less pain overall. I found the latter to be true. :) Having everything is configured in your pom file(s) and thus in version control (rather than requiring external configs on differing environments), dependency management, proper build lifecycles (with testing, integration testing etc), convention over configuration, lots of handy plugins easily adapted. It's definitely worth a serious look. with regards, - Lachlan Deck If I had to describe Jenkins(Hudson) in a sentence, I would say: A webapp for automating builds that is similar to Apple's Automator. Can a Maven fan concisely describe Maven in something the size of a tweet so that I might understand why I would want to use it? For me, the problem isn't a negative perception I simply have no idea what Maven does or why I would want to use it. Thanks, Ramsey ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: DirectAction pages with Ajax calls inside
+1 Nice website. Farrukh On 2011-01-15, at 12:17 AM, Amedeo Mantica wrote: Hello all, Sometime ago I was on the hotnews page of apple website http://www.apple.com/hotnews/ and I noticed that if you click on the page selection numbers a javascript actually change tha page but is also added a fragment identifier to the page, so if you copy/paste the url or hit refresh you are still in the correct page now, if we have a direct action page that we have called with some parameters, for example: /wa/showProducts?category=Cables and we have inside that page some Ajax popup buttons or other Ajax elements that can change category or page, when we hit realod we lose any choice made. based on apple hotnews and thank to Mike for some explanations page I made a solution that I would like to share with you When you need to an ajax call ( via AjaxUpdateLink, an AjaxObserveField etc... ) you need to update the url using a js window.location=... then the url become /wa/showProducts?category=Cablespage=2#category=Video when an user hit refresh or the url is pasted in a new page I made a javascript that take care of combining/updating the left side (and discard the rightside) this is the js source code if you would like to check http://www.confindustria.chieti.it/WebObjects/ConfindustriaNet.woa/Contents/WebServerResources/ajaxToDirectActions.js if you would like to try go to this website http://www.confindustria.chieti.it on the top navigation bar click on LE AZIENDE then you have on the left a popupmenu called Selezione per settore ( actually I have enabled only on that ) change tha value then reload the page I think that this can be made better and eventually incorporated in wonder, adding two bindings to AjaxDinamicElements ( fragmentIdentifierKey, fragmentIdentifierValue ) Any suggestion ? Regards Amedeo ___ 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WO 5.2 / 5.3 run app standalone.
Hi, This is known as Evil Direct Connect. Following link is very helpful: http://wiki.objectstyle.org/confluence/display/WO/Development+Tools-Running+Through+Apache What Cheong said should fix the problem. Farrukh On 2011-01-13, at 11:30 AM, Frédéric JECKER wrote: Hi all, Using webobjects 5.2 when I used to run an app standalone on a server (for testing purpouses – using the .cmd or the .sh file) I could connect to it directly using the port displayed in the console (ie 127.0.0.1:1234) Now with webobjects 5.3 the URL changed to 127.0.0.1/cgi-bin/WebObjects/-1234. It seems that even the app is started standalone it is using the apache adaptor. Is this behavior normal, is there a way to enable the old connexion mechanism ? 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/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OGNL binding failing for WOImageButton
You need to specify action. You can't set it as null although it doesn't complain at compile time. That's breaking your component I guess. Farrukh On 2011-01-13, at 7:49 AM, Tarun Reddy wrote: Last thing.. I created a new Wonder Application and successfully reproduced the problem. My steps: create new Wonder Application create an image in WebServerResources/default.com/images/search.jpg Add public String comp = default.com; to Session.java In Main.html, add WOImage webobject name = SubmitButton/webobject in body tag In Main.wod add SubmitButton : WOImageButton { filename = ~session.comp + \/images/search.jpg\; action = null; //filename = default.com/images/search.jpg; } Fail. Pretty simple to reproduce. Next step is to see if I update the Wonder Frameworks if this still fails. Mine is from May 10, 2010. Tarun On Wed, Jan 12, 2011 at 9:43 PM, Tarun Reddy t...@cornell.edu wrote: This seems to work fine. It resolves to com.webobjects.appserver._private.WOImageButton Tarun On Wed, Jan 12, 2011 at 5:01 AM, John Larson the_lars...@mac.com wrote: Go to the page's Java file. Somewhere try to define a variable of type WOImageButton and see if eclipse finds it in your classpath. It's possible that your install is missing it altogether. There's obviously other ways to check that, but this way should only take a second and then you've eliminated the classpath problem. John On Jan 12, 2011, at 1:36 AM, Tarun Reddy ta...@reddyemail.com wrote: It is quite late and I tried it again today. It definitely is an error when I switch back and forth only changing woimage and woimagebutton. Same page, same exact location. I'm not specifying a framework as I'm using the webserverresource directory. I apologize in advance for the lack of case in my email. iPhone and late night coding. I'll try tomorrow to create a small project with just the code in question to see if I can repro. Thank you, Tarun Sent from my iPhone On Jan 11, 2011, at 8:54 PM, John Larson the_lars...@mac.com wrote: It might be late and I may have had a beer or two tonight, but are you absolutely positive that simply changing from WOImage to WOImageButton breaks it as you've described? I want to remember that error being a bundling problem like if you use an outdated reference to a framework. If it was an ognl problem, you'd get a clear ognl error. This is a total shot in the dark, but it's dark outside so ..., did you try specifying the framework in addition to the filename? John On Jan 11, 2011, at 9:35 PM, Tarun Reddy t...@cornell.edu wrote: On Mon, Jan 10, 2011 at 10:43 PM, Tarun Reddy t...@cornell.edu wrote: Can anyone help with this: SearchImage : WOImageButton { filename = ~session.siteDefinition.siteDomain + \/images/find1.jpg\; } This gives the desired image SearchImage : WOImage { filename = ~session.siteDefinition.siteDomain + \/images/find1.jpg\; } I guess it would have been at least moderately helpful to include my error that I get :-) Error: java.lang.RuntimeException: Unable to load the component named 'SearchImage' with the declaration Component Type = WOImageButton, Bindings = { filename=session.siteDefinition.siteDomain + /images/find1.jpg }. Make sure the .wo folder is where it's supposed to be and the name is spelled correctly. Reason:Unable to load the component named 'SearchImage' with the declaration Component Type = WOImageButton, Bindings = { filename=session.siteDefinition.siteDomain + /images/find1.jpg }. Make sure the .wo folder is where it's supposed to be and the name is spelled correctly. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/the_larsons%40mac.com This email sent to the_lars...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com This email sent to farrukh.i...@fuegodigitalmedia.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com