There is an example in the documentation:

http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html

in the Simple Example section.

I think you would want
t:model="literal:any=Any,perm=Permanent,temp=Temporary"



On Sun, Aug 7, 2011 at 8:45 AM, dkeenan <david_siedle...@yahoo.co.uk> wrote:

> Hi. Is there any way I can create a select field and get is just to use the
> options listed in the html?
>
> The values I have are never going to change and Im happy with the list in
> the TML.
>
> Eg... I have...
>
>  <form t:id="search_form" name="search_form">
>      <p>
>        <label for="employeeType" class="label">Employee Type:</label>
>        <select style="width:178px;" t:type="select" t:model="???"
> t:value="employee_type" >
>          <option value="any">Any</option>
>          <option value="perm">Permanent</option>
>          <option value="temp">Temp</option>
>        </select>
>      </p>
>
> Obviously this complains that I dont have a t:model specified.   But I dont
> want to really have to create a Select Model and Enum in Java to back this,
> when I really jsut want the values 'perm' and 'temp' already in my template
> above. Do I really need to create 2 or more Java classes with and an enum
> just to show this list of options that Ive already defined in the TML?
>
> Any help appreciated.
>
>
> Thanks!!!
>
> Dave.
>
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Select-component-Can-i-just-pass-it-a-list-of-values-tp4674906p4674906.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Jonathan Barker
ITStrategic

Reply via email to