You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Albrecht F.Leiprecht" <al...@mail.ccc-casino.com> on 2001/03/10 16:19:54 UTC

Newbee Question: Peers in Turbine

Hi all, I'm new to this Subject, and I don't really understand
the full potential yet. I also only start to understand what Turbine
is, and what Velocity is. So if this Posting is misplaced here, let
me know discretly :)

However, I am making progress, I can pass Values between my
JavaClasses (screen & navigation) and the templates, using the
Context, meanwhile.

I've started creating my own projectschema, and by looking at the
example app (forum) I got even more confused...
I don't fully understand the meaning of the peers, I understand, that
this is the easiest way to access tables which are not going  to be
changed from inside the application (like a navigationtable) to provide
the Data for my velocity template,and  I understand, I have to put
something in the context to make the template know about it

TableName foo

The build tool created the classes for it.
  FooMapBuilder, BaseFooPeer, BaseFoo (and so on)

Now, in my VelocityScreen, I have a line like this...

Foo myFoo = new Foo(),

if I put it in the context, can I do something like this ?

$myFoo.getBar( 3 )

or even

#foreach  ($myFoo.Bar in $myFoo)
    [..]
#end

or do I need to extend the Class Foo (and put the Information in the
context in my ScreenClass) to make use of the database ?

I know this might sound stupid to you but...

I was looking at the example ("Using the Context Object with Base/Peer OM)
in the Velocity Context HowTo on the Turbine Site. The equivalent for
$myFoo.getBar() can be found there. But how did the template tell the OM
that it wanted exactly that Book. What if I wanted to print out the Name of
Books of the Author "Greg Egan"...

If one of you can enlighten me, because it seems, I am fishing in pretty
dark water here :)

kind regards

Albrecht F. Leiprecht

PS:
if any machine info needed :)

tdk 1a11
mysql (latest stable) (to remote DB-Server)
blackdown jvm 1.2.2
Suse 7.0 (slightly modified) on x86 machine


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Newbee Question: Peers in Turbine

Posted by "Albrecht F.Leiprecht" <al...@mail.ccc-casino.com>.
> If one of you can enlighten me, because it seems, I am fishing in pretty
> dark water here :)

The water is brighter now since I discovered the Criteria Object 

kind regards
Albrecht F. Leiprecht


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org