Fwd: D2WQuery embedded loses state
-- Forwarded message -- From: Mark Wardle m...@wardle.org Date: Sunday, November 8, 2009 Subject: D2WQuery embedded loses state To: Mark Wardle m...@wardle.org Cc: Ramsey Lee Gurley rgur...@mac.com What action binding? The one on the button? The one on the D2WQuery? What is your cancel button bound to? I originally bound the d2w to displaygroup.filter and changing to this an action within the customised list page didn't help. Sorry this makes no sense I've bound the embedded d2wquery action binding to the list's displaygroup.fetch. Mark -- Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK -- Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK ___ Do not 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: D2WQuery embedded loses state
Ok. In my subclass of ERD2WQueryPage (actually ERNEUQueryPage), I've overridden the method: @Override public boolean showResults() { if (showResults==null) { showResults = ERXValueUtilities.booleanValue(d2wContext().valueForKey(showResults)); } return showResults; } So that on startup, the querypage will potentially show results if showResults rule is true. This will only work if showListInSamePage is also true. Not sure if this will help anyone else? Best wishes, Mark 2009/11/8 Mark Wardle m...@wardle.org: -- Forwarded message -- From: Mark Wardle m...@wardle.org Date: Sunday, November 8, 2009 Subject: D2WQuery embedded loses state To: Mark Wardle m...@wardle.org Cc: Ramsey Lee Gurley rgur...@mac.com What action binding? The one on the button? The one on the D2WQuery? What is your cancel button bound to? I originally bound the d2w to displaygroup.filter and changing to this an action within the customised list page didn't help. Sorry this makes no sense I've bound the embedded d2wquery action binding to the list's displaygroup.fetch. Mark -- Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK -- Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK -- Dr. Mark Wardle Specialist registrar, Neurology Cardiff, UK ___ Do not 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: D2WQuery embedded loses state
On Nov 8, 2009, at 2:17 AM, Mark Wardle wrote: Hi Ramsey. Thank you for your help here. I think the best thing I did was to create my own look as it's forced me to spend time reading the source code and wod files to try and work out why stuff happens! Some is *still* magic but I'm starting to see the hands moving under the table now! That's how I learned it. On Sunday, November 8, 2009, Ramsey Lee Gurley rgur...@mac.wrote: On Nov 7, 2009, at 4:58 PM, Mark Wardle wrote: Hi all. This may be a stupid question... I've embedded a D2WQuery within a ListPage. It acts as a filter for the list; in fact I use ERDQueryAnyKey exclusively to allow a google-like search of the listed entities. Thank you to all who helped me make the mental leap to D2W - I don't think I'm quite there *yet* - and getting me this far It's actually working quite well BUT! If I type text and click submit, then the list (displaygroup) is filtered appropriately. However, the text is cleared from the textfield. I wish to visually indicate that a filter is applied - I assumed the text would remain within the textfield for the query, but this is not the case. I'm guessing when you reload your page, you're loading a fresh embedded query page which loads a fresh ERDQueryAnyKey which wipes out your entered value. ERDQueryAnyKey is not stateless so I think it should be storing the value. In addition, every time I click submit, I get a wholly new page, even though I've bound the action binding to a method that returns null. Therefore, my list page Back button (Cancel) no longer returns to the calling page but to the previous search. What action binding? The one on the button? The one on the D2WQuery? What is your cancel button bound to? I originally bound the d2w to displaygroup.filter and changing to this an action within the customised list page didn't help. The cancel button is set to the nextpage which becomes the last search page instead of my main landing page. presumably this is because somehow a new list page is being generated? I hadn't expected that. The action binding of a D2WQuery ends up as the nextPage() of the embedded query page. If that is where you see the cancel button, then that is probably the reason you're going back to the previous search instead of the back page you expected. As always, I'm in danger of being too specific and asking the wrong questions! You'll need to be more specific (^_^) ha! But the danger is one misses the wo way! 1. Is there any way of getting a D2WQuery to maintain input state after submission? If you use the showListInSamePage, and set up a specific page configuration for this, it should work with no additional effort. No? You would just have your list embedded in your query instead of your query embedded in your list. I did try that originally but I would like to have a list displayed immediately for users. I don't wish to force a query. Sounds perfectly reasonable. Maybe I should look at a way of showing all objects in an embedded d2wlist before a query is set? I suppose there are two alternatives. Copy the methods used in the filter button and try to do the same with Ajax. Otherwise, forego the emedded filter idea and simply use the filter button as is. Ajax? Feature creep? (^_^) Anyway, it depends on how you bind it. If you store something in a component's local var, then you're subject to that var being wiped out with a reload. If you store the value in a place you can find it outside of the component (On the displayGroup or something) then you can reload it from that known place, even if your component is stateless. I think this is more of a WO question than a D2W one though. I thought of that. AFAICS, I couldn't persist input state as there wasn't a public binding for the input state. So you write a replacement (^_^) That component appears to be a property level component and you need something very similar, but a page level component. So, starting with ERDQueryAnyKey as an example, create a new one. 2. Is it possible to pass the cancelAction to the *next* page, or somehow keep the same list page instance? 3. Am I still making things overly complicated? Should I use an aboveDisplayPropertyKey and use an embedded component there rather than customising my list page? Won't work without modification, because aboveDisplayPropertyKeys in ERNeu doesn't give you a displayGroup or dataSource binding to filter against. You only get your property keys and d2wContext there. Given what you want to do, I think I would still go with the filter field in the batch navigation bar rather than an entire embedded query page. I think you are right. Thank you Mark Ok, so let's do it. Starting with the ERNeu list page template (Since I can't see your code) change the FilterDisplayGroupButton bindings to FilterDisplayGroupButton: WOSwitchComponent { WOComponentName =
Re: Installing WO 543 on Linux
I recall having to adjust the make file in too locations, force the gcc somewhere else. But Pascal is correct in that there are also prebuilt one's available. I'm thinking I should reconsider packaging though and perhaps remake my RPMs available at some point. On Sat, Nov 7, 2009 at 11:59 AM, David Griffith da...@infinityspain.com wrote: Hi Joe, Yes I have already done that. I did manage to get it to complete the 'make' command by running it from the Adaptor directory and not from the Apache2.2 directory (it wouldn't run from there) but I think I am perhaps missing some settings in the make.config. Firstly, should the make.config be copied into the Apache2.2 directory to allow it to run from there? Then, even though it doesn't specifically say in the instructions I was following below, I think I need to tell the make.config where my apache modules are but I'm having trouble determining that path. I'm using CentOS 5.4 with the bundled Apache 2.2.3. The only place I can seem to locate mod_WebObjects.la, which it clearly is looking for, is in the following directory after installing WO 5.4.3: /opt/Library/WebObjects/Adaptors/Apache2.2/.libs/mod_WebObjects.la Is this the directory it's looking for, or rather is that the appropriate file to use? Regards, David. On Nov 7, 2009, at 4:22 PM, Joe Little wrote: On Sat, Nov 7, 2009 at 2:00 AM, David Griffith da...@infinityspain.com wrote: Sorry, I found apxs but this is the error I'm getting: apxs -i -a -n WebObjects mod_WebObjects.la /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/apr-1/build/libtool' mod_WebObjects.la /usr/lib/httpd/modules /usr/lib/apr-1/build/libtool --mode=install cp mod_WebObjects.la /usr/lib/httpd/modules/ libtool: install: `mod_WebObjects.la' is not a valid libtool archive Try `libtool --help --mode=install' for more information. apxs:Error: Command failed with rc=65536 You need to force the CC var to be CC=gcc http://wiki.objectstyle.org/confluence/pages/viewpage.action?pageId=196936navigatingVersions=true On Nov 7, 2009, at 10:35 AM, David Griffith wrote: Hi all, Following the instructions at: http://wiki.objectstyle.org/confluence/display/WO/Installing+WO+5.3+or+WO+5.4+on+Linux Building the Apache WO Module, I'm running into this problem: /usr/local/apache/bin/apxs -i -a -n WebObjects mod_WebObjects.la I get: -bash: /usr/local/apache/bin/apxs: No such file or directory I have gcc installed but I can't figure out what I should install to be able to use apxs. I have Apache 2.2.3 installed and working. Is it just a matter of finding and downloading and installing apache2-threaded-dev for that version of Apache? Anyone know where I can find that installer? Regards, David. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/david%40infinityspain.com This email sent to da...@infinityspain.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/jmlittle%40gmail.com This email sent to jmlit...@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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: D2WQuery embedded loses state
Ramsey: Thank you. It is very satisfying deleting my old custom components, although there's a steep learning curve here. I don't think it helps that I've started by rewriting user management using d2w instead of regular WO. It needs special handling to deal with users editing their own information (but avoiding privilege escalation), uploading photos and changing passwords. Once I crack all of that then perhaps the rest will be easier... maybe Again, thank you for your help. I'm starting to see things a bit more clearly [*]. Best wishes, Mark [*] : this may be an overstatement 2009/11/8 Ramsey Lee Gurley rgur...@mac.com: On Nov 8, 2009, at 2:17 AM, Mark Wardle wrote: Hi Ramsey. Thank you for your help here. I think the best thing I did was to create my own look as it's forced me to spend time reading the source code and wod files to try and work out why stuff happens! Some is *still* magic but I'm starting to see the hands moving under the table now! That's how I learned it. On Sunday, November 8, 2009, Ramsey Lee Gurley rgur...@mac.wrote: On Nov 7, 2009, at 4:58 PM, Mark Wardle wrote: Hi all. This may be a stupid question... I've embedded a D2WQuery within a ListPage. It acts as a filter for the list; in fact I use ERDQueryAnyKey exclusively to allow a google-like search of the listed entities. Thank you to all who helped me make the mental leap to D2W - I don't think I'm quite there *yet* - and getting me this far It's actually working quite well BUT! If I type text and click submit, then the list (displaygroup) is filtered appropriately. However, the text is cleared from the textfield. I wish to visually indicate that a filter is applied - I assumed the text would remain within the textfield for the query, but this is not the case. I'm guessing when you reload your page, you're loading a fresh embedded query page which loads a fresh ERDQueryAnyKey which wipes out your entered value. ERDQueryAnyKey is not stateless so I think it should be storing the value. In addition, every time I click submit, I get a wholly new page, even though I've bound the action binding to a method that returns null. Therefore, my list page Back button (Cancel) no longer returns to the calling page but to the previous search. What action binding? The one on the button? The one on the D2WQuery? What is your cancel button bound to? I originally bound the d2w to displaygroup.filter and changing to this an action within the customised list page didn't help. The cancel button is set to the nextpage which becomes the last search page instead of my main landing page. presumably this is because somehow a new list page is being generated? I hadn't expected that. The action binding of a D2WQuery ends up as the nextPage() of the embedded query page. If that is where you see the cancel button, then that is probably the reason you're going back to the previous search instead of the back page you expected. As always, I'm in danger of being too specific and asking the wrong questions! You'll need to be more specific (^_^) ha! But the danger is one misses the wo way! 1. Is there any way of getting a D2WQuery to maintain input state after submission? If you use the showListInSamePage, and set up a specific page configuration for this, it should work with no additional effort. No? You would just have your list embedded in your query instead of your query embedded in your list. I did try that originally but I would like to have a list displayed immediately for users. I don't wish to force a query. Sounds perfectly reasonable. Maybe I should look at a way of showing all objects in an embedded d2wlist before a query is set? I suppose there are two alternatives. Copy the methods used in the filter button and try to do the same with Ajax. Otherwise, forego the emedded filter idea and simply use the filter button as is. Ajax? Feature creep? (^_^) Anyway, it depends on how you bind it. If you store something in a component's local var, then you're subject to that var being wiped out with a reload. If you store the value in a place you can find it outside of the component (On the displayGroup or something) then you can reload it from that known place, even if your component is stateless. I think this is more of a WO question than a D2W one though. I thought of that. AFAICS, I couldn't persist input state as there wasn't a public binding for the input state. So you write a replacement (^_^) That component appears to be a property level component and you need something very similar, but a page level component. So, starting with ERDQueryAnyKey as an example, create a new one. 2. Is it possible to pass the cancelAction to the *next* page, or somehow keep the same list page instance? 3. Am I still making things overly complicated? Should I use an aboveDisplayPropertyKey and use an embedded component there