From jdunnett at math.uwaterloo.ca Fri Apr 4 12:05:38 2008 From: jdunnett at math.uwaterloo.ca (Jeff Dunnett) Date: Fri Apr 4 12:05:55 2008 Subject: WOTextField question Message-ID: Hello, I have a WOTextField which will have a starting value. For example a Name field with the value "Jeff". I was wondering if there is anyway that I can make it so that if the cursor is before the J all the user has to do is type and the characters will be overwritten. I have looked online at various reference both for WebObjects and HTML but haven't found an answer to the problem. Regards, Jeff From chill at global-village.net Fri Apr 4 13:37:00 2008 From: chill at global-village.net (Chuck Hill) Date: Fri Apr 4 13:37:03 2008 Subject: WOTextField question In-Reply-To: References: Message-ID: Hi Jeff, On Apr 4, 2008, at 12:05 PM, Jeff Dunnett wrote: > Hello, > > I have a WOTextField which will have a starting value. For example > a Name field with the value "Jeff". I was wondering if there is > anyway that I can make it so that if the cursor is before the J all > the user has to do is type and the characters will be overwritten. > I have looked online at various reference both for WebObjects and > HTML but haven't found an answer to the problem. JavaScript is what you want to look at. Probably the onFocus event. http://www.java2s.com/Code/JavaScript/Form-Control/SelectingTextUponFocus.htm Chuck -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects From jdunnett at math.uwaterloo.ca Wed Apr 9 13:34:59 2008 From: jdunnett at math.uwaterloo.ca (Jeff Dunnett) Date: Wed Apr 9 13:35:57 2008 Subject: Relationship delete rules Message-ID: <951C3374-882B-4F6E-A712-46969B9ED790@math.uwaterloo.ca> Hello, I have an object A that has a one-to-one relationship to object B. The delete rule for this relationship is nullify. Object A has a field (foreign key) that is the primary key of Object B. Object B has a one-to-one relationship with Object A. The delete rule for that relationship is cascade. I have a piece of code that looks like this: ec.lock(); for(int i = 0; i < objects.count(); i++){ A a = (A)objects.objectAtIndex(i); if(a.b() != null){ ec.deleteObject(a.b()); } } ec.saveChanges(); ec.unlock(); This code runs without throwing any exceptions. I believe that once this code has ran the field in Object A that is is the foreign key (i.e. the primary key of Object B) should be null. Am I correct in thinking this? For some reason after the code has ran the foreign key in Object A is not null. Is my interpretation of how the delete rule works incorrect? What else might I be doing wrong? Regards, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20080409/e86233dc/attachment.html From chill at global-village.net Wed Apr 9 14:06:36 2008 From: chill at global-village.net (Chuck Hill) Date: Wed Apr 9 14:06:44 2008 Subject: Relationship delete rules In-Reply-To: <951C3374-882B-4F6E-A712-46969B9ED790@math.uwaterloo.ca> References: <951C3374-882B-4F6E-A712-46969B9ED790@math.uwaterloo.ca> Message-ID: Your delete rules sound backwards. Chuck On Apr 9, 2008, at 1:34 PM, Jeff Dunnett wrote: > Hello, > > I have an object A that has a one-to-one relationship to object B. > The delete rule for this relationship is nullify. Object A has a > field (foreign key) that is the primary key of Object B. Object B > has a one-to-one relationship with Object A. The delete rule for > that relationship is cascade. > > I have a piece of code that looks like this: > > ec.lock(); > > for(int i = 0; i < objects.count(); i++){ > A a = (A)objects.objectAtIndex(i); > > if(a.b() != null){ > ec.deleteObject(a.b()); > } > } > > ec.saveChanges(); > ec.unlock(); > > This code runs without throwing any exceptions. I believe that once > this code has ran the field in Object A that is is the foreign key > (i.e. the primary key of Object B) should be null. Am I correct in > thinking this? For some reason after the code has ran the foreign > key in Object A is not null. Is my interpretation of how the delete > rule works incorrect? What else might I be doing wrong? > > Regards, > Jeff > > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects From lachlan.deck at gmail.com Wed Apr 9 14:12:29 2008 From: lachlan.deck at gmail.com (Lachlan Deck) Date: Wed Apr 9 14:12:41 2008 Subject: Relationship delete rules In-Reply-To: <951C3374-882B-4F6E-A712-46969B9ED790@math.uwaterloo.ca> References: <951C3374-882B-4F6E-A712-46969B9ED790@math.uwaterloo.ca> Message-ID: Hi there, On 10/04/2008, at 6:34 AM, Jeff Dunnett wrote: > I have an object A that has a one-to-one relationship to object B. > The delete rule for this relationship is nullify. Object A has a > field (foreign key) that is the primary key of Object B. Object B > has a one-to-one relationship with Object A. The delete rule for > that relationship is cascade. > > I have a piece of code that looks like this: > > ec.lock(); > > for(int i = 0; i < objects.count(); i++){ > A a = (A)objects.objectAtIndex(i); > > if(a.b() != null){ a.removeObjectFromBothSidesOfRelationshipWithKey(a.b(), "b"); > ec.deleteObject(a.b()); > } > } > > ec.saveChanges(); > ec.unlock(); > > This code runs without throwing any exceptions. I believe that once > this code has ran the field in Object A that is is the foreign key > (i.e. the primary key of Object B) should be null. Am I correct in > thinking this? For some reason after the code has ran the foreign > key in Object A is not null. Is my interpretation of how the delete > rule works incorrect? What else might I be doing wrong? It's just a snapshot issue. The above should do the trick. HTH with regards, -- Lachlan Deck From payroll at payonline.com Wed Apr 16 09:45:42 2008 From: payroll at payonline.com (Ed Herd) Date: Wed Apr 16 09:51:23 2008 Subject: XML Message-ID: WebObjects emits HTML. In and effort to make my web pages more able to exchange data with other applications on client sites; I am considering emitting XML. Can WebObjects be configured to emit XML? Any suggestions or comments would be much appreciated. Thanks in advance, Ed Herd From alan.ward at mac.com Wed Apr 16 10:06:33 2008 From: alan.ward at mac.com (Alan Ward) Date: Wed Apr 16 10:07:10 2008 Subject: XML In-Reply-To: References: Message-ID: On Apr 16, 2008, at 10:45 AM, Ed Herd wrote: > WebObjects emits HTML. it emits what's in the .html files after substituting various elements based on bindings in the .wod > In and effort to make my web pages more able to exchange data with > other applications on client sites; I am considering emitting > XML. Can WebObjects be configured to emit XML? Yes, just put XML in the html file. Alan > Any suggestions or comments would be much appreciated. > > Thanks in advance, > Ed Herd > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev From mschrag at mdimension.com Wed Apr 16 09:54:53 2008 From: mschrag at mdimension.com (Mike Schrag) Date: Wed Apr 16 10:25:03 2008 Subject: XML In-Reply-To: References: Message-ID: <6A4F2573-1238-4F5F-BA70-5F8FD02A1DB1@mdimension.com> > WebObjects emits HTML. > In and effort to make my web pages more able to exchange data with > other applications on client sites; I am considering emitting XML. > Can WebObjects be configured to emit XML? Any suggestions or > comments would be much appreciated. If you're just making custom components, you can simply put XML in the components and it works fine. If you're referring to having your components generate valid XHTML, then you will need either WO 5.4.x or Project Wonder for that, because WebObjects <=5.3 does not fully generate XHTML output in all the core components. ms From mejiad at evol-tech.com Thu Apr 17 08:40:15 2008 From: mejiad at evol-tech.com (Daniel Mejia) Date: Thu Apr 17 08:40:19 2008 Subject: I need help with D2W templates Message-ID: Hi all, I need some help to know how to modify the D2WSelect template to add an hyperlink and bind the action to a method define in the external component that contains the D2WSelect component. I froze the template and added the hyperlink to the frozen template, but I can't figure out how to bind this hyperlink with my method defined in the component that contains the D2WSelect. thanks for your suggestions. Saludos, Daniel. From guido.neitzer at gmail.com Thu Apr 17 09:39:52 2008 From: guido.neitzer at gmail.com (Guido Neitzer) Date: Thu Apr 17 09:39:58 2008 Subject: I need help with D2W templates In-Reply-To: References: Message-ID: On Thu, Apr 17, 2008 at 9:40 AM, Daniel Mejia wrote: > I need some help to know how to modify the D2WSelect template to add an > hyperlink and bind the action to a method define in the external component > that contains the D2WSelect component. Do I miss something or why can't you subclass D2WSelect, implement your own HTML / additional Java and write a rule that is similar to: task = "edit" and entity.name = "MyObject" and propertyKey = "property" => componentName = "MyD2WSelect" [100] ? No need for freezing anything. cug From mejiad at evol-tech.com Thu Apr 17 10:37:03 2008 From: mejiad at evol-tech.com (Daniel Mejia) Date: Thu Apr 17 10:37:10 2008 Subject: I need help with D2W templates In-Reply-To: References: Message-ID: Guido, I'm following the documentation to modify the embeddable components that is explaned in the "WebObjects Direct to Web Guide" where they freeze the template to modify one of the embedabble components, in the guide example they modify the list to create a editable table, but the action is coded inside the template code and in my case that additional method should be binded to an external method as similar as is binded the "action" method to the return action. Regards, Daniel. On Apr 17, 2008, at 11:39 AM, Guido Neitzer wrote: > On Thu, Apr 17, 2008 at 9:40 AM, Daniel Mejia tech.com> wrote: > >> I need some help to know how to modify the D2WSelect template to >> add an >> hyperlink and bind the action to a method define in the external >> component >> that contains the D2WSelect component. > > Do I miss something or why can't you subclass D2WSelect, implement > your own HTML / additional Java and write a rule that is similar to: > > task = "edit" and entity.name = "MyObject" and propertyKey = > "property" => componentName = "MyD2WSelect" [100] > > ? No need for freezing anything. > > cug -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20080417/9cef0f88/attachment.html From guido.neitzer at gmail.com Thu Apr 17 14:32:59 2008 From: guido.neitzer at gmail.com (Guido Neitzer) Date: Thu Apr 17 14:33:05 2008 Subject: I need help with D2W templates In-Reply-To: References: Message-ID: Okay, I don't recall what they are doing in that tutorial but freezing a component is about the worst thing you can do when you want the power of D2W. You loose all the advantages you get from the dynamic page building. I actually never used any frozen components in my app, so I can't really comment on that. But still, you should be possible to just swap out that component with your own subclass. cug On Thu, Apr 17, 2008 at 11:37 AM, Daniel Mejia wrote: > Guido, > > I'm following the documentation to modify the embeddable components that is > explaned in the "WebObjects Direct to Web Guide" where they freeze the > template to modify one of the embedabble components, in the guide example > they modify the list to create a editable table, but the action is coded > inside the template code and in my case that additional method should be > binded to an external method as similar as is binded the "action" method to > the return action. > > Regards, > > Daniel. > > > > On Apr 17, 2008, at 11:39 AM, Guido Neitzer wrote: > > On Thu, Apr 17, 2008 at 9:40 AM, Daniel Mejia wrote: > > > I need some help to know how to modify the D2WSelect template to add an > hyperlink and bind the action to a method define in the external component > that contains the D2WSelect component. > > Do I miss something or why can't you subclass D2WSelect, implement > your own HTML / additional Java and write a rule that is similar to: > > task = "edit" and entity.name = "MyObject" and propertyKey = > "property" => componentName = "MyD2WSelect" [100] > > ? No need for freezing anything. > > cug > From mejiad at evol-tech.com Thu Apr 17 17:12:16 2008 From: mejiad at evol-tech.com (Daniel Mejia) Date: Thu Apr 17 17:12:21 2008 Subject: I need help with D2W templates In-Reply-To: References: Message-ID: <12DD3490-FA36-45F7-919B-6AD015044B1D@evol-tech.com> Guido, I totally agree with you about the lost of the D2W advantages if you freeze some component, but in my case I'm not freezing any component, I'm freezing the template that is used to create the dynamic component. In this case you can keep the D2W advantages and modify the template (and the associated java code) to expand the functionality of the embeddable components (D2WSelect, D2WList, D2WEdit, D2WQuery and D2WInspect) with any lost in functionality or in flexibility to use the rule system to modify the resultant component created by D2W using your the modified template. Regards, Daniel. On Apr 17, 2008, at 4:32 PM, Guido Neitzer wrote: > Okay, I don't recall what they are doing in that tutorial but freezing > a component is about the worst thing you can do when you want the > power of D2W. You loose all the advantages you get from the dynamic > page building. > > I actually never used any frozen components in my app, so I can't > really comment on that. But still, you should be possible to just swap > out that component with your own subclass. > > cug > > On Thu, Apr 17, 2008 at 11:37 AM, Daniel Mejia tech.com> wrote: >> Guido, >> >> I'm following the documentation to modify the embeddable >> components that is >> explaned in the "WebObjects Direct to Web Guide" where they freeze >> the >> template to modify one of the embedabble components, in the guide >> example >> they modify the list to create a editable table, but the action is >> coded >> inside the template code and in my case that additional method >> should be >> binded to an external method as similar as is binded the "action" >> method to >> the return action. >> >> Regards, >> >> Daniel. >> >> >> >> On Apr 17, 2008, at 11:39 AM, Guido Neitzer wrote: >> >> On Thu, Apr 17, 2008 at 9:40 AM, Daniel Mejia > tech.com> wrote: >> >> >> I need some help to know how to modify the D2WSelect template to >> add an >> hyperlink and bind the action to a method define in the external >> component >> that contains the D2WSelect component. >> >> Do I miss something or why can't you subclass D2WSelect, implement >> your own HTML / additional Java and write a rule that is similar to: >> >> task = "edit" and entity.name = "MyObject" and propertyKey = >> "property" => componentName = "MyD2WSelect" [100] >> >> ? No need for freezing anything. >> >> cug >> From kevo at gatorgraphics.com Sun Apr 20 16:55:06 2008 From: kevo at gatorgraphics.com (Kevin Windham) Date: Sun Apr 20 17:22:20 2008 Subject: Using Eclipse to build for install Message-ID: I have my app all sorted under Eclipse now, and everything seems spiffy. It took me a little while to figure out but after some searching I discovered the Ant Install in the contextual menu. It seems though, that the build script, or perhaps the one that found it's way into my project, doesn't account for the permissions of the / Library/WebObjects/Application directory and can't actually write the finished product there. I also can't seem to find any documentation on this process. Under XCode you could just run the build script from the command line with sudo. Is there a similar procedure for this with WOLips, or is something not right with my install/build script. Thanks, Kevin P.S. Any links to docs on WOLips would be greatly appreciated. I still feel pretty much lost in the new environment. From kevo at gatorgraphics.com Sun Apr 20 22:09:30 2008 From: kevo at gatorgraphics.com (Kevin Windham) Date: Sun Apr 20 22:09:40 2008 Subject: Using Eclipse to build for install In-Reply-To: References: Message-ID: <69AB8A35-F237-496F-8FCD-B8753CC30B7F@gatorgraphics.com> On Apr 20, 2008, at 6:55 PM, Kevin Windham wrote: > I have my app all sorted under Eclipse now, and everything seems > spiffy. It took me a little while to figure out but after some > searching I discovered the Ant Install in the contextual menu. It > seems though, that the build script, or perhaps the one that found > it's way into my project, doesn't account for the permissions of > the /Library/WebObjects/Application directory and can't actually > write the finished product there. I also can't seem to find any > documentation on this process. > > Under XCode you could just run the build script from the command > line with sudo. Is there a similar procedure for this with WOLips, > or is something not right with my install/build script. > > Thanks, > Kevin > > P.S. Any links to docs on WOLips would be greatly appreciated. I > still feel pretty much lost in the new environment. It took me a while, but I finally found what I was looking for. Basically, the default ant install will only work if you fiddle with the permissions since it tries to install directly into the /Library/ WebObjects/Application directory. You can do an ant build on the build.xml file in the project and that will install into a dist directory inside the project's directory in your workspace. Is it just me, or is google becoming less and less helpful. Maybe my search mojo is weak, or maybe WebObjects is becoming more popular and there are just too many other entries crowding the results. :-) Kevin From muc154 at yahoo.com Thu Apr 24 13:45:59 2008 From: muc154 at yahoo.com (psuengr2007) Date: Thu Apr 24 13:46:02 2008 Subject: adding alt tag on WOActiveImage in WebObjects Message-ID: <16852567.post@talk.nabble.com> Hi everyone, OK, I'm struggling with this problem for a few weeks now, and it looks like it is simple but I have not been able to find a solution yet. I have a WOActiveImage on my page and I want to make this image Accessible to people with disabilities - therefore, I want to add a description to this image (an alt tag) so they can read what the image is about even if they don't see it. So I thought the solution to this would be an alt tag, however, this is not working for me, because looks like when I add the alt tag, the image is not accessible anymore. Does anyone have a solution to this problem? Please help. Thanks in advance -- View this message in context: http://www.nabble.com/adding-alt-tag-on-WOActiveImage-in-WebObjects-tp16852567p16852567.html Sent from the WebObjects-Dev mailing list archive at Nabble.com. From chill at global-village.net Fri Apr 25 10:01:50 2008 From: chill at global-village.net (Chuck Hill) Date: Fri Apr 25 10:01:53 2008 Subject: adding alt tag on WOActiveImage in WebObjects In-Reply-To: <16852567.post@talk.nabble.com> References: <16852567.post@talk.nabble.com> Message-ID: <5DF4BDB0-704C-4345-A5EF-81AA2C2BEBB3@global-village.net> On Apr 24, 2008, at 1:45 PM, psuengr2007 wrote: > > Hi everyone, > > OK, I'm struggling with this problem for a few weeks now, and it > looks like > it is simple but I have not been able to find a solution yet. > > I have a WOActiveImage on my page and I want to make this image > Accessible > to people with disabilities - therefore, I want to add a description > to this > image (an alt tag) so they can read what the image is about even if > they > don't see it. So I thought the solution to this would be an alt tag, > however, this is not working for me, because looks like when I add > the alt > tag, the image is not accessible anymore. Does anyone have a > solution to > this problem? Please help. What does the generated html in the page source look like when you add the alt tag? Chuck -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects