Re: html:select / html:options

2004-03-23 Thread Mark Lowe
session.setAttribute("myList", list);
session.setAttribute("myList",list.toArray());

for some reason you need to cast to list to an array.

On 24 Mar 2004, at 01:23, Lokanath wrote:

hi ,

i think u have to get the bean from session to some Collection
useing session.getAttribute("mylist") then assign it to some 
collection.then
use that collection for populating the select

   lokee

-Original Message-
From: Christian Schlaefcke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 2:45 AM
To: Struts Users Mailing List
Subject: html:select / html:options
Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp
<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 
When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" 
so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: html:select / html:options

2004-03-23 Thread Sanoj, Antony (IE10)
Hi,

I believe you need to read the following link 
http://www.jajakarta.org/struts/struts1.1/documentation/ja/target/userGuide/
printer/struts-html.html#options

This should give you an idea of what the attributes of html:options are.
Collection should be a set of java beans. Rules are clearly provided in the
above link.

I can give you an example using 


 
  
  
  

  
  
  
 
 

 

   
  



Regards, 
Sanoj Antony 


-Original Message-
From: Christian Schlaefcke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 4:15 PM
To: Struts Users Mailing List
Subject: html:select / html:options


Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp

<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 

When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select / html:options

2004-03-23 Thread Lokanath
hi ,

i think u have to get the bean from session to some Collection
useing session.getAttribute("mylist") then assign it to some collection.then
use that collection for populating the select

   lokee

-Original Message-
From: Christian Schlaefcke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 2:45 AM
To: Struts Users Mailing List
Subject: html:select / html:options


Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp

<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 

When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select

2004-02-17 Thread Wendy Smoak
> From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED] 
> I need to send the value and text dispayed  to  the server 

Now I have to ask, why?  Presumably you're generating the selections
from something, maybe a Map?  All you need is the value, they key, and
you can pull the value out of the Map without having it sent from the
browser.  

There are ways, you could use JavaScript to set a hidden form field, or
just concatenate the value & text:

  Some Text

and then parse it when it arrives at the server.  (For the record,
that's not a recommendation, just an option!)

But it would help if you'd post the code from the JSP that you're using.
Right now I don't know if you're using  or if you're
'manually' writing out the  tags.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select

2004-02-17 Thread Nick Heudecker
Yeah, what I do is just use a LabelValueBean form property to pass the value and
txt back to the server.  I set the text property using the onBlur javascript event.  

On 2004-Feb-17 17:02, Gonzalez, Sergio Eduardo wrote:
> I need to send the value and text dispayed  to  the server 
> 
> -Mensaje original-
> De: Wendy Smoak [mailto:[EMAIL PROTECTED] 
> Enviado el: martes, 17 de febrero de 2004 17:39
> Para: Struts Users Mailing List
> Asunto: RE: html:select
> 
> > From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED] 
> > How can I do to send the value displayed ? 
> 
> Can you post the code from the JSP the way it is now?  Someone can
> probably help you change it so that it does what you want.
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> Aquest missatge electronic pot  contenir informacio confidencial o privilegiada.
> Si voste no es el destinatari del  missatge, o l'ha rebut per error, si us plau
> notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut.
> Esta completament  prohibida  qualsevol  copia, us o distribucio no autoritzada
> del contingut d'aquest missatge electronic.
> 
> Este mensaje electronico puede contener informacion confidencial o privilegiada.
> Si usted  no es  el destinatario de este mensaje o lo ha recibido por error, por
> favor notifiquelo al remitente y destruya el mensaje con todo su contenido.
> Queda  expresamente  prohibida  cualquier  copia, utilizacion o  distribucion no
> autorizada del contenido de este mensaje electronico.
> 
> This e-mail may contain confidential and/or privileged information.
> If you  are  not the  intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail.
> Any  unauthorized  copying,  disclosure  or distribution of the material in this
> e-mail is strictly forbidden.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Nick Heudecker
System Mobile, Inc.
Email: [EMAIL PROTECTED]
Phone: 734.604.9192
Web: http://www.systemmobile.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select

2004-02-17 Thread Paul McCulloch
Surely your application is responsible for creating the options in the first
place? Why not create a map of the key,value pairs at that time & refer to
it later?

Paul

> -Original Message-
> From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED]
> Sent: 17 February 2004 16:13
> To: Struts Users Mailing List
> Subject: html:select 
> 
> 
> 
> Hello . 
> I have to get the description  from a html:select  example  in html 
> 
> 
> z
> 
> 
> how can I do to get the "z" value ???  ( using struts ) 
> 
> 
> thamks .. 
> 
> serge
> 
> 
> --
> --
> Aquest missatge electronic pot  contenir informacio 
> confidencial o privilegiada.
> Si voste no es el destinatari del  missatge, o l'ha rebut per 
> error, si us plau
> notifiqui-ho al remitent i destrueixi el missatge amb tot el 
> seu contingut.
> Esta completament  prohibida  qualsevol  copia, us o 
> distribucio no autoritzada
> del contingut d'aquest missatge electronic.
> --
> --
> Este mensaje electronico puede contener informacion 
> confidencial o privilegiada.
> Si usted  no es  el destinatario de este mensaje o lo ha 
> recibido por error, por
> favor notifiquelo al remitente y destruya el mensaje con todo 
> su contenido.
> Queda  expresamente  prohibida  cualquier  copia, utilizacion 
> o  distribucion no
> autorizada del contenido de este mensaje electronico.
> --
> --
> This e-mail may contain confidential and/or privileged information.
> If you  are  not the  intended recipient (or have received 
> this e-mail in error)
> please notify the sender immediately and destroy this e-mail.
> Any  unauthorized  copying,  disclosure  or distribution of 
> the material in this
> e-mail is strictly forbidden.
> --
> --
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select

2004-02-17 Thread Geeta Ramani
Well, I guess that's what Wendy was suggesting in the first place: make the value
and the text the same, that way sending one is tatamount to sending both.. The other
option is to use a hidden field and javascript (onSelect fill hidden field kind of
thing along with the form.blah-blah[selectedIndex].value that another person
suggested earlier..)

Geeta

"Gonzalez, Sergio Eduardo" wrote:

> I need to send the value and text dispayed  to  the server


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select

2004-02-17 Thread Gonzalez, Sergio Eduardo
I need to send the value and text dispayed  to  the server 

-Mensaje original-
De: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 17 de febrero de 2004 17:39
Para: Struts Users Mailing List
Asunto: RE: html:select

> From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED] 
> How can I do to send the value displayed ? 

Can you post the code from the JSP the way it is now?  Someone can
probably help you change it so that it does what you want.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Aquest missatge electronic pot  contenir informacio confidencial o privilegiada.
Si voste no es el destinatari del  missatge, o l'ha rebut per error, si us plau
notifiqui-ho al remitent i destrueixi el missatge amb tot el seu contingut.
Esta completament  prohibida  qualsevol  copia, us o distribucio no autoritzada
del contingut d'aquest missatge electronic.

Este mensaje electronico puede contener informacion confidencial o privilegiada.
Si usted  no es  el destinatario de este mensaje o lo ha recibido por error, por
favor notifiquelo al remitente y destruya el mensaje con todo su contenido.
Queda  expresamente  prohibida  cualquier  copia, utilizacion o  distribucion no
autorizada del contenido de este mensaje electronico.

This e-mail may contain confidential and/or privileged information.
If you  are  not the  intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any  unauthorized  copying,  disclosure  or distribution of the material in this
e-mail is strictly forbidden.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select

2004-02-17 Thread Wendy Smoak
> From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED] 
> How can I do to send the value displayed ? 

Can you post the code from the JSP the way it is now?  Someone can
probably help you change it so that it does what you want.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select

2004-02-17 Thread Nick Heudecker
form.xx.options[form.xx.selectedIndex].text;

On 2004-Feb-17 17:02, Gonzalez, Sergio Eduardo wrote:
> 
> Hello . 
> I have to get the description  from a html:select  example  in html 
> 
> 
> z
> 
> 
> how can I do to get the "z" value ???  ( using struts ) 
> 

-- 
Nick Heudecker
System Mobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select

