You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Reinier (Linux 2.2.12)" <re...@clabo.co.za> on 2003/03/13 22:52:29 UTC

PropertySelection woes

Hi all,

I'm trying to use a PropertySelection to allow a user to pick one item
from a list.  The contents of the list comes from a database.  I would
like to use the Object ID (primary key or row ID) from the database as
the value returned when I pick a certain string, instead of just a
simple int.

Is there an easy way to do that, or do I have to create my own
SelectionModel so that I can specify the value connected to each string
that I add to the PropertySelection?

Thanx in advance
reinier




RE: PropertySelection woes

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
The Vlib is a demo that deploys into JBoss.

However, you can cut-n-paste the entity selection model into your own code.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Reinier (Linux 2.2.12) [mailto:rendier@clabo.co.za] 
> Sent: Saturday, March 15, 2003 3:04 AM
> To: Tapestry users
> Subject: Re: PropertySelection woes
> 
> 
> Thanks for this - just to confirm: I've been using Tomcat to 
> play around so far.  To use Vlib, it seems that I have to use 
> JBoss - is this right?  Or can I just change my vist class 
> and engine to the vlib ones and go?
> 
> Thanx
> reinier
> 
> On Fri, 2003-03-14 at 02:27, Travis McCauley wrote:
> >


Re: PropertySelection woes

Posted by "Reinier (Linux 2.2.12)" <re...@clabo.co.za>.
Thanks for this - just to confirm: I've been using Tomcat to play around
so far.  To use Vlib, it seems that I have to use JBoss - is this
right?  Or can I just change my vist class and engine to the vlib ones
and go?

Thanx
reinier

On Fri, 2003-03-14 at 02:27, Travis McCauley wrote:
> Hi,
> 
> You don't need to create your own model, you can use the 
> EntitySelectionModel. Look in the API under the net.sf.tapestry.vlib 
> package. EntitySelectionModel has an add method that takes an Integer 
> (for the value/primary key) and a String (for the label).
> 
> Travis McCauley
> University of Virginia Library
> 
> 
> >Hi all,
> >
> >I'm trying to use a PropertySelection to allow a user to pick one item
> >from a list.  The contents of the list comes from a database.  I would
> >like to use the Object ID (primary key or row ID) from the database as
> >the value returned when I pick a certain string, instead of just a
> >simple int.
> >
> >Is there an easy way to do that, or do I have to create my own
> >SelectionModel so that I can specify the value connected to each string
> >that I add to the PropertySelection?
> >
> >Thanx in advance
> >reinier
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 



Re: PropertySelection woes

Posted by Travis McCauley <tw...@virginia.edu>.
Hi,

You don't need to create your own model, you can use the 
EntitySelectionModel. Look in the API under the net.sf.tapestry.vlib 
package. EntitySelectionModel has an add method that takes an Integer 
(for the value/primary key) and a String (for the label).

Travis McCauley
University of Virginia Library


>Hi all,
>
>I'm trying to use a PropertySelection to allow a user to pick one item
>from a list.  The contents of the list comes from a database.  I would
>like to use the Object ID (primary key or row ID) from the database as
>the value returned when I pick a certain string, instead of just a
>simple int.
>
>Is there an easy way to do that, or do I have to create my own
>SelectionModel so that I can specify the value connected to each string
>that I add to the PropertySelection?
>
>Thanx in advance
>reinier
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org