Re: Re: WOPopUpButton
Lawrence Kendall <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.newbies |
|---|---|
| Message-ID | <[email protected]> |
ok, ok.... I'm sorry, was just trying to help. I misinterpreted your "...I may as well just add a field to the product description table..." as "...I may as well just add a simple text field to the product description table and have them enter a string to search for...". "You" won't be doing a caseInsensitiveLike but every time you qualifyDataSource "it" will do one on every record. Regardless of whether you are searching for "Retail" or "retail" it will still do a caseInsensitiveLike to find them. That is what I meant. All I am saying is that searches based on strings are not as efficient as searches based on an object relationship. Anyways, I think you have enough information to go on with it how ever you like. Good Luck. On 11/02/2005, at 10:25 AM, Adam Rice wrote: Look, I don’t mean to be rude, but.... If you had read the subject you would know that the topic at hand involves a WOPopUpButton which means the user DOESN’T TYPE ANYTHING. I’m the newbie and even I know that. Of course, if I didn’t mean to be rude I would have re-worded my sentences. Not to say that I’m not looking at creating a new table but I think it is rather ridiculous to say that I would need to do a caseInsensitivelike search every time when I am setting the searchable items. If I had written “Retail” in my database and the user chose “Retail” in the popup menu the search would look for “Retail”... There is no chance that it would be searching for “retail”. I’ll file a request to add a new table to the database and see how it goes. On 11/2/05 12:24 AM, "Lawrence Kendall" <[email protected]> wrote: Look, I don't mean to be rude, but..... that is a dumb idea. If you just add a text field with your EDU stuff in it (forgetting that you would need two text fields to accommodate your original requirement for EDU and Education) then every time you do a search it will have to do a caseInsensitiveLike on each of the strings... If your product DB gets big then your searches will be slow. If you add the entity and a relationship to it then you can compare objects directly, this will yield much faster search times. Also, if you use the relationship you will simply have to use a pop up to select whatever price type you need for each product. If you end up just adding those text fields then you will need to type it in EVERY TIME which will make your data entry slower. Unnecessarily slow data entry + slow search times = application that needs improvement. Even if I didn't want the short and long names for this task, I would still create the entity and use the displayGroup. In fact, I do the same thing in a lot of my apps for Brand, ie I have a Product and it belongs to a Brand. My Brand entity has an ID and a name field, that's it. But using this data structure I can quickly find all products from this brand (and, most importantly, when I add a new product I don't have to type the brand name again). Another thing, how do you plan to present this to the user? If you give them a text field and say "please type Education or Retail or Wholesale or Ex Tax....." then you just know they will type "All" and won't get any results at all. Do you think that is a good user interface (UI)? No! Whenever you want a user to select one of a few options, make it as simple as you possibly can for them to pick the right one (or at least one that you are expecting them to pick). I don't mean to sound like I am ranting at you but I can just see that you are about to make a big mistake, one that you will soon have to go back and fix anyway. Do it right the first time and let your boss think you are a genius (and make sure he/she remembers it when the pay negotiations come round!!!). Trust me when I say that the best way to do this is to bite the bullet and add the entity and the relationship. It'll take you five minutes and you'll be rapt with the result. You will thank me later. Larry. Thanks for your help, I was hoping I could do it without having to get authorisation to change the database. I figure if I have to make changes to the database I may as well just add a field to the product description table and search on that field. --- In [email protected], Lawrence Kendall <lawrence@a...> wrote: > No Problem.... > > Yes.... I would have another table in the database. I assume you are > using EOModel?? In EOModel, add a new entity and enter the field names > I described before. In your database (DB) add your table and the > fields. > > Once you have added this table, add the priceTypeID field to the > product entity and make a relationship between them. Make sure you > also add the priceTypeID to the Product table in the DB. > > Once you have entered your data in the DB (EDU - Education etc) then > just hook it up. All Good!! ;) > > I can send you some screen grabs if you need extra help. Let me know > how you go. > > Cheers then, > > Larry. Yahoo! Groups Sponsor ADVERTISEMENT document.write(' <http://us.ard.yahoo.com/SIG=1298f9rqa/ M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/ EXP=1108131881/A=2532114/R=1/SIG=12kdnrhaq/*http://clk.atdmt.com/NFX/ go/yhxxxnfx0020000014nfx/direct/01/&time=1108045481239942> '); <http://us.ard.yahoo.com/SIG=1298f9rqa/ M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/ EXP=1108131881/A=2532114/R=2/SIG=12kdnrhaq/*http://clk.atdmt.com/NFX/ go/yhxxxnfx0020000014nfx/direct/01/&time=1108045481239942> Yahoo! Groups Links • To visit your group on the web, go to: • http://groups.yahoo.com/group/webobjects-newbies/ • • To unsubscribe from this group, send an email to: • [email protected] <mailto:[email protected]? subject=Unsubscribe> • • Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . Yahoo! Groups Sponsor ADVERTISEMENT <l.gif> Yahoo! Groups Links • To visit your group on the web, go to: http://groups.yahoo.com/group/webobjects-newbies/ • To unsubscribe from this group, send an email to: [email protected] • Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ------------------------------------ Lawrence Kendall WebDesigner/Programmer Automaton 35 Little Victoria Street Fitzroy VIC 3065 P: +61 3 8415 0007 M: 0400 00 11 03 E: [email protected] W: www.automaton.com.au ------------------------------------ Every 10 seconds, somewhere on this Earth, there is a woman giving birth to a child. She must be found and stopped! Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/webobjects-newbies/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/