"RESTREPO, ALEXANDER G [Non-Pharmacia/1000]" wrote:
> Hello All:
hi!
i had a little think about answering your questions exactly but decided
against it ;-)
these are the easy ways to do what you want rather than answers to your
specific questions. i will post code examples for you to do these things
if that's what you really need - just post to the list.
(in particular i've been playing about with select options recently and
came to the conclusion that multithreading issues would usually mean
that it's probably best to generate new every time rather than cache. i
don't what other people think about this)
> I am new to ECS and I had a couple of questions:
>
> 1) Once I create a Select object how can I add
> an element so it is the first 1 in the selection list.
> For example, I want to create a Select object
> and then add the selection - "Please select 1 city"
> to the beginning of the selecton list instead of being
> added to the end of the list.
elements are added in order. the easy way is select.addElement("Please
select 1 city") before you add your
options.
eg.
new org.apache.ecs.html.Select("name").addElement("Please select 1
city")
then add your options
> 2) Also how can I programatically get a reference to
> a Option element in a list by index and then select
> that element?
> For example, I want to select the 3rd element in a list
> so how do I get the 3rd Option Element Object and
> set the attribute of the option element to SELECTED.
the easy way is to .setSelected(true) on the 3rd option when you create
it.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]