You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nicklas Karlsson <ni...@ra.abo.fi> on 2003/09/07 16:25:39 UTC

Some general n00b-questions

Hello,

	I have some general TDK questions, I have downloaded the TDK, 
installed it, run it and twiddled around with it and everything seems 
fine. I read through most of the Velocity/Turbine/Torque and searched the 
mailing lists but some questions remained open to me

	1. Could someone give me a brief overview of the files in the 
newapp conf-directory and explain the precedence of these files and the 
ancillary/ and so forth files, which are just templates and which are 
actually used?

	2. Turbine seems quite singletoneish, if used for J2EE 
applications, where would be a logical place to put a handle to a service 
location or EBJ remote handle? Or should it just be poked into the 
session?

	3. What would be the most clean way in Velocity to implement 
interfaces with different modes, e.g. view and edit mode. If-else on every 
mode and macro as much as possible?

	4. Is there OJB support planned for Turbine? If not, is it 
difficult to plug on somewhere in the middle of the current object model?

	5. Is there a clean way in Velocity to name and fetch from the 
request values for multi-row-entities?

Thanks for your time,

	Nik

-- 
---
Nicklas "Nik" Karlsson, Murkiogatan 3 B 29 20740 Åbo, 040 9000 724
nickarls@abo.fi ::: http://www.abo.fi/~nickarls ::: Nik@ircnet

"If a man speaks in the forest and there is no woman around to hear him -
 Is he still wrong?"


RE: Some general n00b-questions

Posted by David Wynter <da...@roamware.co.uk>.
Hi,

For no. 5 I think he means swhre you have amny entities to choose from on
screen. I use a pull tool called entitylist.

e.g.

At top of your.vm file

## Get the collection of existing databases, and
## make the first database selected, if no database
## has already been selected
#set ( $databases = $entitylist.getAllDatabases() )
#if (!$selectedDatabase && ($databases.size()>0) )
	#set ( $selectedDatabase = $databases.get(0) )
#end
#set ( $selectedDatabaseId = $selectedDatabase.getRwDatabaseId() )

then in the form

....

		<tr>
			#rwLabelCell ("Database list")
			<td width="$ui.screenWidgetWidth" >
					<select name="selectedDatabaseName"
onChange="fireSelectionType(this.form, &quot;database&quot;)">
						#foreach ($database in $databases)
							#if ($database.getRwDatabaseId() == $selectedDatabaseId)
								<option selected>$database.getDatabaseName()</option>
							#else
								<option>$database.getDatabaseName()</option>
							#end
						#end
					</select>
			</td>
		</tr>

....

Hope it helps

David

> -----Original Message-----
> From: Eric Emminger [mailto:eric@ericemminger.com]
> Sent: 09 September 2003 20:05
> To: Turbine Users List; nickarls@ra.abo.fi
> Subject: Re: Some general n00b-questions
>
>
> Nik
>
> I'll try a few.
>
> Nicklas Karlsson wrote:
> > Hello,
> >
> > 	I have some general TDK questions, I have downloaded the TDK,
> > installed it, run it and twiddled around with it and everything seems
> > fine. I read through most of the Velocity/Turbine/Torque and
> searched the
> > mailing lists but some questions remained open to me
> >
> > 	1. Could someone give me a brief overview of the files in the
> > newapp conf-directory and explain the precedence of these files and the
> > ancillary/ and so forth files, which are just templates and which are
> > actually used?
>
> Where? WEB-INF/conf?
>
> > 	2. Turbine seems quite singletoneish, if used for J2EE
> > applications, where would be a logical place to put a handle to
> a service
> > location or EBJ remote handle? Or should it just be poked into the
> > session?
> >
> > 	3. What would be the most clean way in Velocity to implement
> > interfaces with different modes, e.g. view and edit mode.
> If-else on every
> > mode and macro as much as possible?
>
> Hmm. This may be personal preference. You could do if-else blocks, or
> use separate pages. I usually use the latter to keep it clean.
>
> > 	4. Is there OJB support planned for Turbine? If not, is it
> > difficult to plug on somewhere in the middle of the current
> object model?
>
> I don't use it, but I hear Torque can work with OJB; you should probably
> ask on the Torque user list.
>
> >
> > 	5. Is there a clean way in Velocity to name and fetch from the
> > request values for multi-row-entities?
>
> What?
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


Re: Some general n00b-questions

Posted by Eric Emminger <er...@ericemminger.com>.
Nik

I'll try a few.

Nicklas Karlsson wrote:
> Hello,
> 
> 	I have some general TDK questions, I have downloaded the TDK, 
> installed it, run it and twiddled around with it and everything seems 
> fine. I read through most of the Velocity/Turbine/Torque and searched the 
> mailing lists but some questions remained open to me
> 
> 	1. Could someone give me a brief overview of the files in the 
> newapp conf-directory and explain the precedence of these files and the 
> ancillary/ and so forth files, which are just templates and which are 
> actually used?

Where? WEB-INF/conf?

> 	2. Turbine seems quite singletoneish, if used for J2EE 
> applications, where would be a logical place to put a handle to a service 
> location or EBJ remote handle? Or should it just be poked into the 
> session?
> 
> 	3. What would be the most clean way in Velocity to implement 
> interfaces with different modes, e.g. view and edit mode. If-else on every 
> mode and macro as much as possible?

Hmm. This may be personal preference. You could do if-else blocks, or 
use separate pages. I usually use the latter to keep it clean.

> 	4. Is there OJB support planned for Turbine? If not, is it 
> difficult to plug on somewhere in the middle of the current object model?

I don't use it, but I hear Torque can work with OJB; you should probably 
ask on the Torque user list.

> 
> 	5. Is there a clean way in Velocity to name and fetch from the 
> request values for multi-row-entities?

What?

Eric