Thank you very much for your help but still I have some problems, it does not show the default choices... my code is now like this, I have changed the list for listModel but still empty when I execute...
IChoiceRenderer renderer = new ChoiceRenderer("", ""); List<String> lExcogido = new ArrayList(); lExcogido.add("predefined"); ListModel<String> lm = new ListModel(); lm.setObject(lExcogido); final Palette palette = new Palette("palette", lm, new Model( (Serializable) asignString), renderer, 10, true); Any more thought¿? than you very much guys, this simple thing is frustrating I have the release on friday..... wic...@geofflancaster.com wrote: > > to predefine the selected users you have to insert them into the model. > > define your palette as: > final Palette palette = new Palette("palette", new > ListModel<Person>(lSelected), new CollectionModel<Person>(persons), > renderer, 10, true); > > to filter using that javascript you will need to edit the js a bit to make > it work. instead of having it use document.getElementById('paletteName') > you will need to use document.getElementsByName('(containerName if you > have > one):paletteName:choices')[0] > > the correct string to use can be found by looking at your html source that > wicket renders. the line will start <select class="choicesSelect" > name="THIS IS THE STRING YOU WANT" ... > > Good luck. > > > Original Message: > ----------------- > From: victorTrapiello vic...@trapiello.net > Date: Sun, 31 Jan 2010 12:19:14 -0800 (PST) > To: users@wicket.apache.org > Subject: Re: (my code palette) how to set default options in object > palette > > > > Thank you very much I will try to do it > > victorTrapiello wrote: >> >> Thank you very mucv Nino, but what do you mena by a quick start¿? I´m > new >> in this comunity. >> >> nino martinez wael wrote: >>> >>> Ok Victor next step for you would be to create a quickstart.. So we can >>> play >>> with it.. I've sure had this working with wicket 1.2 / 1.3 soo should >>> still >>> be the case. >>> >>> 2010/1/29 victorTrapiello <vic...@trapiello.net> >>> >>>> >>>> I does not work, I think the key point is my >>>> >>>> IChoiceRenderer renderer = new ChoiceRenderer("fullName", "fullName"); >>>> >>>> i leave it empty and it works for the available subject but not for the >>>> predefined! >>>> >>>> any more thoughts¿? >>>> >>>> Thank you very much guys >>>> >>>> >>>> >>>> nino martinez wael wrote: >>>> > >>>> > Form f=new Form("form"); >>>> > add(f); >>>> > List persons = ComponentReferenceApplication.getPersons();; >>>> > IChoiceRenderer renderer = new ChoiceRenderer("fullName", >>>> "fullName"); >>>> > final Palette palette = new Palette("palette", new >>>> > ListModel<Person>(new >>>> > ArrayList<Person>()), new CollectionModel<Person>( >>>> > persons), renderer, 10, true); >>>> > palette.setmodelObject or something like that. >>>> > >>>> > 2010/1/29 victorTrapiello <vic...@trapiello.net> >>>> > >>>> >> >>>> >> well I have defined my palette component like this: >>>> >> >>>> >> asignString is an string linst with the available subjects (It works >>>> >> fine, >>>> >> the palette shows the proper subjects, but it doesn´t show the >>>> default >>>> >> selected one which I save them in the list "lSelected" >>>> >> >>>> >> IChoiceRenderer renderer = new ChoiceRenderer("", ""); >>>> >> List<String> lSelected=new ArrayList(); >>>> >> lSelected.add("predefined"); >>>> >> Model aux=new Model(); >>>> >> aux.setObject((Serializable) lSelected); >>>> >> >>>> >> final Palette palette = new Palette("palette", aux, new >>>> Model( >>>> >> (Serializable) asignString), renderer, 10, true); >>>> >> >>>> >> Any thought¿? >>>> >> >>>> >> thankyou in advance >>>> >> >>>> >> >>>> >> James Carman-3 wrote: >>>> >> > >>>> >> > Make sure your model reflects the selected state. Palette will >>>> pick >>>> >> > that up automatically >>>> >> > >>>> >> > On Sat, Jan 23, 2010 at 12:50 PM, victorTrapiello >>>> >> <vic...@trapiello.net> >>>> >> > wrote: >>>> >> >> >>>> >> >> >>>> >> >> I use the palette component, to assigne option to a User. but I >>>> don't >>>> >> >> find a functionnality, how to set already selected option ?. >>>> >> >> >>>> >> >> Exemple : a user selected option, I store it into a database: >>>> >> >> In the future, the user want to update his option, at the moment >>>> he >>>> >> >> doesn't see his previous selected option. >>>> >> >> >>>> >> >> Do you have a solution.¿?, doe sir make sense¿? >>>> >> >> >>>> >> >> cheers!! >>>> >> >> >>>> >> >> quote author="MartinM"> >>>> >> >> Well.. you can override newChoicesComponent >>>> >> >> >>>> >> >> ** >>>> >> >> Martin >>>> >> >> >>>> >> >> 2009/4/28 æ°å¸æ软件 -- ä¿å®ä¼ <nhsoft....@gmail.com>: >>>> >> >>> yes, i can setMarkupId for Palette. but now i want to filter for >>>> >> >>> palette's >>>> >> >>> choicesComponent. >>>> >> >>> >>>> >> >>> there is no public getChoicesComponent() method for >>>> choicesComponent. >>>> >> >>> >>>> >> >>> >>>> >> >>> >>>> >> >>> 2009/4/28 Martin Makundi <martin.maku...@koodaripalvelut.com> >>>> >> >>> >>>> >> >>>> Why cannot get markupid? You can determine it yourself >>>> (setMarkupId) >>>> >> >>>> >>>> >> >>>> You could also update via ajax using a textfield which sends >>>> the >>>> >> >>>> filtered text to server and server updates the select via >>>> ajax... >>>> >> >>>> >>>> >> >>>> I wonder if someone has made a select in which the filter is >>>> >> visually >>>> >> >>>> built into the select component? >>>> >> >>>> >>>> >> >>>> ** >>>> >> >>>> Martin >>>> >> >>>> >>>> >> >>>> 2009/4/28 æ°å¸æ软件 -- ä¿å®ä¼ <nhsoft....@gmail.com>: >>>> >> >>>> > I want to add a filter for palette choice list, because >>>> choice >>>> >> list >>>> >> >>>> have a >>>> >> >>>> > very large HTML SELECT list. >>>> >> >>>> > >>>> >> >>>> > I found that there is a select filter implement( >>>> >> >>>> > http://www.barelyfitz.com/projects/filterlist/index.php/1), >>>> but >>>> i >>>> >> can >>>> >> >>>> not >>>> >> >>>> > get select component markupid, so filter can not init. >>>> >> >>>> > >>>> >> >>>> > -- >>>> >> >>>> > >>>> >> >>>> > H. L. Mencken < >>>> >> >>>> http://www.brainyquote.com/quotes/authors/h/h_l_mencken.html> >>>> >> >>>> > - "It is even harder for the average ape to believe that he >>>> has >>>> >> >>>> > descended >>>> >> >>>> > from man." >>>> >> >>>> > >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> --------------------------------------------------------------------- >>>> >> >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> >>>> >>>> >> >>>> >>>> >> >>> >>>> >> >> >>>> >> >> >>>> --------------------------------------------------------------------- >>>> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> >> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> >>>> >> >> -- >>>> >> >> View this message in context: >>>> >> >> >>>> >> >>>> > http://old.nabble.com/how-to-add-filter-for-Palette-choice-tp23269578p272882 > 82.html >>>> >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >>>> >> >> >>>> >> >> >>>> >> >> >>>> --------------------------------------------------------------------- >>>> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> >> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> >> >>>> >> >> >>>> >> > >>>> >> > >>>> --------------------------------------------------------------------- >>>> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> > For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> > >>>> >> > >>>> >> > >>>> >> >>>> >> -- >>>> >> View this message in context: >>>> >> >>>> > http://old.nabble.com/how-to-add-filter-for-Palette-choice-tp23269578p273749 > 68.html >>>> >> Sent from the Wicket - User mailing list archive at Nabble.com. >>>> >> >>>> >> >>>> >> >>>> --------------------------------------------------------------------- >>>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> >> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >> >>>> >> >>>> > >>>> > >>>> >>>> -- >>>> View this message in context: >>>> > http://old.nabble.com/how-to-add-filter-for-Palette-choice-tp23269578p273788 > 63.html >>>> Sent from the Wicket - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>>> >>> >>> >> >> > > -- > View this message in context: > http://old.nabble.com/how-to-add-filter-for-Palette-choice-tp23269578p273962 > 02.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > > -------------------------------------------------------------------- > mail2web.com What can On Demand Business Solutions do for you? > http://link.mail2web.com/Business/SharePoint > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://old.nabble.com/how-to-add-filter-for-Palette-choice-tp23269578p27424856.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org