Re: Basic EOModeler / WebObject tutorial ( newbie )
Re: Basic EOModeler / WebObject tutorial ( newbie )
- Subject: Re: Basic EOModeler / WebObject tutorial ( newbie )
- From: Art Isbell <email@hidden>
- Date: Wed, 19 Feb 2003 10:39:43 -1000
On Wednesday, February 19, 2003, at 08:29 AM, Alvaro Muir wrote:
Sorry for the newbie question. Can someone point me to a simple
tutorial
on displaying a query with WebObjects ? I don9t want to make any
database
modifications, just run sql queries. The Direct2Web is way overkill
for what
I need.
Direct2Web is about as simple as it gets since no Java code, only an
eomodel, is required.
Without Direct2Web, you'd need to build your UI to include a way to
enter qualifying criteria for each attribute. Probably the easiest
approach would be to bind these UI elements to keys in a
NSMutableDictionary in your component named "bindings". E.g., for an
attribute named "foo", the UI element would be bound to "bindings.foo".
You could create a fetch specification in your eomodel that would take
this bindings dictionary. E.g., one clause of the fetch spec would be
specified as "foo = $foo", in which "$foo" would resolve to the value
in bindings.foo. Then in your query action method, you would invoke
EOUtilities.objectsWithFetchSpecificationAndBindings() and display the
fetched array in a WORepetition.
I realize that this high-level description doesn't substitute for an
example, but this sort of thing is what many of us use Direct2Web for.
Its just one table in a database with about 6 columns. But im not
sure how to get that going with WOBuilder.
EOModeler supports running queries in its Browse Data window. You
just specify the "where" clause qualifiers and fetch. It supports
sorting on the left-most column as well. Just drag the column that you
want to sort on all the way to the left and click one of the sort icons
in the lower right corner of the window.
Art
http://homepage.mac.com/aisbell/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.