• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Next Hurdle.....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Next Hurdle.....


  • Subject: Re: Next Hurdle.....
  • From: Jeffrey Pearson <email@hidden>
  • Date: Mon, 3 Apr 2006 14:03:30 -0700

OK. I was kind of avoiding trying to learn EOModeller at the same time but it looks like I am shooting myself in the head by doing this.

I DO at least have a beginner familiarity with EOModeller after going through the intro book.

So I created my EO Model and saved it in my xcode project directory.

I have added the model to my project by adding existing file and selecting it. It is now in my Web Components Group. I actually had it in the root of my project folder but it wasn't showing up. Once I moved the file into my Web Components group, WOBuilder recognized and added it to my keys. It shows up as publishersDisplayGroup.

So now I added a WOString to my page to display the number of rows in the database. I bound it to publishersDisplayGroup.displayedObjects.@count. It comes back as the number zero. I also tried binding it to publishersDisplayGroup.allObjects.@count. It STILL comes back as the number zero. I know for a fact there are 94 rows in that table. If I go back to EOModeller, it DOES show the rows. I know I am probably binding to the wrong thing. What do I bind it to? I am working from the WebObjects for Windows Developers book still...chapter 3 with the movie database example. Is there a better book I should be using?





On Apr 2, 2006, at 3:18 PM, Ken Anderson wrote:

Jeffrey, are you using EOF to fetch your data? Sounds like you might be doing a lot of work you don't have to. If you have an entity defined for the table in your database, you should just be able to fetch the objects, and never instantiate any array (it would be returned from EOF).

Ken

On Apr 2, 2006, at 5:16 PM, Jeffrey Pearson wrote:

Thanks to all of you, I have gotten quite far in my app. Thank you again all of you.

OK. Next hurdle.

My existing jsp app pulls data from a MySQL database and populates an ArrayList of those objects. I figured out from the WebObjects for Windows Developers docs that I needed to change the object to NSMutableArray. So I added the NSMutableArray to my page object. In the page constructor, I called the method to create the Array. ie:


public class Publishers extends WOComponent {

	protected NSMutableArray allPublishers;

    /** @TypeInfo Publishers */

    public Publishers(WOContext context) {
        super(context);
		PublisherFunctions pf = new com.metrohero.web.PublisherFunctions();
		allPublishers = pf.getAllPublishers();

    }

}

I see the allPublishers in WOBuilder. I can even bind a string to allPublishers.count. Now how to I get to the last part of binding a table to the array of objects?


Any help is greatly appreciated again.


Jeff Pearson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Next Hurdle.....
      • From: David Holt <email@hidden>
    • Re: Next Hurdle.....
      • From: Paul Lynch <email@hidden>
References: 
 >Next Hurdle..... (From: Jeffrey Pearson <email@hidden>)
 >Re: Next Hurdle..... (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: Getting back into WebObjects, problems
  • Next by Date: Re: Next Hurdle.....
  • Previous by thread: Re: Next Hurdle.....
  • Next by thread: Re: Next Hurdle.....
  • Index(es):
    • Date
    • Thread