set the choicerenderer
setChoiceRenderer(new IChoiceRenderer() {
public Object getDisplayValue(Object object) {
return ((MyEnum) object).getTime();
}
public String getIdValue(Object object, int index) {
return String.valueOf(((MyEnum) object).ordinal());
}
});
On Tue, Apr 1, 2008 at 1:53 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> Wicket 1.3 does not have a class called SelectOption. I downloade Wicket
> Extension to obtain it, but found it to be incompatible with Wicket 1.3.
>
> -Andrew
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
>
>
> Sent: Tuesday, April 01, 2008 12:26 PM
> To: [email protected]
> Subject: Re: Simplest way to do name-value pairs in DropDownChoice
>
> Its just a class with a get/set Value and Id
>
> j
>
> On Tue, Apr 1, 2008 at 12:50 PM, Andrew Broderick <[EMAIL PROTECTED]>
> wrote:
>
> > I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got
> > the latest Extensions, but seem to be getting errors.
> >
> > Thanks
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
> > Sent: Tuesday, April 01, 2008 11:17 AM
> > To: [email protected]
> > Subject: Re: Simplest way to do name-value pairs in DropDownChoice
> >
> > I think you are going to have to use a ChoiceRenderer. It's really not
> > that
> > complicated. Check out
> >
> >
> >
> http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html<http://people.apache.org/%7Etobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html>
> >
> > Jeremy
> >
> > On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi,
> > >
> > > I have looked around at several examples of using DropDownChoice. I see
> > it
> > > is a very flexible component, with models, IChoiceRenderers and so on.
> > But,
> > > I just want to pass it simple name/value pairs to use, with a minimum of
> > > fuss. Surely there must be an easy way to do this, since this is
> > probably
> > > the main use case for this component. My pairs are just:
> > >
> > > <option value="All Day">All Day</option>
> > > <option value="7">7:00AM</option>
> > > <option value="8">8:00AM</option>
> > > <option value="9">9:00AM</option>
> > > <option value="10">10:00AM</option>
> > > <option value="11">11:00AM</option>
> > > <option value="12">12:00PM</option>
> > > <option value="13">1:00PM</option>
> > > <option value="14">2:00PM</option>
> > > <option value="15">3:00PM</option>
> > > <option value="16">4:00PM</option>
> > > <option value="17">5:00PM</option>
> > > <option value="18">6:00PM</option>
> > >
> > > In HTML. What is the simplest possible way to use these with
> > > DropDownChoice?
> > >
> > > Thanks.
> > >
> > >
> > > _______________________________________________________
> > >
> > > The information in this email or in any file attached
> > > hereto is intended only for the personal and confiden-
> > > tial use of the individual or entity to which it is
> > > addressed and may contain information that is propri-
> > > etary and confidential. If you are not the intended
> > > recipient of this message you are hereby notified that
> > > any review, dissemination, distribution or copying of
> > > this message is strictly prohibited. This communica-
> > > tion is for information purposes only and should not
> > > be regarded as an offer to sell or as a solicitation
> > > of an offer to buy any financial product. Email trans-
> > > mission cannot be guaranteed to be secure or error-
> > > free. P6070214
> > >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>
--
Ryan Gravener
http://ryangravener.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]