Re: [Wicket-user] Adding Support for

2005-12-04 Thread Igor Vaynberg
I guess key is flexibility. What if i want the default message to be in some optgroup, or what if i want it to have a certain css class, etc, etc. I dont think its /that/ much more work. its only one or two lines of code. -IgorOn 12/3/05, Johan Compagner <[EMAIL PROTECTED]> wrote: it is just a matt

Re: [Wicket-user] Adding Support for

2005-12-04 Thread Andrew Berman
Actually I agree with Igor on this.  The entire purpose to the Select/SelectionOptions was to make it completely flexible to the developer and to allow him to do whatever he wanted.  Adding a default option for null detracts from that flexibility a bit because the developer didn't manually add it t

Re: [Wicket-user] Adding Support for

2005-12-03 Thread Johan Compagner
it is just a matter of easy choice.In the DropDown you can choose if you want or not depeding on what the model value is If you don't want that message just override one methodelse you get that message if the model value is null. It is just a matter of what is handy and easy to doNow in youre case

Re: [Wicket-user] Adding Support for

2005-12-03 Thread Igor Vaynberg
i dont really understand why this is a /problem/adding it yourself gives you options to add styles, your own text, etc.also most of the time i dont even want a "select one" message, i just want the box to default to the first choice. so when the page first renders the model is null and no options a

Re: [Wicket-user] Adding Support for

2005-12-03 Thread Johan Compagner
still the same problem then i am affraid.I have to control the visibilty if toat selectoption depending on what the model object is of the Select itself. (null or something)On 12/3/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: but a SelectOption is not in your collection - its a component. The whol

Re: [Wicket-user] Adding Support for

2005-12-02 Thread Igor Vaynberg
but a SelectOption is not in your collection - its a component. The whole point of the Select component is to have full control over the markup. All our core choice elements limit your access to markup by producing the entire output for you including all the options. The point of Select/SelectOpti

Re: [Wicket-user] Adding Support for

2005-12-02 Thread Johan Compagner
yes then  it is exactly what i say.for "Choose one.." you shouldn't have to need a SelectChoice == option element in youre collectionBecause "Choose one" should only be there if nothing is selected and null value isn't allowed... johanOn 12/2/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: no, SelectC

Re: [Wicket-user] Adding Support for

2005-12-02 Thread Igor Vaynberg
no, SelectChoice is a component that represents a single element. you add that to the Select component. SelectChoices is a convinience component that draws out a bunch of tags much like our current components. -IgorOn 12/2/05, Johan Compagner <[EMAIL PROTECTED]> wrote: That selectchoice is a thin

Re: [Wicket-user] Adding Support for

2005-12-02 Thread Johan Compagner
That selectchoice is a thing you have to add to the collection of choices?then that is not that nice. Because choose one should only be there if no one is selected and null is required (or something like that)Because of that you can't add it easily to the collection because you have to know that yo

Re: [Wicket-user] Adding Support for

2005-12-02 Thread Igor Vaynberg
just checked in a fix. also the Select element does not add a "choose one" choice for you, you have to do it yourself by adding a SelectChoice that represents that element.-Igor On 12/2/05, Davide Savazzi <[EMAIL PROTECTED]> wrote: On 11/30/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> any feedback

Re: [Wicket-user] Adding Support for