2004-02-17 Thread Wendy Smoak
> From: Gonzalez, Sergio Eduardo [mailto:[EMAIL PROTECTED] 
> I have to get the description  from a html:select  example  in html 
> 
> z
> 
> how can I do to get the "z" value ???  ( using struts ) 

Make the tag look like this instead:

  z


It's the 'value' that will get sent to the server, not the displayed
text.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select multiple="true" question

2004-01-21 Thread Mathew, Manoj
I used the same property name for select and Options tag..it worked in a dynaaction 
form.

Thank-you,
Manoj Mathew
GIS 515-362-0539


-Original Message-
From: Morten [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 6:00 AM
To: [EMAIL PROTECTED]
Subject: html:select multiple="true" question


Hi.

I have a bean stored in page scope with id "active". It returns
a String[] on getIds() and getLabels(). I use the following to render
a multiple select box:


   


What's wrong with this approach? I wish to have all elements
selected. All elements show and have the proper value/label,
but they do not get selected.

Can anyone please tell me how the property attribute of the select
tag determines what options get set as selected? Thanks.

Br,

Morten




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select example

2003-12-30 Thread Carl
some working examples, but I'm not expert ;-)


normal
gras
italique
gras-italique






For the second one, It seems that there is other way to do the same, 
using html:options or html:optioncollection, but I've never used it.

Good luck

Carl

Otávio Augusto wrote:

Would someone show me a very simple example of the use of an html:select tag? I did not understand its use.

I'd appreciate any simple example.

Thanks a lot.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: html:select example

2003-12-30 Thread Steve Raeburn
I have some examples of Struts tags, including html:select, at
http://www.ninsky.com/struts

Various other examples are listed at
http://struts.sourceforge.net/community/examples.html

Steve

Sorry if this is a duplicate message, sent the first one from the wrong
address :-(

> -Original Message-
> From: Otavio Augusto [mailto:[EMAIL PROTECTED]
> Sent: December 30, 2003 8:41 AM
> To: [EMAIL PROTECTED]
> Subject: html:select example
>
>
> Would someone show me a very simple example of the use of an
> html:select tag? I did not understand its use.
>
> I'd appreciate any simple example.
>
> Thanks a lot.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select example

2003-12-30 Thread Daniel Lipofsky
> Would someone show me a very simple example of the use of an 
> html:select tag? I did not understand its use.
> 
> I'd appreciate any simple example.


  
  


The select tag can contain a list of option tags, or an options or
optionsCollection tag or any combination.  Here I use 1 option tag to
provide a blank default and a optionsCollection tag with a collection
of LabelValueBean objects to provide the rest of the list (the fact
that the collection contains LabelValueBean objects makes the syntax
much simplier as you don't have to specify the label or value
properties.  The value that matches the value of "someProperty"
will automatically be selected.

- Dan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select default value problem

2003-12-18 Thread Robert Taylor
Try this:


 0 - INACTIVE
 1 - ACTIVE


The regular HTML  element doesn't "communicate" with 
Struts. You need to use 

robert

> -Original Message-
> From: Keith C. Klopfer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 18, 2003 6:12 AM
> To: [EMAIL PROTECTED]
> Subject: html:select default value problem
> 
> 
> Hi,
> 
> I know this has been talked about before, and I'm pretty sure I 
> understand the concept, but I don't know why this is not
> working.  The default option for an html:select is not being 
> displayed.  I have an ActionForm in request scope called
> "BusinessForm" that is populated.  The "status" property has a 
> value of "1" as verified by sticking in a bean:write, but
> the select list shows the value="0" option as the default item 
> when I load the page.  I have twelve other html elements on
> the page, and they all show the correct defaults, except for this 
> html:select.  Am I not seeing something in the code
> below...
> 
> thanks...keith
> 
> ---
> 
>  type="BusinessForm">
> 
> 
> 
> 
> 
> 0 - INACTIVE
> 1 - ACTIVE
> 
> 
> ...
> 
>  
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select tag or logic:iterate

2003-12-15 Thread Firat TIRYAKI
try this,







F.

- Original Message - 
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, December 15, 2003 3:00 PM
Subject: html:select tag or logic:iterate


> Hi all,
> I am quite new to struts tag library and I need an advice.
> In the HttpSession I have an object of type Collection, which stores
> a list of MyObject.
> MyOBject has two properties, description and id.
>
> Out of this Collection of MyObject I must generate a selectable list
> Which displays MyObject names,  (wity MyObject.id as value)
>
> I have tried to embed the html:select inside a logic:iterate, but my
> editor (websphere studio)complaints for following code
>
> 
>   " id="container">
>property="type"/>">
>  property="description"/>
> 
>   
> 
>
> the error is  'Attribute container has no value'
>
> anyone has a suggestion on how to solve my problem?
>
> Fact is that the Collection is stored in the session, not in a
> JavaBean..
>
> Thanks and regards
> marco
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select

2003-10-30 Thread Rhet Behler
set the country in the action before the page if null

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:41 PM
Subject: html:select


> how can i default a countrylist, i mean set the selected country ?
> I want the selected to be 'BE'
>
> my code:
>
> 
>  
> 
>
>
> Thanks !
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select onchange

2003-10-29 Thread Mark Lowe
In fact ignore my suggestion, I was silly and assumed the userId was 
taken somewhere else but the form.



On Wednesday, October 29, 2003, at 11:33 AM, Mark Lowe wrote:

Perhaps you don't need to pass the id in as an argument. I'd just wrap 
the action in a js function

function setupUserForm() {
	alert( 'setUpUsersForm.do?action=retrieve&userId=  '  );
}

onchange="setupUserForm()" ..



On Wednesday, October 29, 2003, at 11:12 AM, struts wrote:

Problem how can i pass the userId ? so that i can do a 
request.getParameter("userId")  ?

example:













Thanks !


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:select onchange

2003-10-29 Thread Mark Lowe
Perhaps you don't need to pass the id in as an argument. I'd just wrap 
the action in a js function

function setupUserForm() {
	alert( 'setUpUsersForm.do?action=retrieve&userId=  '  );
}

onchange="setupUserForm()" ..



On Wednesday, October 29, 2003, at 11:12 AM, struts wrote:

Problem how can i pass the userId ? so that i can do a 
request.getParameter("userId")  ?

example:













Thanks !


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:select onchange

2003-10-29 Thread James Mitchell
Change your custom JavaScript function.

Here's an example of what I mean: (change it to fit your needs)


 
  value1
  value2
  value3
 


function setAction(form) {
 selectCtl = form.elements["users.userAccount"];
 form.action = "dosomething.do?users.userAccount=";
 form.action += selectCtl.options[selectCtl.selectedIndex].value;
}










--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
770.822.3359
AIM:jmitchtx



- Original Message - 
From: "struts" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 6:12 AM
Subject: html:select onchange


Problem how can i pass the userId ? so that i can do a
request.getParameter("userId")  ?

example:













Thanks !


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select multiple="true" and ActionForm

2003-09-17 Thread Ian Joyce
Minor correction:

public String[] getSelectedProductValues() should be
public ArrayList getSelectedProductValues()


Ian Joyce
Internet Systems Programmer/Analyst
American Academy of Family Physicians
Research and Information Services
Interactive Media
11400 Tomahawk Creek Parkway
Leawood, KS  66211-2672
Phone:  800-274-2237 ext 4219
Fax:  913-906-6271
E-mail:  [EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 09/18/03 01:06 AM >>>
I've looked in the archives and googled but haven't come up with a solution yet.

I have a html:select multiple="true" form element.  When the form is submitted what 
setter should be called in the ActionForm?

My form
8<---8<---

  

8<---8<---

my ActionForm ( not working )
8<---8<---
public final class ProductsForm extends ActionForm {
   private ArrayList selectedProductValues = null;

   public void setSelectedProductValues(ArrayList selectedProductValues) {
  this.selectedProductValues = selectedProductValues;
   }

   public String[] getSelectedProductValues() {
  return this.selectedProductValues;
   }
}
8<---8<---

Thanks for any help...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Html:select

2003-08-29 Thread Seshadhri Srinivasan
Hi,
Can someone help out with the usage of html:select. The API just gives the
syntax ans the parameters that can be used with place.
I understand that it can be used with combo boxes. I have to poulate a combo
box using this.
Thanks,
Seshadhri Srinivasan 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select Not 'Selecting' My Item

2003-08-18 Thread Wendy Smoak
> For some reason (not immediately sure why), I thought I could have 
> the contents of 'value' evaluated (i.e. value='${myOtherProperty}').
> You're saying that this is not the case?
> If that's true, how would I get the effect I require?

You can... If you switch to the EL tags.  Look in the 'contrib' directory,
and get the .jar files in there.  Read the README file.  Change your
<@taglib> at the top to:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el";
prefix="html-el" %>

Then use the syntax you have above, something like:



>From memory... play with syntax and spelling as necessary to get it to do
what you want.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 


RE: html:select Not 'Selecting' My Item

2003-08-18 Thread Yee, Richard K,,DMDCWEST
Hunter,
In your Action, if you set the value of associatedSalesperson =
getEncodeAssociatedSalespersonID(), then it should fix your problem. Once
the form gets submitted, you can then do some processing on the value of
associatedSalesperson before writing the value to your database. Either way,
associatedSalesperson is going to get the one of the values
("Jobs-8","Bob-7","Bob-27", or "Bob-32").

Regards,

Richard

-Original Message-
From: Hunter Hillegas [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 18, 2003 2:21 PM
To: Struts List
Subject: Re: html:select Not 'Selecting' My Item


This may be the crux of my problem.

For some reason (not immediately sure why), I thought I could have the
contents of 'value' evaluated (i.e. value='${myOtherProperty}').

You're saying that this is not the case?

If that's true, how would I get the effect I require?

Thanks very much for your help.

Hunter

> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 14:09:22 -0700
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: html:select Not 'Selecting' My Item
> 
> No, 'value' is where you would put the literal value of the option you 
> want to be selected.
> 
> Take a look here: 
> http://jakarta.apache.org/struts/userGuide/struts-html.html#select
> 
> For 'value' it says: "The value to compare with for marking an option 
> selected."
> 
> Nothing about using whatever you put in value as the name of a 
> different form property.  Where did you get that idea?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Hunter Hillegas
This may be the crux of my problem.

For some reason (not immediately sure why), I thought I could have the
contents of 'value' evaluated (i.e. value='${myOtherProperty}').

You're saying that this is not the case?

If that's true, how would I get the effect I require?

Thanks very much for your help.

Hunter

> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 14:09:22 -0700
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: html:select Not 'Selecting' My Item
> 
> No, 'value' is where you would put the literal value of the option you want
> to be selected.  
> 
> Take a look here:
> http://jakarta.apache.org/struts/userGuide/struts-html.html#select
> 
> For 'value' it says: "The value to compare with for marking an option
> selected."
> 
> Nothing about using whatever you put in value as the name of a different
> form property.  Where did you get that idea?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Hunter Hillegas


> From: Wendy Smoak <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 14:06:06 -0700
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: html:select Not 'Selecting' My Item
> 
> Hunter wrote:
>> The HTML generated for the  looks as follows:
>>  
>> None of the options are selected. In this example the
>> getEncodeAssociatedSalespersonID() returns Bob-7.
>> I also tried it retunring 'Bob, Darin'. Still, the item is not selected.
> 
> Those names don't match!  Change the name of the 'get' method to
> 'getAssociatedSalesperson' and see if things improve.

I thought I could use value to override what property was being used to
determine which item was selected. I cannot use associatedSalesperson as my
matching item. It won't match. We do some processing on the input before we
put it in our database... That's what I want to use the other method to
output a string that will match.
 
> 
> In an earlier message, you wrote:
>> >name="sampleRequestCompleteForm"
>> value="encodeAssociatedSalespersonID">
> 
> The 'property' in the  tag needs to match the get/set methods.
> You DO NOT need to use the 'value' attribute, Struts will automatically
> pre-select the right value based on what's in the Form bean.
> 
> (I'm almost certain I answered this last week... Hopefully I haven't
> contradicted myself!)

I thought I could use value to override. I don't want the default behavior
here. Please see above.

Thanks,
Hunter


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select Not 'Selecting' My Item

2003-08-18 Thread Wendy Smoak
> I was hoping the value attribute would let me override which property of
my 
> form bean was being used to check for the match. Is that not the case?

No, 'value' is where you would put the literal value of the option you want
to be selected.  

Take a look here:
http://jakarta.apache.org/struts/userGuide/struts-html.html#select

For 'value' it says: "The value to compare with for marking an option
selected."

Nothing about using whatever you put in value as the name of a different
form property.  Where did you get that idea?

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 


RE: html:select Not 'Selecting' My Item

2003-08-18 Thread Wendy Smoak
Hunter wrote:
> The HTML generated for the  looks as follows:
>  
> None of the options are selected. In this example the
> getEncodeAssociatedSalespersonID() returns Bob-7. 
> I also tried it retunring 'Bob, Darin'. Still, the item is not selected.

Those names don't match!  Change the name of the 'get' method to
'getAssociatedSalesperson' and see if things improve.  

In an earlier message, you wrote:
> name="sampleRequestCompleteForm" 
> value="encodeAssociatedSalespersonID">

The 'property' in the  tag needs to match the get/set methods.
You DO NOT need to use the 'value' attribute, Struts will automatically
pre-select the right value based on what's in the Form bean.

(I'm almost certain I answered this last week... Hopefully I haven't
contradicted myself!)

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Hunter Hillegas
Richard,

Yes, I do.

I was hoping the value attribute would let me override which property of my
form bean was being used to check for the match. Is that not the case?

Thanks,
Hunter

> From: "Yee, Richard K,,DMDCWEST" <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 16:52:06 -0400
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: html:select Not 'Selecting' My Item
> 
> Hunter,
> Do you have an associatedSalesperson attribute in your FormBean? If so, what
> is it's value? You shouldn't really have to use the value attribute if you
> set the associatedSalesperson attribute to the desired id in
> associatedSalesPeople.
> 
> -Richard
> 
> -Original Message-
> From: Hunter Hillegas [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 15, 2003 9:04 AM
> To: Struts List
> Subject: html:select Not 'Selecting' My Item
> 
> 
> I have an html:select tag that isn't playing along...
> 
> I pre-populate a form in an action. I also create a TreeMap and add it to
> the request scope.
> 
> I have the following in my JSP:
> 
>  name="sampleRequestCompleteForm" value="encodeAssociatedSalespersonID">
> 
>  labelProperty="value"/>
> 
> 
> 
> The problem is not that the map doesn't display as options, they do, that is
> fine. The problem is that the correct item isn't highlighted. No item is
> highlighted (default, top item).
> 
> I have a println() in my getEncodeAssociatedSalespersonID() method in my
> ActionForm and it doesn't appear that it is being called. Isn't this
> supposed to be evaluated.
> 
> My understanding is that if the key of the option matches the evaluated
> value of the 'value' attribute of the html:select, it should show as
> SELECTED.
> 
> Is that true? What am I doing wrong?
> 
> TIA,
> hunter
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Hunter Hillegas
The HTML generated for the  looks as follows:

 
Jobs, Steve
Bob, Darin
Bob, Philip
Bob, Glenn
 

None of the options are selected. In this example the
getEncodeAssociatedSalespersonID() returns Bob-7. I also tried it retunring
'Bob, Darin'. Still, the item is not selected.

> From: "James Childers" <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 14:44:53 -0500
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: RE: html:select Not 'Selecting' My Item
> 
> Don't rely on debug output when dealing with getters and setters for Forms.
> It's been my experience that this can be deceptive, since Struts apparently
> uses reflection when dealing with Form member variables.
> 
> What HTML is being generated for your  tag, and are any of the
> associated  tags set to selected="selected"?
> 
> -= J
> 
>> -Original Message-
>> From: Hunter Hillegas [mailto:[EMAIL PROTECTED]
>> Sent: Monday, August 18, 2003 2:37 PM
>> To: Struts List; Craig Margenau
>> Subject: Re: html:select Not 'Selecting' My Item
>> 
>> 
>> Yes, associatedSalespeople is set in an Action. The list
>> displays properly,
>> that's not a problem.
>> 
>> The only issue is that the correct item isn't selected.
>> 
>> associatedSalespeople is a TreeMap with key/value pairs. The value of
>> 'encodeAssociatedSalespersonID' matches one of the keys but
>> it doesn't seem
>> that this property is evaluated at all since the debug output is never
>> printed to the log.
>> 
>> Hunter
>> 
>>> From: Craig Margenau <[EMAIL PROTECTED]>
>>> Reply-To: "Struts Users Mailing List"
>> <[EMAIL PROTECTED]>
>>> Date: Mon, 18 Aug 2003 15:16:13 -0400
>>> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>> Subject: Re: Re: html:select Not 'Selecting' My Item
>>> 
>>> Looks like you are doing the same thing I am just in a
>> slightly different
>>> manner.  I prepopulate default values for my action form in
>> my action class,
>>> including an ArrayList named statusList to hold dropdown
>> values, rather than
>>> using a separate request attribute..that being the only
>> difference that I can
>>> see.
>>> 
>>> My statusList ArrayList hold an array of a simple "Status"
>> class that defines
>>> an "id" and "value" attribute.  One of my action form
>> attributes is "statusId"
>>> and is the value I prepopulate in my action calss and wish
>> to be selected when
>>> my form is displayed.
>>> 
>>> 
>>> The object 'assocatedSalespeople" that your  html:option
>> collection param is
>>> referring to is supposed to be a jsp scripting
>> variable...I'm assuming you've
>>> set this elsewhere in your jsp's code?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select Not 'Selecting' My Item

2003-08-18 Thread Yee, Richard K,,DMDCWEST
Hunter,
Do you have an associatedSalesperson attribute in your FormBean? If so, what
is it's value? You shouldn't really have to use the value attribute if you
set the associatedSalesperson attribute to the desired id in 
associatedSalesPeople.

-Richard

-Original Message-
From: Hunter Hillegas [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 15, 2003 9:04 AM
To: Struts List
Subject: html:select Not 'Selecting' My Item


I have an html:select tag that isn't playing along...

I pre-populate a form in an action. I also create a TreeMap and add it to
the request scope.

I have the following in my JSP:







The problem is not that the map doesn't display as options, they do, that is
fine. The problem is that the correct item isn't highlighted. No item is
highlighted (default, top item).

I have a println() in my getEncodeAssociatedSalespersonID() method in my
ActionForm and it doesn't appear that it is being called. Isn't this
supposed to be evaluated.

My understanding is that if the key of the option matches the evaluated
value of the 'value' attribute of the html:select, it should show as
SELECTED.

Is that true? What am I doing wrong?

TIA,
hunter


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select Not 'Selecting' My Item

2003-08-18 Thread Craig R. McClanahan
On Mon, 18 Aug 2003, James Childers wrote:

>
> Don't rely on debug output when dealing with getters and setters for
> Forms. It's been my experience that this can be deceptive, since Struts
> apparently uses reflection when dealing with Form member variables.
>

While it is true that reflection is used, the property getter and setter
methods are still called.  Struts does not introspect the instance
variables of the bean; indeed, it does not care whether there even is such
a thing.  All it cares about is the getter and setter Method values
returned in the PropertyDescriptor for a particular property.

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select Not 'Selecting' My Item

2003-08-18 Thread James Childers
Don't rely on debug output when dealing with getters and setters for Forms. It's been 
my experience that this can be deceptive, since Struts apparently uses reflection when 
dealing with Form member variables.

What HTML is being generated for your  tag, and are any of the associated 
 tags set to selected="selected"?

-= J

> -Original Message-
> From: Hunter Hillegas [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 18, 2003 2:37 PM
> To: Struts List; Craig Margenau
> Subject: Re: html:select Not 'Selecting' My Item
> 
> 
> Yes, associatedSalespeople is set in an Action. The list 
> displays properly,
> that's not a problem.
> 
> The only issue is that the correct item isn't selected.
> 
> associatedSalespeople is a TreeMap with key/value pairs. The value of
> 'encodeAssociatedSalespersonID' matches one of the keys but 
> it doesn't seem
> that this property is evaluated at all since the debug output is never
> printed to the log.
> 
> Hunter
> 
> > From: Craig Margenau <[EMAIL PROTECTED]>
> > Reply-To: "Struts Users Mailing List" 
> <[EMAIL PROTECTED]>
> > Date: Mon, 18 Aug 2003 15:16:13 -0400
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Subject: Re: Re: html:select Not 'Selecting' My Item
> > 
> > Looks like you are doing the same thing I am just in a 
> slightly different
> > manner.  I prepopulate default values for my action form in 
> my action class,
> > including an ArrayList named statusList to hold dropdown 
> values, rather than
> > using a separate request attribute..that being the only 
> difference that I can
> > see.
> > 
> > My statusList ArrayList hold an array of a simple "Status" 
> class that defines
> > an "id" and "value" attribute.  One of my action form 
> attributes is "statusId"
> > and is the value I prepopulate in my action calss and wish 
> to be selected when
> > my form is displayed.
> > 
> > 
> > The object 'assocatedSalespeople" that your  html:option 
> collection param is
> > referring to is supposed to be a jsp scripting 
> variable...I'm assuming you've
> > set this elsewhere in your jsp's code?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Hunter Hillegas
Yes, associatedSalespeople is set in an Action. The list displays properly,
that's not a problem.

The only issue is that the correct item isn't selected.

associatedSalespeople is a TreeMap with key/value pairs. The value of
'encodeAssociatedSalespersonID' matches one of the keys but it doesn't seem
that this property is evaluated at all since the debug output is never
printed to the log.

Hunter

> From: Craig Margenau <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 15:16:13 -0400
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: Re: Re: html:select Not 'Selecting' My Item
> 
> Looks like you are doing the same thing I am just in a slightly different
> manner.  I prepopulate default values for my action form in my action class,
> including an ArrayList named statusList to hold dropdown values, rather than
> using a separate request attribute..that being the only difference that I can
> see.
> 
> My statusList ArrayList hold an array of a simple "Status" class that defines
> an "id" and "value" attribute.  One of my action form attributes is "statusId"
> and is the value I prepopulate in my action calss and wish to be selected when
> my form is displayed.
> 
> 
> The object 'assocatedSalespeople" that your  html:option collection param is
> referring to is supposed to be a jsp scripting variable...I'm assuming you've
> set this elsewhere in your jsp's code?
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Craig Margenau
Looks like you are doing the same thing I am just in a slightly different manner.  I 
prepopulate default values for my action form in my action class, including an 
ArrayList named statusList to hold dropdown values, rather than using a separate 
request attribute..that being the only difference that I can see.

My statusList ArrayList hold an array of a simple "Status" class that defines an "id" 
and "value" attribute.  One of my action form attributes is "statusId" and is the 
value I prepopulate in my action calss and wish to be selected when my form is 
displayed.


The object 'assocatedSalespeople" that your  html:option collection param is referring 
to is supposed to be a jsp scripting variable...I'm assuming you've set this elsewhere 
in your jsp's code?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Hunter Hillegas
Thanks but I think I am trying to do something a little different.

The method I need called to evaluate which item is selected isn't getting
called... getEncodeAssociatedSalespersonID() has some logging stuff in it
that never gets printed...

Any idea what I am doing wrong?

> From: Craig Margenau <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 18 Aug 2003 11:47:08 -0400
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Subject: Re: html:select Not 'Selecting' My Item
> 
> I do mine like this, haven't had a problem yet.
> 
>  />
> 
> 
> 
> 
> 
>> 
>> From: Hunter Hillegas <[EMAIL PROTECTED]>
>> Date: 2003/08/18 Mon AM 11:38:10 EDT
>> To: Struts List <[EMAIL PROTECTED]>
>> Subject: html:select Not 'Selecting' My Item
>> 
>> I sent a similar question to the list last week and didn't see any
>> responses. I'm resending as I'm still having this problem.
>> 
>> I have an html:select tag that isn't playing along...
>> 
>> I pre-populate a form in an action. I also create a TreeMap and add it to
>> the request scope.
>> 
>> I have the following in my JSP:
>> 
>> > name="sampleRequestCompleteForm" value="encodeAssociatedSalespersonID">
>> 
>> > labelProperty="value"/>
>> 
>> 
>> 
>> The problem is not that the map doesn't display as options, they do, that is
>> fine. The problem is that the correct item isn't highlighted. No item is
>> highlighted (default, top item).
>> 
>> I have a println() in my getEncodeAssociatedSalespersonID() method in my
>> ActionForm and it doesn't appear that it is being called. Isn't this
>> supposed to be evaluated?
>> 
>> My understanding is that if the key of the option matches the evaluated
>> value of the 'value' attribute of the html:select, it should show as
>> SELECTED.
>> 
>> Is that true? What am I doing wrong?
>> 
>> TIA,
>> hunter
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select Not 'Selecting' My Item

2003-08-18 Thread Craig Margenau
I do mine like this, haven't had a problem yet.




  


> 
> From: Hunter Hillegas <[EMAIL PROTECTED]>
> Date: 2003/08/18 Mon AM 11:38:10 EDT
> To: Struts List <[EMAIL PROTECTED]>
> Subject: html:select Not 'Selecting' My Item
> 
> I sent a similar question to the list last week and didn't see any
> responses. I'm resending as I'm still having this problem.
> 
> I have an html:select tag that isn't playing along...
> 
> I pre-populate a form in an action. I also create a TreeMap and add it to
> the request scope.
> 
> I have the following in my JSP:
> 
>  name="sampleRequestCompleteForm" value="encodeAssociatedSalespersonID">
> 
>  labelProperty="value"/>
> 
> 
> 
> The problem is not that the map doesn't display as options, they do, that is
> fine. The problem is that the correct item isn't highlighted. No item is
> highlighted (default, top item).
> 
> I have a println() in my getEncodeAssociatedSalespersonID() method in my
> ActionForm and it doesn't appear that it is being called. Isn't this
> supposed to be evaluated?
> 
> My understanding is that if the key of the option matches the evaluated
> value of the 'value' attribute of the html:select, it should show as
> SELECTED.
> 
> Is that true? What am I doing wrong?
> 
> TIA,
> hunter
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select multiple pre select

2003-07-31 Thread Steve Raeburn
I've put together a set of Struts examples at http://www.ninsky.com/struts,
one of which focuses on populating and options.

struts-config.xml:
  

  

JSP:

  Strawberry
  Apple
  Orange
  Pear
  Mango
  Banana
  Pineapple


Here, I've set initial values in the DynaActionForm configuration, but you
could also initialise the values in your 'prepare' action.

Steve

> -Original Message-
> From: Daniel Massie [mailto:[EMAIL PROTECTED]
> Sent: July 31, 2003 5:02 AM
> To: Struts Users Mailing List
> Subject: RE: html:select multiple pre select
>
>
> I've tried this, I passed in Strin[] as the value, but no options were
> selected.
>   -Original Message-
>   From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
>   Sent: 31 July 2003 12:50
>   To: [EMAIL PROTECTED]
>   Subject: Re: html:select multiple pre select
>
>
> hi.
> docs say
> a.. multiple="true" IS selected - The corresponding
> property should
> be an array of any supported data type.
> so try populating the array (html:select property) with
> the required
> elements to be selected before hand.
>
> -- nagi
>
>
> ---Original Message---
>
> From: Struts Users Mailing List
> Date: Thursday, July 31, 2003 05:02:03 PM
> To: Struts Users Mailing List
> Subject: html:select multiple pre select
>
> I have a html:select with multiple="true" how can I get
> this to have
> options
> highlighted when it loads? based on the elements already
> stored for
> this
> select field.
>
> Thanks
>
> Daniel Massie
>
>
>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
> .
>
>
>   
> IncrediMail - Email has finally evolved - Click Here
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select multiple pre select

2003-07-31 Thread Daniel Massie
I've tried this, I passed in Strin[] as the value, but no options were
selected.
  -Original Message-
  From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
  Sent: 31 July 2003 12:50
  To: [EMAIL PROTECTED]
  Subject: Re: html:select multiple pre select


hi.
docs say
a.. multiple="true" IS selected - The corresponding property should
be an array of any supported data type.
so try populating the array (html:select property) with the required
elements to be selected before hand.

-- nagi


---Original Message---

From: Struts Users Mailing List
Date: Thursday, July 31, 2003 05:02:03 PM
To: Struts Users Mailing List
Subject: html:select multiple pre select

I have a html:select with multiple="true" how can I get this to have
options
highlighted when it loads? based on the elements already stored for
this
select field.

Thanks

Daniel Massie



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


.


  
IncrediMail - Email has finally evolved - Click Here


Re: html:select multiple pre select

2003-07-31 Thread Nagendra Kumar O V S








  hi.
  docs say
  
  multiple="true" IS selected - The corresponding property 
  should be an array of any supported data type. 
  so try populating the array (html:select property) with the required 
  elements to be selected before hand.
  -- nagi
   
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Thursday, July 
  31, 2003 05:02:03 PM
  To: Struts Users Mailing 
  List
  Subject: html:select 
  multiple pre select
   I have a html:select with multiple="true" how can I get 
  this to have optionshighlighted when it loads? based on the elements 
  already stored for thisselect field.ThanksDaniel 
  Massie-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here



RE: html:select and data refresh

2003-07-30 Thread Rick Col
Thanks, Richard:

The trouble is that I cannot use frameset in my
design.
So, it really gives me headache now :((.

regards,


--- "Yee, Richard K,,DMDCWEST"
<[EMAIL PROTECTED]> wrote:
> Rick,
> Check out using html frameset and frames. Have the
> result of your form go to
> a different results frame.
> 
> Regards,
> 
> Richard
> 
> 
> -Original Message-
> From: Rick Col [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 30, 2003 12:04 PM
> To: Struts Users Mailing List
> Subject: Re: html:select and data refresh
> 
> 
> Thanks,
> 
> Sorry for being naive on this. I am new to both
> javascript and struts. I am already using onchange
> to
> load data. Can I use another attribute, such as
> onblur, or onclick to do the job? And how do I
> reload
> the page to the previous page (that is: with no
> table
> display)?
> 
> regards
> 
> 
> --- Ashish Kulkarni <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> > i guess u can try onchange event on select, to
> find
> > out when the user selectes some thing and clear
> the
> > result table displayed below
> > for clearing the table u can use java script or
> will
> > have to reload the page
> > 
> > Ashish
> > --- Rick Col <[EMAIL PROTECTED]> wrote:
> > > Hi, guys:
> > > 
> > > I have a list for user to select, when user
> select
> > > one
> > > item from the list, and hit search button, a
> > results
> > > table will be displayed at the bottom half of
> the
> > > page. Now, if user selects another item from the
> > > list,
> > > I want to refresh the table (or page?) and make
> > the
> > > results table disappear before user hit search
> > > button
> > > again. I have no idea to do this. Can anyone
> give
> > > some
> > > thoughts on this?
> > > 
> > > regards,
> > > 
> > > rick
> > > 
> > > __
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select and data refresh

2003-07-30 Thread Ashish Kulkarni
Here is the thing u can try,
onchange event check if the result table is displayed,
if yes clear it first, and then load the new table

Ashish
--- Rick Col <[EMAIL PROTECTED]> wrote:
> Thanks,
> 
> Sorry for being naive on this. I am new to both
> javascript and struts. I am already using onchange
> to
> load data. Can I use another attribute, such as
> onblur, or onclick to do the job? And how do I
> reload
> the page to the previous page (that is: with no
> table
> display)?
> 
> regards
> 
> 
> --- Ashish Kulkarni <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> > i guess u can try onchange event on select, to
> find
> > out when the user selectes some thing and clear
> the
> > result table displayed below
> > for clearing the table u can use java script or
> will
> > have to reload the page
> > 
> > Ashish
> > --- Rick Col <[EMAIL PROTECTED]> wrote:
> > > Hi, guys:
> > > 
> > > I have a list for user to select, when user
> select
> > > one
> > > item from the list, and hit search button, a
> > results
> > > table will be displayed at the bottom half of
> the
> > > page. Now, if user selects another item from the
> > > list,
> > > I want to refresh the table (or page?) and make
> > the
> > > results table disappear before user hit search
> > > button
> > > again. I have no idea to do this. Can anyone
> give
> > > some
> > > thoughts on this?
> > > 
> > > regards,
> > > 
> > > rick
> > > 
> > > __
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> > > http://sbc.yahoo.com
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=
A$HI$H

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select and data refresh

2003-07-30 Thread Yee, Richard K,,DMDCWEST
Rick,
Check out using html frameset and frames. Have the result of your form go to
a different results frame.

Regards,

Richard


-Original Message-
From: Rick Col [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 30, 2003 12:04 PM
To: Struts Users Mailing List
Subject: Re: html:select and data refresh


Thanks,

Sorry for being naive on this. I am new to both
javascript and struts. I am already using onchange to
load data. Can I use another attribute, such as
onblur, or onclick to do the job? And how do I reload
the page to the previous page (that is: with no table
display)?

regards


--- Ashish Kulkarni <[EMAIL PROTECTED]>
wrote:
> Hi,
> i guess u can try onchange event on select, to find
> out when the user selectes some thing and clear the
> result table displayed below
> for clearing the table u can use java script or will
> have to reload the page
> 
> Ashish
> --- Rick Col <[EMAIL PROTECTED]> wrote:
> > Hi, guys:
> > 
> > I have a list for user to select, when user select
> > one
> > item from the list, and hit search button, a
> results
> > table will be displayed at the bottom half of the
> > page. Now, if user selects another item from the
> > list,
> > I want to refresh the table (or page?) and make
> the
> > results table disappear before user hit search
> > button
> > again. I have no idea to do this. Can anyone give
> > some
> > thoughts on this?
> > 
> > regards,
> > 
> > rick
> > 
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select and data refresh

2003-07-30 Thread Rick Col
Thanks,

Sorry for being naive on this. I am new to both
javascript and struts. I am already using onchange to
load data. Can I use another attribute, such as
onblur, or onclick to do the job? And how do I reload
the page to the previous page (that is: with no table
display)?

regards


--- Ashish Kulkarni <[EMAIL PROTECTED]>
wrote:
> Hi,
> i guess u can try onchange event on select, to find
> out when the user selectes some thing and clear the
> result table displayed below
> for clearing the table u can use java script or will
> have to reload the page
> 
> Ashish
> --- Rick Col <[EMAIL PROTECTED]> wrote:
> > Hi, guys:
> > 
> > I have a list for user to select, when user select
> > one
> > item from the list, and hit search button, a
> results
> > table will be displayed at the bottom half of the
> > page. Now, if user selects another item from the
> > list,
> > I want to refresh the table (or page?) and make
> the
> > results table disappear before user hit search
> > button
> > again. I have no idea to do this. Can anyone give
> > some
> > thoughts on this?
> > 
> > regards,
> > 
> > rick
> > 
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select and data refresh

2003-07-30 Thread Ashish Kulkarni
Hi,
i guess u can try onchange event on select, to find
out when the user selectes some thing and clear the
result table displayed below
for clearing the table u can use java script or will
have to reload the page

Ashish
--- Rick Col <[EMAIL PROTECTED]> wrote:
> Hi, guys:
> 
> I have a list for user to select, when user select
> one
> item from the list, and hit search button, a results
> table will be displayed at the bottom half of the
> page. Now, if user selects another item from the
> list,
> I want to refresh the table (or page?) and make the
> results table disappear before user hit search
> button
> again. I have no idea to do this. Can anyone give
> some
> thoughts on this?
> 
> regards,
> 
> rick
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select problem

2003-07-22 Thread Ionel Gardais
hi,

I tryed this way
The selected items are not highlighted when the page is redisplayed
ionel

Prashanth.S wrote:

Hi,
I think that in the reset method in ur action form u need to make the selected array 
null[selected array is the array inside ur actionform that gets filled in request 
scope when u select any items in the list]so that the same array is not submitted 
again and again..
HTH
Prashanth




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:select problem

2003-07-22 Thread Prashanth.S
Hi,
I think that in the reset method in ur action form u need to make the selected array 
null[selected array is the array inside ur actionform that gets filled in request 
scope when u select any items in the list]so that the same array is not submitted 
again and again..
HTH
Prashanth

Ionel Gardais <[EMAIL PROTECTED]> wrote:
Hi,

I have a small problem with html:select tag.

I use the same JSP for creating a editing a form.
Everything works well for the creation step but when I edit the form, 
all fields are perfectly filled but the select list doesn't display the 
previously selected items.

I observerved the same behavior when the validate method detects an 
error and displays the error message : the selected items are gone.

Any ideas where the problem come from ?


thanks,
ionel


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: html:select

2003-07-15 Thread Dhruva B. Reddy
Use the "name" attribute on "html:select" to refer to a bean which
contains this property (as described by the "property" attribute).

--- Sloan Seaman <[EMAIL PROTECTED]> wrote:
> If a user selects something from a html:select field and the next
> time the pages loads I want to get the value that they selected, how
> do I go about do this?
> 
> I know that if I used  struts would select the correct
> option for me, but in my case the  tags get populated
> everytime by javascript so I need to get the selected option value
> from the bean that was set by struts...
> 
> Thanks!!
> 
> --
> Sloan
> 
> 
>

> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
>



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select tag

2003-05-30 Thread Steve Raeburn
If you have 15 *different* lists then, yes, you will need to store them all.
But if 2 or more lists share the same options then you will only need one
collection. On the example page, there are two lists of books, but they both
get their options from the same request scope collection.

Also, you might not need to place your collections in the request each time.
Depending on the list, you might be able to use the session or application
scopes. For example, a list that all users share and does not change could
be placed in the application scope at application startup.

Steve


> -Original Message-
> From: Kommana, Sridhar [mailto:[EMAIL PROTECTED]
> Sent: May 29, 2003 1:53 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: html:select tag
>
>
> your link explains very detail.
> if i have 15 drop downs on a page means i need to give 15
> different request.setAttributes
> PrepareOptionsAction has so many request.setAttribute things.
> is any better way doing this with html:options.
>
> Sri
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select tag

2003-05-30 Thread Kommana, Sridhar
your link explains very detail.
if i have 15 drop downs on a page means i need to give 15 different 
request.setAttributes 
PrepareOptionsAction has so many request.setAttribute things.
is any better way doing this with html:options.

Sri

-Original Message-
From: Steve Raeburn [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 12:05 PM
To: Struts Users Mailing List
Subject: RE: html:select tag


Try this. http://bobcat.webappcabaret.net/ninsky/index.jsp
I'd appreciate feedback if you find it useful (or not).

Steve

> -Original Message-
> From: Shriyan Sanmuganathan [mailto:[EMAIL PROTECTED]
> Sent: May 29, 2003 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: html:select tag
> 
> 
> I'm new to Struts , can some one give me a good example of how to 
> use html:select tag with options. 
> 
> 
> Thanks
> Shriyan
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select tag

2003-05-30 Thread Steve Raeburn
Try this. http://bobcat.webappcabaret.net/ninsky/index.jsp
I'd appreciate feedback if you find it useful (or not).

Steve

> -Original Message-
> From: Shriyan Sanmuganathan [mailto:[EMAIL PROTECTED]
> Sent: May 29, 2003 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: html:select tag
> 
> 
> I'm new to Struts , can some one give me a good example of how to 
> use html:select tag with options. 
> 
> 
> Thanks
> Shriyan
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select tag

2003-05-30 Thread James Mitchell
Take a look at the struts-example, there is a demonstration there.

--
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org



- Original Message -
From: "Shriyan Sanmuganathan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 12:59 PM
Subject: html:select tag


I'm new to Struts , can some one give me a good example of how to use
html:select tag with options.


Thanks
Shriyan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select / html:options

2003-05-27 Thread Kandi Potter
I'm just learning here as well.but that is what worked for me.   I actually store 
the vectors in a CollectionForm with the two vectors as members.  I don't know if this 
was the most graceful way to handle the problem, but it worked for me.  I have 
something like this:

I used a CollectionForm for the same purpose as you would like to.  I have several 
drop-down selections so I just create a CollectionForm object for each, and populate 
the labels and values from my business object, which I'm sure you have done already.

also, for state management, the collectionForms are stored in a transaction to be 
re-used during the same session.  This way I can grab them for any action where I need 
the same drop-down list.   

public class CollectionForm   implements Serializable {
private Vector labels;
private Vector values;

...

public class IncidentForm extends ActionForm implements Serializable {
public Vector getUnsafeLabels(){
return CollectionForm.getLabels();

}

public Vector getUnsafeValues(){
return CollectionForm.getValues();
   
}
...



-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:49 AM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm 
bean.




 







-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options


I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.

I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.

How can this be done.

Thanx a lot.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:select / html:options

2003-05-27 Thread Denis Avdic
use optionsCollection tag

property:  name of the collection in the  form Bean
label :  The property of the bean within the collection which represents 
the label to be rendered for each option. (ie. Name)
value: The property of the bean within the collection which represents 
the value to be rendered for each option. (ie ID)

thus:







Abhinav (Cognizant) wrote:

That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.
-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options
I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm bean.




    
   





-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options
I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.
I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.
How can this be done.

Thanx a lot.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***
 



This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not the 
intended recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited and 
may be unlawful.

 Visit us at http://www.cognizant.com

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: html:select / html:options

2003-05-27 Thread Abhinav (Cognizant)
That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm 
bean.




 







-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options


I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.

I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.

How can this be done.

Thanx a lot.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

  Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: html:select

2003-04-03 Thread Niesen, Nathan
Use the value attribute on the html:select tag.

 -Original Message-
From:   Jesse Vitrone [mailto:[EMAIL PROTECTED] 
Sent:   Wednesday, April 02, 2003 1:47 PM
To: [EMAIL PROTECTED]
Subject:html:select

I'm pretty new to the jsp tag stuff, and I need to do something that I would
think is pretty common, but I can't seem to do it without resorting to
scriptlets.
 
I have an Address, which has a String state on it.
I have a Collection of States which have an int id, and String name on them.
 
How can I generate a select list that defaults to the value that matches the
state on my Address?
 
Seems like this would be pretty common, but I can't find it anywhere :(
 
Thanks in advance,
Jesse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:select problems

2003-02-10 Thread Mike Ash
Never mind i was being stupid

-Original Message-
From: Mike Ash [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 10:22 AM
To: Struts-User (E-mail)
Subject: html:select problems


If I do something like this





I get an error that the iterator can't be created, however, this works with
the same objects


  
 
   


so it appears that the select tag can't handle property="value(sometext)" 

Can anyone confirm this?



RE: html:select validation

2003-02-05 Thread Sri Sankaran
Since none of the items in your  collection is (or can be) null [*], 
even if the user does not make a selection, there is a default value and therefore the 
validation is successful.  

You could try to add a dummy default value (such as "Please select one") and use a 
NOTEQUAL test.

Sri

* You may run into a problem with setting a null option value.  See 
http://marc.theaimsgroup.com/?l=struts-user&m=104438878004590&w=2

-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 05, 2003 9:27 AM
To: 'Struts Users Mailing List'
Subject: html:select validation


Hi,

I have an html:select with multiple option as follows.


   


My validator fails to validate the above one for "required". If I leave the selection 
box without selecting and submit the form, Validator doesn't complain. Pls let me know 
if anyone has a clue why this is happening.

My validation.xml has:



 

Thanks,
Suresh


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: html:select validation

2003-02-05 Thread pqin
I suspect that you have to override reset method in your ActionForm class to
set default value of checkbox.

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]] 
Sent: February 5, 2003 9:27 AM
To: 'Struts Users Mailing List'
Subject: html:select validation

Hi,

I have an html:select with multiple option as follows.


  


My validator fails to validate the above one for "required". If I leave
the selection box without selecting and submit the form, Validator
doesn't complain. Pls let me know if anyone has a clue why this is
happening.

My validation.xml has:



 

Thanks,
Suresh




Re: html:select and html:options

2003-01-03 Thread Jose Luis
RE: html:select and html:optionsnow i have the page www.husted.com/struts/, please 
could you guideme where exactly or moreless?

Thanks
p.s happy new year
  - Original Message - 
  From: Sterin, Ilya 
  To: 'Jose Luis ' ; 'Struts Users Mailing List ' 
  Sent: Friday, January 03, 2003 7:08 PM
  Subject: RE: html:select and html:options


  You can use the LabelValueBean class for that, see www.husted.com for examples. 

  Ilya 

  -Original Message- 
  From: Jose Luis 
  To: Struts Users Mailing List 
  Sent: 1/3/03 11:04 AM 
  Subject: html:select and html:options 

  hi everyone, i have a page whit the following code: 

   

   

   

  where sectorCompany is an ArrayList that i built prior to view the jsp. 
  My problem is: 

  what i really need is to pass to the result action the value which 
  represents the labels that contains the SectorCompany ArrayList, so, How 
  i can build a select that shows labels but that also stores the id 
  (longs representing registers in a RDBMS) to pass this id? 



  Thank everybody in advance. 

  ps. If someOne knows a subject in the mailing list which already solves 
  this plese redirectme to it. 

  José Luis 







RE: html:select and html:options

2003-01-03 Thread Sterin, Ilya
You can use the LabelValueBean class for that, see www.husted.com for
examples.

Ilya

-Original Message-
From: Jose Luis
To: Struts Users Mailing List
Sent: 1/3/03 11:04 AM
Subject: html:select and html:options

hi everyone, i have a page whit the following code:







where sectorCompany is an ArrayList that i built prior to view the jsp.
My problem is:

what i really need is to pass to the result action the value which
represents the labels that contains the SectorCompany ArrayList, so, How
i can build a select that shows labels but that also stores the id
(longs representing registers in a RDBMS) to pass this id?


Thank everybody in advance.

ps. If someOne knows a subject in the mailing list which already solves
this plese redirectme to it.

José Luis






RE: html:select woes

2002-12-21 Thread Mohan Radhakrishnan
Hi,
We tried using struts tags like that. I am sure it will work but
JSTL/Struts-EL makes things more simple like this.


 
  



 It makes complex things straightforward.

Mohan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 5:15 AM
To: [EMAIL PROTECTED]
Subject: html:select woes


Hi all,

I'm trying to figure out how to use the html:select tag and am having no
luck.  When I execute the jsp, I'm getting "Cannot find bean under name
org.apache.struts.taglib.html.BEAN."  I've looked at the docs and the
html-select.jsp example but can't see what's different about my case.  My
struts-config file has this:



and this:





I've tried with and without the "input" attr.  My LoggersForm class extends
ActionForm and has one String property called "newLevel" that's null by
default.  I also have a reset() method that nulls-out newLevel.  My jsp does
this:




One

Submit


The only relevant difference I can see between this and the html-select.jsp
example is that my jsp is under /jsp, but I've tried it both ways and it
doesn't seem to matter.

I'd appreciate a clue.

thanks

john

john gregg
Wells Fargo Service Corporation
Minneapolis, MN

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select woes

2002-12-20 Thread John . E . Gregg
I see now that my opening form tag ended with a "/".  Duh.  What a
difference a day makes.

thanks

john

-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 5:55 PM
To: Struts Users Mailing List
Subject: RE: html:select woes


You need to have an "html:form" element.  It needs to encapsulate your
"select" and "submit" elements.  It needs to specify your action path. Look
at the "struts-exercise-taglib" and numerous other examples for building a
form with form elements.

> -Original Message-
> From: [EMAIL PROTECTED]
> 
> Hi all,
> 
> I'm trying to figure out how to use the html:select tag and am having 
> no luck.  When I execute the jsp, I'm getting "Cannot find bean
> under name
> org.apache.struts.taglib.html.BEAN."  I've looked at the docs and the
> html-select.jsp example but can't see what's different about 
> my case.  My
> struts-config file has this:
> 
> 
> 
> and this:
> 
>  type="com.wfsc.cam.actions.HelloAction" 
> name="loggersForm" 
> input="/jsp/loggers.jsp" 
> validate="false"
> scope="session">
>   
> 
> 
> I've tried with and without the "input" attr.  My LoggersForm class 
> extends ActionForm and has one String property called "newLevel"
> that's null by
> default.  I also have a reset() method that nulls-out 
> newLevel.  My jsp does
> this:
> 
> 
>  class="com.wfsc.cam.ui.LoggersForm"/> 
>   value="one">One 
> Submit
> 
> 
> The only relevant difference I can see between this and the 
> html-select.jsp example is that my jsp is under /jsp, but I've tried 
> it both ways and it
> doesn't seem to matter.
> 
> I'd appreciate a clue.
> 
> thanks
> 
> john

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select woes

2002-12-19 Thread Karr, David
You need to have an "html:form" element.  It needs to encapsulate your
"select" and "submit" elements.  It needs to specify your action path.
Look at the "struts-exercise-taglib" and numerous other examples for
building a form with form elements.

> -Original Message-
> From: [EMAIL PROTECTED]
> 
> Hi all,
> 
> I'm trying to figure out how to use the html:select tag and 
> am having no
> luck.  When I execute the jsp, I'm getting "Cannot find bean 
> under name
> org.apache.struts.taglib.html.BEAN."  I've looked at the docs and the
> html-select.jsp example but can't see what's different about 
> my case.  My
> struts-config file has this:
> 
> 
> 
> and this:
> 
>  type="com.wfsc.cam.actions.HelloAction" 
> name="loggersForm" 
> input="/jsp/loggers.jsp" 
> validate="false"
> scope="session">
>   
> 
> 
> I've tried with and without the "input" attr.  My LoggersForm 
> class extends
> ActionForm and has one String property called "newLevel" 
> that's null by
> default.  I also have a reset() method that nulls-out 
> newLevel.  My jsp does
> this:
> 
> 
>  class="com.wfsc.cam.ui.LoggersForm"/>
> 
> One
> 
> Submit
> 
> 
> The only relevant difference I can see between this and the 
> html-select.jsp
> example is that my jsp is under /jsp, but I've tried it both 
> ways and it
> doesn't seem to matter.
> 
> I'd appreciate a clue.
> 
> thanks
> 
> john
> 
> john gregg
> Wells Fargo Service Corporation
> Minneapolis, MN
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Html:select doesn't select correct element..

2002-11-21 Thread Beeson, Ashley
Yes, I've checked this by printing out the value in the JSP and cross
referencing it with the html  in the source
generated. I can only assume that for some reason on that one page the
comparison is failing. I have no idea why.

I've checked that there are no spaces / hidden control characters that might
throw it off as well.

Ash

-Original Message-
From: edgar [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2002 12:57
To: 'Struts Users Mailing List'
Subject: RE: Html:select doesn't select correct element..


Stupid question, is the value supplied by the form exactly equal to one
of the values supplied by the collection?

Edgar
-Original Message-
From: Beeson, Ashley [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 21, 2002 7:33 AM
To: '[EMAIL PROTECTED]'
Subject: Html:select doesn't select correct element..


I have a problem with html:select not setting selected="selected" for
the correct item in a list of options. The weird thing is that it works
fine for all bar one of my pages.
 
I have checked that the property being passed in exists in the list of
options using a bean:write just above the html:select statement.
channelCommodity has the value of one of the elements 'code' in our
collection. 
 
A snippet of the code I'm using which doesn't work properly:
 




 
A snippet of the code I'm using which works correctly on another jsp
page:
 




 
I should point out that there are no errors with the pages displayed
apart from the missing selected="selected" for the element that should
be selected.
 
This is using struts 1.0.2 and running on tomcat 4.0.4.
 
Any suggestions?
 
Cheers

Ash Beeson - IT Consultant
email:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
 


This e-mail and any attachment is for authorised use by the intended
recipient(s) only.  It may contain proprietary material, confidential
information and/or be subject to legal privilege.  It should not be
copied, disclosed to, retained or used by, any other party.  If you are
not an intended recipient then please promptly delete this e-mail and
any attachment and all copies and inform the sender.  Thank you.


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only.  It may contain proprietary material, confidential information and/or be subject 
to legal privilege.  It should not be copied, disclosed to, retained or used by, any 
other party.  If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender.  Thank you.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Html:select doesn't select correct element..

2002-11-21 Thread edgar
Stupid question, is the value supplied by the form exactly equal to one
of the values supplied by the collection?

Edgar
-Original Message-
From: Beeson, Ashley [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 21, 2002 7:33 AM
To: '[EMAIL PROTECTED]'
Subject: Html:select doesn't select correct element..


I have a problem with html:select not setting selected="selected" for
the correct item in a list of options. The weird thing is that it works
fine for all bar one of my pages.
 
I have checked that the property being passed in exists in the list of
options using a bean:write just above the html:select statement.
channelCommodity has the value of one of the elements 'code' in our
collection. 
 
A snippet of the code I'm using which doesn't work properly:
 




 
A snippet of the code I'm using which works correctly on another jsp
page:
 




 
I should point out that there are no errors with the pages displayed
apart from the missing selected="selected" for the element that should
be selected.
 
This is using struts 1.0.2 and running on tomcat 4.0.4.
 
Any suggestions?
 
Cheers

Ash Beeson - IT Consultant
email:   [EMAIL PROTECTED]
 


This e-mail and any attachment is for authorised use by the intended
recipient(s) only.  It may contain proprietary material, confidential
information and/or be subject to legal privilege.  It should not be
copied, disclosed to, retained or used by, any other party.  If you are
not an intended recipient then please promptly delete this e-mail and
any attachment and all copies and inform the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:select and collections

2002-11-12 Thread Susan Bradeen
Gus,

I don't think you need the "name" attribute in the  tag. 

Susan Bradeen

On 11/12/2002 03:06:47 PM Gus Delgado wrote:

> I declare a tag in my jsp like this
> 
>  labelProperty="label"/>
> 
> 
> and my action for pre population goes something like this
> 
> Collection productTypes = getProductTypes(results);
> session.setAttribute("productTypes", productTypes);
> 
> I'm getting an error saying that the productTypes bean does not exist?
> any ideas
> 
> 
> 
> --
> To unsubscribe, e-mail: 

> For additional commands, e-mail: 

> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:select question

2002-11-11 Thread Andreas Langmann
> 
> Struts-el is a good solution for this.
> 
>labelProperty="value"/> 
> 

Hmm... thats great! Thanks for advice!

Andreas

-- 
Dipl. Ing. (BA) Andreas Langmann
Software Developer

ISB AG 
Karlstr. 52-54   
76133 Karlsruhe

Telefon: +49 (0)721/82800-0
Telefax: +49 (0)721/82800-82

Email: [EMAIL PROTECTED]
Internet: http://www.isb-ag.de

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select question

2002-11-11 Thread edgar
Struts-el is a good solution for this.  

   

-Original Message-
From: Andreas Langmann [mailto:andreas.langmann@;isb-ag.de] 
Sent: Monday, November 11, 2002 4:15 AM
To: 'Struts Users Mailing List'
Subject: html:select question


Hello,

i use a selectbox... the variables sb_lx and sb_l are inside the
formbean. 
With the attached jsp-code i need to put the object sb_l from formbean
into context

request.setAttribute("sb_l", myform.getSb_l());


  

So it works fine... but is there a way to do it without the
setAttribute?

Tnx,

Andreas

-- 
Dipl. Ing. (BA) Andreas Langmann
Software Developer

ISB AG 
Karlstr. 52-54   
76133 Karlsruhe

Telefon: +49 (0)721/82800-0
Telefax: +49 (0)721/82800-82

Email: [EMAIL PROTECTED]
Internet: http://www.isb-ag.de

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:select / option defaultSelected or selected

2002-10-14 Thread deepank

Hi
set the value of the property in your action class, that is prepopulate the
form bean, the value that u give to the property will get selected
automagically in your JSP

Deepank
- Original Message -
From: "Cohan, Sean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 8:07 AM
Subject: html:select / option defaultSelected or selected


> Is there any way I can specify the defaultSelected or selected property
for
> an html:select or an html:option?  I use the html:options to populate the
> options with an ArrayList of beans.  I need to also specify the value that
> should be initially selected.
>
> Thanks.
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select / option defaultSelected or selected

2002-10-14 Thread Shashikiran M

For you to initialize the list. You should be knowing the initial value. Provide this 
initial value, in the FormBean, to the property associated with the  tag.

-Original Message-
From: Cohan, Sean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:08 AM
To: '[EMAIL PROTECTED]'
Subject: html:select / option defaultSelected or selected


Is there any way I can specify the defaultSelected or selected property for
an html:select or an html:option?  I use the html:options to populate the
options with an ArrayList of beans.  I need to also specify the value that
should be initially selected. 

Thanks.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select and collection display

2002-08-28 Thread Rea, Ron

Hi Paul,

I apologize if this reply is posted twice, our mailserver had problems while
sending this out originally.  

I think that the client-side javascript approach would work well for our
situation here.  Ideally, I don't want to have to go to the server whenever
the user clicks a selection from the drop-down.  Thanks in advance for your
help and example!

Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 11:59 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Hi Ron, I saw that somebody else had replied and had given you (somewhat)
conflicting, but still good, advice regarding this.  

An important question is this:  do you want to have the page refresh from
the server when a user clicks on the selection in the drop-down box (very
annoying for the user!), or do you want to be able to handle this entirely
on the client-side in the browser?  

A client-side solution is preferable, IMHO, if you can get away with it,
because it will be much more responsive to the user.  There are two
tradeoffs with the client-side approach, however.  One is that you need to
write client-side javascript, and your requirements may dictate that you
cannot do this (i.e. if you have to deal with users who have javascript
disabled, or browsers that don't support javascript).  The second tradeoff
comes if you have a lot of data, because for the client-side solution to
work you need to populate a javascript array(s) with every possible value of
therapyCode and therapyDesc, and write it all to the html page, every time
someone requests the page from the server.  The cost of doing this
processing for every page hit may make this unfeasible (esp. in a
high-volume website)...you can also run into cases where the amount of data
is so big that writing it all to a javascript array on the page makes the
page too large to be practical.

So, before I offer any more advice, first tell me if you think you'd want to
do this with a client-side or server-side approach!

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 28, 2002 2:38 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select and collection display


Paul,

Thanks for the reply!  I tried to get an example of a JSP using "onchange",
but have not been able to come up with a complete example which also uses
the  tag.  It would sure be a great help if you could point me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll want
to use the onClick or onChange javascript event handlers of the html:select
tag.  You'll need to write some javascript that can identify the therapyCode
and display the matching therapyDesc.  I hope that's a start in the right
direction for you, and I'm not telling you something you already know...if
you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



RE: html:select and collection display

2002-08-28 Thread wbchmura

Hi, I agree...

My solution was geared for an application with four levels of selections 
resulting in many many many combinations falling under the latter of the 
options below.

I would agree on client side if you can get away with it...



-Original Message-
From: Paul.Galbraith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 2:59 PM
To: struts-user
Subject: RE: html:select and collection display


Hi Ron, I saw that somebody else had replied and had given you 
(somewhat) conflicting, but still good, advice regarding this.  

An important question is this:  do you want to have the page refresh 
from the server when a user clicks on the selection in the drop-down box 
(very annoying for the user!), or do you want to be able to handle this 
entirely on the client-side in the browser?  

A client-side solution is preferable, IMHO, if you can get away with it, 
because it will be much more responsive to the user.  There are two 
tradeoffs with the client-side approach, however.  One is that you need 
to write client-side javascript, and your requirements may dictate that 
you cannot do this (i.e. if you have to deal with users who have 
javascript disabled, or browsers that don't support javascript).  The 
second tradeoff comes if you have a lot of data, because for the 
client-side solution to work you need to populate a javascript array(s) 
with every possible value of therapyCode and therapyDesc, and write it 
all to the html page, every time someone requests the page from the 
server.  The cost of doing this processing for every page hit may make 
this unfeasible (esp. in a high-volume website)...you can also run into 
cases where the amount of data is so big that writing it all to a 
javascript array on the page makes the page too large to be practical.

So, before I offer any more advice, first tell me if you think you'd 
want to do this with a client-side or server-side approach!

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 28, 2002 2:38 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select and collection display


Paul,

Thanks for the reply!  I tried to get an example of a JSP using 
"onchange",
but have not been able to come up with a complete example which also 
uses
the  tag.  It would sure be a great help if you could point 
me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll 
want
to use the onClick or onChange javascript event handlers of the 
html:select
tag.  You'll need to write some javascript that can identify the 
therapyCode
and display the matching therapyDesc.  I hope that's a start in the 
right
direction for you, and I'm not telling you something you already 
know...if
you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I 
can't
figure it out for the life of me.  I am displaying a drop-down within a 
JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode 
is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select and collection display

2002-08-28 Thread Galbraith, Paul

Hi Ron, I saw that somebody else had replied and had given you (somewhat) conflicting, 
but still good, advice regarding this.  

An important question is this:  do you want to have the page refresh from the server 
when a user clicks on the selection in the drop-down box (very annoying for the 
user!), or do you want to be able to handle this entirely on the client-side in the 
browser?  

A client-side solution is preferable, IMHO, if you can get away with it, because it 
will be much more responsive to the user.  There are two tradeoffs with the 
client-side approach, however.  One is that you need to write client-side javascript, 
and your requirements may dictate that you cannot do this (i.e. if you have to deal 
with users who have javascript disabled, or browsers that don't support javascript).  
The second tradeoff comes if you have a lot of data, because for the client-side 
solution to work you need to populate a javascript array(s) with every possible value 
of therapyCode and therapyDesc, and write it all to the html page, every time someone 
requests the page from the server.  The cost of doing this processing for every page 
hit may make this unfeasible (esp. in a high-volume website)...you can also run into 
cases where the amount of data is so big that writing it all to a javascript array on 
the page makes the page too large to be practical.

So, before I offer any more advice, first tell me if you think you'd want to do this 
with a client-side or server-side approach!

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 28, 2002 2:38 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select and collection display


Paul,

Thanks for the reply!  I tried to get an example of a JSP using "onchange",
but have not been able to come up with a complete example which also uses
the  tag.  It would sure be a great help if you could point me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll want
to use the onClick or onChange javascript event handlers of the html:select
tag.  You'll need to write some javascript that can identify the therapyCode
and display the matching therapyDesc.  I hope that's a start in the right
direction for you, and I'm not telling you something you already know...if
you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select and collection display

2002-08-28 Thread wbchmura


This is similar to selecting a state, then town, etc...

I resubmit after changing the action value so the servlet knows what to 
do next...


Here is the HTML code for it




  Select Company
  
Select a company

  

Here is the javascript it runs





function selectChange(txt) {
   document.FormDrillDownReport.elements[0].value = 'changed' + txt;
   document.FormDrillDownReport.submit();
}



-Original Message-
From: rear [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 2:38 PM
To: struts-user
Subject: RE: html:select and collection display


Paul,

Thanks for the reply!  I tried to get an example of a JSP using 
"onchange",
but have not been able to come up with a complete example which also 
uses
the  tag.  It would sure be a great help if you could point 
me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll 
want
to use the onClick or onChange javascript event handlers of the 
html:select
tag.  You'll need to write some javascript that can identify the 
therapyCode
and display the matching therapyDesc.  I hope that's a start in the 
right
direction for you, and I'm not telling you something you already 
know...if
you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I 
can't
figure it out for the life of me.  I am displaying a drop-down within a 
JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode 
is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select and collection display

2002-08-28 Thread Rea, Ron

Paul,

Thanks for the reply!  I tried to get an example of a JSP using "onchange",
but have not been able to come up with a complete example which also uses
the  tag.  It would sure be a great help if you could point me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll want
to use the onClick or onChange javascript event handlers of the html:select
tag.  You'll need to write some javascript that can identify the therapyCode
and display the matching therapyDesc.  I hope that's a start in the right
direction for you, and I'm not telling you something you already know...if
you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



RE: html:select and collection display

2002-08-28 Thread Galbraith, Paul

Ron, where exactly are you wanting to display the therapyDesc?  You'll want to use the 
onClick or onChange javascript event handlers of the html:select tag.  You'll need to 
write some javascript that can identify the therapyCode and display the matching 
therapyDesc.  I hope that's a start in the right direction for you, and I'm not 
telling you something you already know...if you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Html:select tag does not set the options

2002-06-25 Thread Sean Richards

I would suggest creating your own tag...
I am not sure if this is the best approach, but it seems to work well 
for me

If you have your own tagand this tag returns your ArrayList of 
strings wrapped in  tags it will work

so you would have something like





where you have a tag that is mapped with yourCustomTag.

Hope this helps

Sean


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

I tested it with 6.2 and the style is not apparent until after a select is
made first.  Oh well, I'm already using it for an IE-centric app I'm writing
now.  :-)

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:04 PM

It also works in Netscape. I just tried it.

-Richard

At 12:36 PM 5/1/2002 -0400, you wrote:
>works at least in IE. But what I have is a multiple dropdown box with
>pre-selected options
>
>
>
>   multiple="true" size="5" style="font-size:12px;"
>onchange="updateCounter()">
> property="contactTypesList"
>type="com.contact.ContactTypeResultData">
>
>   value="true">
> property="participantTypeDescription"/>" selected>
> property="participantTypeDescription"/>
> 
>   
>   property="selected" value="true">
> property="participantTypeDescription"/>">
> property="participantTypeDescription"/>
>         
>   
>
>
> 
>   
>
>
>
>
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 12:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: html:select help!
>
>
>Does this actually work (at least in IE)?
>
>-Original Message-
>From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:58 AM
>
>For your number 2. Inside the iterator you can have something like this
>
>   
> 
>   
> ">
> 
> 
>   
>   
> ">
>   
> 
>   
> 
>   
>
>
>8*)
>
>And it's not Friday yet. :(
>
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:47 AM
>To: 'Struts Users Mailing List'
>Subject: RE: html:select help!
>
>
>Two problems:
>
>1.  It doesn't work correctly with Netscape; probably not for many other
>browsers as well.
>
>2.  What would be the point even with IE for a Struts select with an
>iterator?  All the options' styles would be the same.
>
>Mark
>
>-Original Message-
>From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:28 AM
>
>Not sure how this applies to the html:select tag, but in html:
>
> 
>
> 
> United States of America
> 
>
> Afghanistan, Islamic State of
>
> 
>
>  Albania
>
> 
>
> 
>
>Change the style as you like.
>
>Cheers,
>
>Tony
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:10 AM
>To: 'Struts Users Mailing List'
>Subject: RE: html:select help!
>
>
>You can't.
>
>-Original Message-
>From: Muthukumar [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 5:45 AM
>To: [EMAIL PROTECTED]
>Subject: html:select help!
>
>
>Hi
>
>How to make one or more option of select object bold.
>
>
>
>Thanks and Regards
>Muthukumar .S
>Mysore.
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Richard Yee

It also works in Netscape. I just tried it.

-Richard

At 12:36 PM 5/1/2002 -0400, you wrote:
>works at least in IE. But what I have is a multiple dropdown box with
>pre-selected options
>
>
>
>   multiple="true" size="5" style="font-size:12px;"
>onchange="updateCounter()">
> property="contactTypesList"
>type="com.contact.ContactTypeResultData">
>
>   value="true">
> property="participantTypeDescription"/>" selected>
> property="participantTypeDescription"/>
> 
>   
>   property="selected" value="true">
> property="participantTypeDescription"/>">
> property="participantTypeDescription"/>
>         
>   
>
>
> 
>   
>
>
>
>
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 12:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: html:select help!
>
>
>Does this actually work (at least in IE)?
>
>-Original Message-
>From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:58 AM
>
>For your number 2. Inside the iterator you can have something like this
>
>   
> 
>   
>     ">
> 
> 
>   
>   
> ">
>   
> 
>   
> 
>   
>
>
>8*)
>
>And it's not Friday yet. :(
>
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:47 AM
>To: 'Struts Users Mailing List'
>Subject: RE: html:select help!
>
>
>Two problems:
>
>1.  It doesn't work correctly with Netscape; probably not for many other
>browsers as well.
>
>2.  What would be the point even with IE for a Struts select with an
>iterator?  All the options' styles would be the same.
>
>Mark
>
>-Original Message-
>From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:28 AM
>
>Not sure how this applies to the html:select tag, but in html:
>
> 
>
> 
> United States of America
> 
>
> Afghanistan, Islamic State of
>
> 
>
>  Albania
>
> 
>
> 
>
>Change the style as you like.
>
>Cheers,
>
>Tony
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 11:10 AM
>To: 'Struts Users Mailing List'
>Subject: RE: html:select help!
>
>
>You can't.
>
>-Original Message-
>From: Muthukumar [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 5:45 AM
>To: [EMAIL PROTECTED]
>Subject: html:select help!
>
>
>Hi
>
>How to make one or more option of select object bold.
>
>
>
>Thanks and Regards
>Muthukumar .S
>Mysore.
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

That's pretty cool!  It never occurred to me to use  inside an
interator on an . Just goes to further prove that TAMTOWTDI
(old Perl saying).

Mark

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:36 PM

works at least in IE. But what I have is a multiple dropdown box with
pre-selected options



  


  
" selected>


  
  
">


  



  





-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

  

  
">


  
  
">
  

  

  


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:




United States of America


Afghanistan, Islamic State of



 Albania





Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Leonardo Maciel

works at least in IE. But what I have is a multiple dropdown box with
pre-selected options



  


  
" selected>


  
  
">


  



  





-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

  

  
">


  
  
">
  

  

  


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:




United States of America


Afghanistan, Islamic State of



 Albania





Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

Does this actually work (at least in IE)?

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:58 AM

For your number 2. Inside the iterator you can have something like this

  

  
">


  
  
">
  

  

  


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:




United States of America


Afghanistan, Islamic State of



 Albania





Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Leonardo Maciel

For your number 2. Inside the iterator you can have something like this

  

  
">


  
  
">
  

  

  


8*)  

And it's not Friday yet. :(


-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:47 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:




United States of America


Afghanistan, Islamic State of



 Albania





Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

Two problems:

1.  It doesn't work correctly with Netscape; probably not for many other
browsers as well.

2.  What would be the point even with IE for a Struts select with an
iterator?  All the options' styles would be the same.

Mark

-Original Message-
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:28 AM

Not sure how this applies to the html:select tag, but in html:




United States of America


Afghanistan, Islamic State of



 Albania





Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Mannem, Taati

An addendum
The code that Is en was for the whole select ..We do not have the style
class fo options.. 

Regards,
Taati

> -Original Message-
> From: Mannem, Taati 
> Sent: Wednesday, May 01, 2002 11:34 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: html:select help!
> 
> Muthu,
>   its possible by the style sheet  but as Jim pointed out it might
> affect ur look and feel of the listbox.
> Create a styleclass and give the following property 
> 
> "font-weight: bold"
> 
> and refer top t his style class using this syntax in ur html:select tag
> 
> Try this and it will work..Lemme know
> Good Luck
> 
> Regards,
> Taati
>   -Original Message-
>   From:   Muthukumar [SMTP:[EMAIL PROTECTED]]
>   Sent:   Wednesday, May 01, 2002 5:45 AM
>   To: [EMAIL PROTECTED]
>   Subject:html:select help!
> 
>   Hi
>
>   How to make one or more option of select object bold.
>
>
>
>   Thanks and Regards
>   Muthukumar .S
>   Mysore.
> << File: ATT1065227.txt >> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Mannem, Taati

Muthu,
its possible by the style sheet  but as Jim pointed out it might
affect ur look and feel of the listbox.
Create a styleclass and give the following property 

"font-weight: bold"

and refer top t his style class using this syntax in ur html:select tag

Try this and it will work..Lemme know
Good Luck

Regards,
Taati
> -Original Message-
> From: Muthukumar [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 5:45 AM
> To:   [EMAIL PROTECTED]
> Subject:  html:select help!
> 
> Hi
>  
> How to make one or more option of select object bold.
>  
>  
>  
> Thanks and Regards
> Muthukumar .S
> Mysore.
>   << File: ATT1065227.txt >> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select help!

2002-05-01 Thread Hardee, Tony

Not sure how this applies to the html:select tag, but in html:




United States of America


Afghanistan, Islamic State of



 Albania





Change the style as you like.

Cheers,

Tony

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select help!


You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread James Mitchell

Muthukumar, you are kidding right?



Choices

1. Write your own applet in Java
2. Write your own Web Control in VC++ or VB
3. Submit a request to Microsoft to have this added as a patch to IE4, IE5,
and IE6.
   Be sure to copy Netscape on it so they can add it also.
   Oh and don't forget the fine folks at W3C to modify the html specs




What you are wanting is not possible with standard browser controls.
Although I have seen some reallyinteresting (for lack of a better word)
things done with style sheets, but that affects the entire control.

Good luck!
JM




> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 11:10 AM
> To: 'Struts Users Mailing List'
> Subject: RE: html:select help!
>
>
> You can't.
>
> -Original Message-
> From: Muthukumar [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 5:45 AM
> To: [EMAIL PROTECTED]
> Subject: html:select help!
>
>
> Hi
>
> How to make one or more option of select object bold.
>
>
>
> Thanks and Regards
> Muthukumar .S
> Mysore.
>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select help!

2002-05-01 Thread Galbreath, Mark

You can't.

-Original Message-
From: Muthukumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:45 AM
To: [EMAIL PROTECTED]
Subject: html:select help!


Hi
 
How to make one or more option of select object bold.
 
 
 
Thanks and Regards
Muthukumar .S
Mysore.
 




RE: html:select how to use it?

2002-04-25 Thread Galbreath, Mark

ClassCastException, but you know what?  This turned out to be a JRun problem
and I fixed it for another problem I was having.  I wonder if it fixed it
for the Collections iterator of options as well?  I'll test and let you
know.

Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 12:19 PM
To: Struts Users Mailing List
Subject: RE: html:select how to use it?




At last, Mark!!! ;-)

What error did you get with List of beans?  I do that all the time

Dave




"Galbreath, Mark" <[EMAIL PROTECTED]> on 04/24/2002
03:28:44 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'Struts Users Mailing List'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: html:select  how to use it?



Whoa!  I just cut-n-pasted Jim's refactored select into my JSP and it
worked.  Previously I had tried options on a complex object ( a List of
beans) and couldn't get the Collections iterator to parse the bean
properties.  But at least on a simple List of objects, it works great!

Thanks, again, Jim.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate a
> dropdown list:
>
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
>
> 1.  The html:select property is a property in your bean, if one exists.
> 2.  styleId is just the HTML reference if you want to get a value with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that displays.
> 4.  The logic:iterate id is arbitrary but required to reference the list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned to a
> session
> attribute in my action class:
>
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 +
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute(
>  "listExpYears", listExpYears);
>
> 6. In html:option value, remember to cast the List objects to strings as
> Struts is expecting a string.
>
> Easy as pie, eh?
>
> Mark
>
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
>
> > Hi...
> >
> > Could anyone pls tell me how to populate a dropdown list using struts
> > tag libraries.
> >
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> >
> > Kind Regards
> > Roshan
> >
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>








--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select how to use it?

2002-04-25 Thread dhay



At last, Mark!!! ;-)

What error did you get with List of beans?  I do that all the time

Dave




"Galbreath, Mark" <[EMAIL PROTECTED]> on 04/24/2002
03:28:44 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'Struts Users Mailing List'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: html:select  how to use it?



Whoa!  I just cut-n-pasted Jim's refactored select into my JSP and it
worked.  Previously I had tried options on a complex object ( a List of
beans) and couldn't get the Collections iterator to parse the bean
properties.  But at least on a simple List of objects, it works great!

Thanks, again, Jim.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate a
> dropdown list:
>
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
>
> 1.  The html:select property is a property in your bean, if one exists.
> 2.  styleId is just the HTML reference if you want to get a value with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that displays.
> 4.  The logic:iterate id is arbitrary but required to reference the list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned to a
> session
> attribute in my action class:
>
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 +
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute(
>  "listExpYears", listExpYears);
>
> 6. In html:option value, remember to cast the List objects to strings as
> Struts is expecting a string.
>
> Easy as pie, eh?
>
> Mark
>
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
>
> > Hi...
> >
> > Could anyone pls tell me how to populate a dropdown list using struts
> > tag libraries.
> >
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> >
> > Kind Regards
> > Roshan
> >
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>








--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select how to use it?

2002-04-25 Thread Galbreath, Mark

Are you importing java.util.PropertyResourceBundle?

Mark

-Original Message-
From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 11:15 AM
To: 'Struts Users Mailing List'
Subject: RE: html:select how to use it?


Hi Mark, Jim..

I used the html:select tag like you asked me to but it throws me this
exception.. What am I doing wrong..?

java.lang.Error: Fatal Error: missing resource:
java.util.PropertyResourceBundle
at org.apache.jasper.Constants.getString(Constants.java:218)
at
org.apache.jasper.compiler.TagBeginGenerator.convertString(TagBeginGener
ator.java:287)
at
org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGen
erator.java:219)
at
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatem
ents(TagBeginGenerator.java:309)
at
org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.
java:378)
at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.genera
te(JspParseEventListener.java:888)
at
org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEve
ntListener.java:263)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspPa
rseEventListener.java:226)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:238)
at
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:697)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(J
spServlet.java:244)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServle
t.java:261)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)

I have an arraylist(controlNumbers) of an object called transferBox's
and I need to populate the dropdown with a property of transferBox
called controlNumber

Here's my code...


  Select
  

   <%= transferBox.getControlNumber() %>

  


Thanks for your help
Kind Regards
Roshan

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 2:20 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select how to use it?


Thanks, Jim.  I thought about giving that to Rashan as well, but I've
never
been able to get it to work correctly.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate
a
> dropdown list:
> 
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
> 
> 1.  The html:select property is a property in your bean, if one
exists.
> 2.  styleId is just the HTML reference if you want to get a value
with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that
displays.
> 4.  The logic:iterate id is arbitrary but required to reference the
list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned
to a
> session
> attribute in my action class:
> 
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 + 
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute( 
>  "listExpYears", listExpYears);
> 
> 6. In html:option value, remember to cast the List objects to strings
as
> Struts is expecting a string.
> 
> Easy as pie, eh?
> 
> Mark
> 
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
> 
> > Hi...
> > 
> > Could anyone pls tell me how to populate a dropdown list using
struts
> > tag libraries.
> > 
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> > 
> > Kind Regards
> > Roshan
> > 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select how to use it?

2002-04-25 Thread Roshan Paiva

Hi Mark, Jim..

I used the html:select tag like you asked me to but it throws me this
exception.. What am I doing wrong..?

java.lang.Error: Fatal Error: missing resource:
java.util.PropertyResourceBundle
at org.apache.jasper.Constants.getString(Constants.java:218)
at
org.apache.jasper.compiler.TagBeginGenerator.convertString(TagBeginGener
ator.java:287)
at
org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGen
erator.java:219)
at
org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatem
ents(TagBeginGenerator.java:309)
at
org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.
java:378)
at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.genera
te(JspParseEventListener.java:888)
at
org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEve
ntListener.java:263)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspPa
rseEventListener.java:226)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:238)
at
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:697)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(J
spServlet.java:244)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServle
t.java:261)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)

I have an arraylist(controlNumbers) of an object called transferBox's
and I need to populate the dropdown with a property of transferBox
called controlNumber

Here's my code...


  Select
  

   <%= transferBox.getControlNumber() %>

  


Thanks for your help
Kind Regards
Roshan

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 2:20 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select how to use it?


Thanks, Jim.  I thought about giving that to Rashan as well, but I've
never
been able to get it to work correctly.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate
a
> dropdown list:
> 
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
> 
> 1.  The html:select property is a property in your bean, if one
exists.
> 2.  styleId is just the HTML reference if you want to get a value
with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that
displays.
> 4.  The logic:iterate id is arbitrary but required to reference the
list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned
to a
> session
> attribute in my action class:
> 
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 + 
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute( 
>  "listExpYears", listExpYears);
> 
> 6. In html:option value, remember to cast the List objects to strings
as
> Struts is expecting a string.
> 
> Easy as pie, eh?
> 
> Mark
> 
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
> 
> > Hi...
> > 
> > Could anyone pls tell me how to populate a dropdown list using
struts
> > tag libraries.
> > 
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> > 
> > Kind Regards
> > Roshan
> > 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select how to use it?

2002-04-24 Thread Galbreath, Mark

Whoa!  I just cut-n-pasted Jim's refactored select into my JSP and it
worked.  Previously I had tried options on a complex object ( a List of
beans) and couldn't get the Collections iterator to parse the bean
properties.  But at least on a simple List of objects, it works great!

Thanks, again, Jim.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate a
> dropdown list:
> 
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
> 
> 1.  The html:select property is a property in your bean, if one exists.
> 2.  styleId is just the HTML reference if you want to get a value with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that displays.
> 4.  The logic:iterate id is arbitrary but required to reference the list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned to a
> session
> attribute in my action class:
> 
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 + 
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute( 
>  "listExpYears", listExpYears);
> 
> 6. In html:option value, remember to cast the List objects to strings as
> Struts is expecting a string.
> 
> Easy as pie, eh?
> 
> Mark
> 
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
> 
> > Hi...
> > 
> > Could anyone pls tell me how to populate a dropdown list using struts
> > tag libraries.
> > 
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> > 
> > Kind Regards
> > Roshan
> > 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select how to use it?

2002-04-24 Thread Galbreath, Mark

Thanks, Jim.  I thought about giving that to Rashan as well, but I've never
been able to get it to work correctly.

Mark

-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:00 PM

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate a
> dropdown list:
> 
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
> 
> 1.  The html:select property is a property in your bean, if one exists.
> 2.  styleId is just the HTML reference if you want to get a value with,
say
> JavaScript.
> 3.  The first html:option is the default "selected" option that displays.
> 4.  The logic:iterate id is arbitrary but required to reference the list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned to a
> session
> attribute in my action class:
> 
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 + 
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute( 
>  "listExpYears", listExpYears);
> 
> 6. In html:option value, remember to cast the List objects to strings as
> Struts is expecting a string.
> 
> Easy as pie, eh?
> 
> Mark
> 
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
> 
> > Hi...
> > 
> > Could anyone pls tell me how to populate a dropdown list using struts
> > tag libraries.
> > 
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> > 
> > Kind Regards
> > Roshan
> > 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:select how to use it?

2002-04-24 Thread Jim Crossley

Here is Mark's example refactored to use the  tag.


  Year
  


-- Jim

"Galbreath, Mark" <[EMAIL PROTECTED]> writes:

> Here's a simple example of how I retrieve a List of years to populate a
> dropdown list:
> 
> 
>   Year
>   
> 
><%= expYear %>
> 
>   
> 
> 
> 1.  The html:select property is a property in your bean, if one exists.
> 2.  styleId is just the HTML reference if you want to get a value with, say
> JavaScript.
> 3.  The first html:option is the default "selected" option that displays.
> 4.  The logic:iterate id is arbitrary but required to reference the list's
> elements.
> 5.  iterate name is the name of my ArrayList of years that I assigned to a
> session
> attribute in my action class:
> 
>List listExpYears = new ArrayList();
>for( int k = 1; k < 11; k++) {
>  listExpYears.add(( new Integer( 2000 + 
>  Calendar.getInstance().YEAR + k))
>  .toString());
>}
>request.getSession().setAttribute( 
>  "listExpYears", listExpYears);
> 
> 6. In html:option value, remember to cast the List objects to strings as
> Struts is expecting a string.
> 
> Easy as pie, eh?
> 
> Mark
> 
> -Original Message-
> From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 3:17 PM
> 
> > Hi...
> > 
> > Could anyone pls tell me how to populate a dropdown list using struts
> > tag libraries.
> > 
> > I have an arraylist of databeans.. The dropdown list should skim
> > through each item in the arraylist and take the value of
> > databean.getFirstValue() (or the firstValue property of the data
> > bean). I believe the tag is html:select. However I am not certain on
> > how to use it.
> > 
> > Kind Regards
> > Roshan
> > 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select how to use it?

2002-04-24 Thread Roshan Paiva

Thanks a lot Mark.. I'll try it out.. 

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 1:44 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select how to use it?


Here's a simple example of how I retrieve a List of years to populate a
dropdown list:


  Year
  

   <%= expYear %>

  


1.  The html:select property is a property in your bean, if one exists.
2.  styleId is just the HTML reference if you want to get a value with,
say JavaScript. 3.  The first html:option is the default "selected"
option that displays. 4.  The logic:iterate id is arbitrary but required
to reference the list's elements. 5.  iterate name is the name of my
ArrayList of years that I assigned to a session
attribute in my action class:

   List listExpYears = new ArrayList();
   for( int k = 1; k < 11; k++) {
 listExpYears.add(( new Integer( 2000 + 
 Calendar.getInstance().YEAR + k))
 .toString());
   }
   request.getSession().setAttribute( 
 "listExpYears", listExpYears);

6. In html:option value, remember to cast the List objects to strings as
Struts is expecting a string.

Easy as pie, eh?

Mark

-Original Message-
From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:17 PM

> Hi...
> 
> Could anyone pls tell me how to populate a dropdown list using struts 
> tag libraries.
> 
> I have an arraylist of databeans.. The dropdown list should skim 
> through each item in the arraylist and take the value of
> databean.getFirstValue() (or the firstValue property of the data 
> bean). I believe the tag is html:select. However I am not certain on 
> how to use it.
> 
> Kind Regards
> Roshan
> 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: html:select how to use it?

2002-04-24 Thread Galbreath, Mark

Here's a simple example of how I retrieve a List of years to populate a
dropdown list:


  Year
  

   <%= expYear %>

  


1.  The html:select property is a property in your bean, if one exists.
2.  styleId is just the HTML reference if you want to get a value with, say
JavaScript.
3.  The first html:option is the default "selected" option that displays.
4.  The logic:iterate id is arbitrary but required to reference the list's
elements.
5.  iterate name is the name of my ArrayList of years that I assigned to a
session
attribute in my action class:

   List listExpYears = new ArrayList();
   for( int k = 1; k < 11; k++) {
 listExpYears.add(( new Integer( 2000 + 
 Calendar.getInstance().YEAR + k))
 .toString());
   }
   request.getSession().setAttribute( 
 "listExpYears", listExpYears);

6. In html:option value, remember to cast the List objects to strings as
Struts is expecting a string.

Easy as pie, eh?

Mark

-Original Message-
From: Roshan Paiva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:17 PM

> Hi...
> 
> Could anyone pls tell me how to populate a dropdown list using struts
> tag libraries.
> 
> I have an arraylist of databeans.. The dropdown list should skim
> through each item in the arraylist and take the value of
> databean.getFirstValue() (or the firstValue property of the data
> bean). I believe the tag is html:select. However I am not certain on
> how to use it.
> 
> Kind Regards
> Roshan
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >