Re: html:options with FormBean

2001-10-26 Thread Peter Pilgrim


There are two ways but the best way is to set up a simple bean
like "LabelValueBean" that has two attribute; the option value and the
option description

public class LabelValueBean {
 String label, descrip ; 
 public String getLabel() { ... }
 public void setLabel( String newValue ) { ... }
 public String getDescription() { ... }
 public void setDescription( String newValue ) { ... }
}

Write a collection and store  LabelValueBean inside it.
Write an action form that allows you get the collection or add
the collection directly to the request scope under a known name.
Then you write your  tags to get all the options
You need to tell  the JavaBean property to get the value ie "label" == 
getLabel()
and the display text "description" == getDescription



HTH
--
Peter Pilgrim ++44 (0)207-545-9923
  //_\\
"Mathematics is essentially the study of islands of  ===
disparate subjects in a sea of ignorance."   || ! ||
Andrew Wiles _


 Message History 



From: Francois Duchaussoy <[EMAIL PROTECTED]> on 26/10/2001 12:33

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  html:options with FormBean


> I have an ActionForm with a Collection object inside.
> I'd like to use the  tag to display that Collection.
> Could anyone give me an example on how to do that?
>
> something like that??
>  labelProperty="value"/>
>
> Thanks.
> Francois.





--

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.





html:options with FormBean

2001-10-25 Thread Francois Duchaussoy

> I have an ActionForm with a Collection object inside.
> I'd like to use the  tag to display that Collection.
> Could anyone give me an example on how to do that?
> 
> something like that??
>  labelProperty="value"/>
> 
> Thanks.
> Francois.