2005-12-02 Thread Davide Savazzi
On 11/30/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > any feedback on this yet? if not, i guess i will polish it with its current > feature set and that will be that. I have a Map that contains List of choices, my code is: Map choicesMap = getChoicesMap(); Select select = new Select("mySelect",

Re: [Wicket-user] Adding Support for

2005-11-30 Thread Igor Vaynberg
yes it is in head, and also in 1.1 branch.-IgorOn 11/30/05, Davide Savazzi <[EMAIL PROTECTED] > wrote:On 11/30/05, Igor Vaynberg < [EMAIL PROTECTED]> wrote:> any feedback on this yet? if not, i guess i will polish it with its current> feature set and that will be that.Is it in HEAD now? I've alread

Re: [Wicket-user] Adding Support for

2005-11-30 Thread Davide Savazzi
On 11/30/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > any feedback on this yet? if not, i guess i will polish it with its current > feature set and that will be that. Is it in HEAD now? I've already switched to 1.2 :( Cheers, -- Davide Savazzi -

Re: [Wicket-user] Adding Support for

2005-11-30 Thread Andrew Berman
I haven't had a chance to use it yet.  I'm swamped with some other stuff I need to do.  Sorry--AndrewOn 11/30/05, Igor Vaynberg < [EMAIL PROTECTED]> wrote:any feedback on this yet? if not, i guess i will polish it with its current feature set and that will be that. -IgorOn 11/23/05, Andrew Berm

Re: [Wicket-user] Adding Support for

2005-11-29 Thread Igor Vaynberg
any feedback on this yet? if not, i guess i will polish it with its current feature set and that will be that.-IgorOn 11/23/05, Andrew Berman <[EMAIL PROTECTED]> wrote:I should've known On 11/23/05, Igor Vaynberg < [EMAIL PROTECTED]> wrote: your wish is my command. now you just have to wai

Re: [Wicket-user] Adding Support for

2005-11-23 Thread Andrew Berman
I should've knownOn 11/23/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: your wish is my command. now you just have to wait a few hours until anon cvs syncs.-IgorOn 11/23/05, Andrew Berman < [EMAIL PROTECTED]> wrote:I won't be able to give it a shot until it works with HEAD as I've made the

Re: [Wicket-user] Adding Support for

2005-11-23 Thread Igor Vaynberg
your wish is my command. now you just have to wait a few hours until anon cvs syncs.-IgorOn 11/23/05, Andrew Berman < [EMAIL PROTECTED]> wrote:I won't be able to give it a shot until it works with HEAD as I've made the switch already and am using 1.2 specific stuff.  Once it is compatible with HEAD

Re: [Wicket-user] Adding Support for

2005-11-23 Thread Andrew Berman
I won't be able to give it a shot until it works with HEAD as I've made the switch already and am using 1.2 specific stuff.  Once it is compatible with HEAD, I'll check it out. --AndrewOn 11/23/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: just checked in my first pass at this so you guys can c

Re: [Wicket-user] Adding Support for

2005-11-23 Thread Igor Vaynberg
just checked in my first pass at this so you guys can check it out and give me feedback. i had to check it into wicket_1_1 branch because component reference doesnt work in head yet. i also put the new components into extensions because the core is getting too crowded imho. if people want me to mov

Re: [Wicket-user] Adding Support for

2005-11-22 Thread Mark Derricutt
Something along those lines yeh.On 11/23/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: so you want to specify the optgroup tags in your model? something likeclass Category { String name; List choices }and provide List as the model? so that the name of categories become optgroup tags?

Re: [Wicket-user] Adding Support for

2005-11-22 Thread Igor Vaynberg
so you want to specify the optgroup tags in your model? something likeclass Category { String name; List choices }and provide List as the model? so that the name of categories become optgroup tags? right now - no.what i am working on is very general and it will be trivial to build the above using a

Re: [Wicket-user] Adding Support for

2005-11-22 Thread Mark Derricutt
Do you also have a solution for the scenario when you don't want the HTML to explicitly define group1, group2 etc. as shown in the sample code I see mentioned previously in the thread? I don't know the code currently works (I've only started looking at wicket) so not entirely sure what instances I

Re: [Wicket-user] Adding Support for

2005-11-22 Thread Igor Vaynberg
working on it right now :) how did you know?-IgorOn 11/22/05, Andrew Berman <[EMAIL PROTECTED]> wrote: Igor, did you ever make a decision on how you wanted to proceed with this? On 11/6/05, Andrew Berman <[EMAIL PROTECTED] > wrote:Sounds and looks good to me.  On 11/6/05, Igor Vaynberg <[EMAIL PRO

Re: [Wicket-user] Adding Support for

2005-11-22 Thread Andrew Berman
Igor, did you ever make a decision on how you wanted to proceed with this?On 11/6/05, Andrew Berman <[EMAIL PROTECTED] > wrote:Sounds and looks good to me.  On 11/6/05, Igor Vaynberg <[EMAIL PROTECTED] > wrote: I think the way to go would be to have a set of components that work like CheckGroup/Ch

Re: [Wicket-user] Adding Support for

2005-11-06 Thread Andrew Berman
Sounds and looks good to me.  On 11/6/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: I think the way to go would be to have a set of components that work like CheckGroup/Check we can have a Select component that acts like the CheckGroup component, and a SelectChoices component that works like the dro

Re: [Wicket-user] Adding Support for

2005-11-06 Thread Igor Vaynberg
I think the way to go would be to have a set of components that work like CheckGroup/Check we can have a Select component that acts like the CheckGroup component, and a SelectChoices component that works like the dropdownchoice with the exception of rendering tags. We also have a SelectChoicesGrou

Re: [Wicket-user] Adding Support for

2005-11-04 Thread Andrew Berman
Yes my bad, I meant the "label" attribute, I got it confused with the label tag's "for" attribute.  I'm not sure what the best solution is either.  Passing a string in definitely works, but it's not really consistent with the rest of the Wicket components (except Label which just takes the string a

Re: [Wicket-user] Adding Support for

2005-11-04 Thread Igor Vaynberg
unless of course we just pass in a string instead of imodel and leave i18n to the user... -Igor On 11/4/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: you mean for the "label" attribute? Optgroup in this case wouldnt be a component so the IModel provided needs to be attached to some component so tha

Re: [Wicket-user] Adding Support for

2005-11-04 Thread Igor Vaynberg
you mean for the "label" attribute? Optgroup in this case wouldnt be a component so the IModel provided needs to be attached to some component so that it is detached properly, so the user needs to worry about attaching it somewhere, and the more optgroups you have the trickier that gets. -Igor On

Re: [Wicket-user] Adding Support for

2005-11-04 Thread Andrew Berman
Igor, why wouldn't the model be attached to the OptGroup object?  Each OptGroup takes a model which is used for the "for" attribute.On 11/4/05, Johan Compagner <[EMAIL PROTECTED]> wrote: For the other choice objects (The singleselectchoice, dropdownchoice) we could have a list of optgroups and the

Re: [Wicket-user] Adding Support for

2005-11-04 Thread Johan Compagner
For the other choice objects (The singleselectchoice, dropdownchoice) we could have a list of optgroups and the optgroup has a list of its choices So you are just makeing one line with choices and optgroups (with again a list of choices) johan On 11/4/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: h

Re: [Wicket-user] Adding Support for

2005-11-03 Thread Igor Vaynberg
havent decided what the best way to do this is. one problem i see with passing a list of optgroups is that the optgroup will have to have an IModel for its label in case someone wants to i18n it, but then how do we handle attaching and detaching that model since its not attached to any component. m

Re: [Wicket-user] Adding Support for

2005-11-03 Thread Igor Vaynberg
yeah sorry, think of it as pseudo html :) -Igor On 11/3/05, Andrew Berman <[EMAIL PROTECTED]> wrote: It would be similar to Check/CheckGroup because you could create a Select object, which is like the CheckGroup object, and an Option object, which is similar to the Check object.  By doing that, the

Re: [Wicket-user] Adding Support for

2005-11-03 Thread Andrew Berman
It would be similar to Check/CheckGroup because you could create a Select object, which is like the CheckGroup object, and an Option object, which is similar to the Check object.  By doing that, then I can manually insert the tag either directly in the HTML or using a WebMarkupContainer in the Jav

Re: [Wicket-user] Adding Support for

2005-11-03 Thread Igor Vaynberg
I dont really understant what you mean. If you want to do it like the Check/CheckGroup is done you would have a SelectGroup and Select components that you would put into your html and then you can manually insert ie wicket doesnt care But then you are talking about making it a single compo

[Wicket-user] Adding Support for

2005-11-03 Thread Andrew Berman
I'm sure this is Igor's territory, but I was wondering if, like how Check/CheckGroup and Radio/RadioGroup was done, if we could also add something to permit optgroups.  My thought was to have something like a Select object which takes a list of OptGroup components.  The OptGroup component then take