Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-12-07 Thread TH Lim

For 1st example, the size attribute is  size=8 . 


Johan Compagner wrote:
 
 hmm we don't seem to set the default max rows in every constructor
 strange thing is that in the first example you give we also don't do it.
 So
 max rows is still 0
 
 Can you check what is exactly generated (what the size attribute is)
 
 johan
 
 
 On 12/6/06, TH Lim [EMAIL PROTECTED] wrote:


 I came to the same conclusion as Nino. What I have observed was this,

 1. For,

 ListChoice selection = new ListChoice(disciplineSelection, new Model(),
 disciplines)

 , a list box is created in the web page.

 2. For,

 ListChoice selection = new ListChoice(disciplineSelection, disciplines)

 , a dropdown box is created in the web page.

 3. For,

 ListChoice selection = new ListChoice(disciplineSelection,
 disciplines);selection.setMaxRow(8);

 ,  a list box is created in the web page.

 I find it strange because I used ListChoice instead of DropDownChoice but
 yet it shows a dropdown box instead of a list box for case no. 2. Is it a
 bug or am I missing something? Btw, there are 2 items in my discipline
 list.
 Thanks



 Johan Compagner wrote:
 
  A ListChoice should always be a List instead of a DropDown (for a drop
  down
  we have the DropDownChoice)
 
  I don't know why you see a difference it shouldn't look at all to the
  model
  that holds the selection.
  It only looks at the choices:
 
  tag.put(size, Math.min(maxRows, getChoices().size()));
 
  so i guess if maxRows of size() == 1 then it becomes a dropdown?
 
  johan
 
 
  On 5/9/06, Nino Wael [EMAIL PROTECTED] wrote:
 
   Hi
 
 
 
  Im not sure if this is the intended functionality, but I belive I've
  discovered an oddity or featureJ.
 
 
 
  When I use the constructor which also takes a model
  (ListChoice(dropdown_job, new Model(),myList, new myRenderer)) my
  listchoice is no longer displayed as a dropdown but as a listbox.
 
 
 
  If I instead of using the constructor with the model property call the
  set
  model method (listChoice_job.setModel(new Model())) then it remains
  displayed as a dropdown
 
 
 
  Code snipplet:
 
  // this gives a listbox
 
  listChoice_job = new
  ListChoice(dropdown_job,new Model(),jobcenter.toArray().getList(),
 new
  DataItemRenderer())
 
 
 
  //this gives a dropdown
 
  listChoice_job = new
  ListChoice(dropdown_job, jobcenter.toArray().getList(), new
  DataItemRenderer())
 
 
 listChoice_job.setModel(new
  Model());
 
  Code snipplet end
 
 
 
 
 
  It's that latter I want displayed.
 
 
 
 
 
  -regards Nino
 
 
 

 --
 View this message in context:
 http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7714179
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7736244
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-12-07 Thread Johan Compagner

thats the default yes. Strange that it is set somehow i don't see that in
that constructor

/**
* @see wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
IModel,IModel)
*/
   public ListChoice(String id, IModel model, IModel choices)
   {
   super(id, model, choices);
   }

can you check why that works for you on what place the maxRows is set?

i will change all the constructors so that they do set the default max rows.


On 12/7/06, TH Lim [EMAIL PROTECTED] wrote:



For 1st example, the size attribute is  size=8 .


Johan Compagner wrote:

 hmm we don't seem to set the default max rows in every constructor
 strange thing is that in the first example you give we also don't do it.
 So
 max rows is still 0

 Can you check what is exactly generated (what the size attribute is)

 johan


 On 12/6/06, TH Lim [EMAIL PROTECTED] wrote:


 I came to the same conclusion as Nino. What I have observed was this,

 1. For,

 ListChoice selection = new ListChoice(disciplineSelection, new
Model(),
 disciplines)

 , a list box is created in the web page.

 2. For,

 ListChoice selection = new ListChoice(disciplineSelection,
disciplines)

 , a dropdown box is created in the web page.

 3. For,

 ListChoice selection = new ListChoice(disciplineSelection,
 disciplines);selection.setMaxRow(8);

 ,  a list box is created in the web page.

 I find it strange because I used ListChoice instead of DropDownChoice
but
 yet it shows a dropdown box instead of a list box for case no. 2. Is it
a
 bug or am I missing something? Btw, there are 2 items in my discipline
 list.
 Thanks



 Johan Compagner wrote:
 
  A ListChoice should always be a List instead of a DropDown (for a
drop
  down
  we have the DropDownChoice)
 
  I don't know why you see a difference it shouldn't look at all to the
  model
  that holds the selection.
  It only looks at the choices:
 
  tag.put(size, Math.min(maxRows, getChoices().size()));
 
  so i guess if maxRows of size() == 1 then it becomes a dropdown?
 
  johan
 
 
  On 5/9/06, Nino Wael [EMAIL PROTECTED] wrote:
 
   Hi
 
 
 
  Im not sure if this is the intended functionality, but I belive I've
  discovered an oddity or featureJ.
 
 
 
  When I use the constructor which also takes a model
  (ListChoice(dropdown_job, new Model(),myList, new myRenderer)) my
  listchoice is no longer displayed as a dropdown but as a listbox.
 
 
 
  If I instead of using the constructor with the model property call
the
  set
  model method (listChoice_job.setModel(new Model())) then it remains
  displayed as a dropdown
 
 
 
  Code snipplet:
 
  // this gives a listbox
 
  listChoice_job = new
  ListChoice(dropdown_job,new Model(),jobcenter.toArray().getList(),
 new
  DataItemRenderer())
 
 
 
  //this gives a dropdown
 
  listChoice_job = new
  ListChoice(dropdown_job, jobcenter.toArray().getList(), new
  DataItemRenderer())
 
 
 listChoice_job.setModel(new
  Model());
 
  Code snipplet end
 
 
 
 
 
  It's that latter I want displayed.
 
 
 
 
 
  -regards Nino
 
 
 

 --
 View this message in context:

http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7714179
 Sent from the Wicket - User mailing list archive at Nabble.com.



-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:
http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7736244
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list

Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-12-07 Thread Johan Compagner

ahh found the constructor that did set the max rows.
I will sync it completely.

johan


On 12/7/06, Johan Compagner [EMAIL PROTECTED] wrote:


thats the default yes. Strange that it is set somehow i don't see that in
that constructor

/**
 * @see wicket.markup.html.form.AbstractChoice#AbstractChoice(String,
IModel,IModel)
 */
public ListChoice(String id, IModel model, IModel choices)
{
super(id, model, choices);
}

can you check why that works for you on what place the maxRows is set?

i will change all the constructors so that they do set the default max
rows.


On 12/7/06, TH Lim [EMAIL PROTECTED] wrote:


 For 1st example, the size attribute is  size=8 .


 Johan Compagner wrote:
 
  hmm we don't seem to set the default max rows in every constructor
  strange thing is that in the first example you give we also don't do
 it.
  So
  max rows is still 0
 
  Can you check what is exactly generated (what the size attribute is)
 
  johan
 
 
  On 12/6/06, TH Lim  [EMAIL PROTECTED] wrote:
 
 
  I came to the same conclusion as Nino. What I have observed was this,
 
  1. For,
 
  ListChoice selection = new ListChoice(disciplineSelection, new
 Model(),
  disciplines)
 
  , a list box is created in the web page.
 
  2. For,
 
  ListChoice selection = new ListChoice(disciplineSelection,
 disciplines)
 
  , a dropdown box is created in the web page.
 
  3. For,
 
  ListChoice selection = new ListChoice(disciplineSelection,
  disciplines);selection.setMaxRow(8);
 
  ,  a list box is created in the web page.
 
  I find it strange because I used ListChoice instead of DropDownChoice
 but
  yet it shows a dropdown box instead of a list box for case no. 2. Is
 it a
  bug or am I missing something? Btw, there are 2 items in my
 discipline
  list.
  Thanks
 
 
 
  Johan Compagner wrote:
  
   A ListChoice should always be a List instead of a DropDown (for a
 drop
   down
   we have the DropDownChoice)
  
   I don't know why you see a difference it shouldn't look at all to
 the
   model
   that holds the selection.
   It only looks at the choices:
  
   tag.put(size, Math.min(maxRows, getChoices().size()));
  
   so i guess if maxRows of size() == 1 then it becomes a dropdown?
  
   johan
  
  
   On 5/9/06, Nino Wael [EMAIL PROTECTED] wrote:
  
Hi
  
  
  
   Im not sure if this is the intended functionality, but I belive
 I've
   discovered an oddity or featureJ.
  
  
  
   When I use the constructor which also takes a model
   (ListChoice(dropdown_job, new Model(),myList, new myRenderer))
 my
   listchoice is no longer displayed as a dropdown but as a listbox.
  
  
  
   If I instead of using the constructor with the model property call
 the
   set
   model method (listChoice_job.setModel(new Model())) then it
 remains
   displayed as a dropdown
  
  
  
   Code snipplet:
  
   // this gives a listbox
  
   listChoice_job = new
   ListChoice(dropdown_job,new Model(),jobcenter.toArray
 ().getList(),
  new
   DataItemRenderer())
  
  
  
   //this gives a dropdown
  
   listChoice_job = new
   ListChoice(dropdown_job, jobcenter.toArray().getList(), new
   DataItemRenderer())
  
  
  listChoice_job.setModel(new
   Model());
  
   Code snipplet end
  
  
  
  
  
   It's that latter I want displayed.
  
  
  
  
  
   -regards Nino
  
  
  
 
  --
  View this message in context:
 
 
http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7714179
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
 share
  your
  opinions on IT  business topics through brief surveys - and earn
 cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
 share
  your
  opinions on IT  business topics through brief surveys - and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 
http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7736244
 Sent from the Wicket - User mailing list archive at Nabble.com.



 -
 Take Surveys. Earn 

Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-12-05 Thread TH Lim

I came to the same conclusion as Nino. What I have observed was this,

1. For,

ListChoice selection = new ListChoice(disciplineSelection, new Model(),
disciplines)

, a list box is created in the web page.

2. For, 

ListChoice selection = new ListChoice(disciplineSelection, disciplines)

, a dropdown box is created in the web page.

3. For, 

ListChoice selection = new ListChoice(disciplineSelection,
disciplines);selection.setMaxRow(8);

,  a list box is created in the web page.

I find it strange because I used ListChoice instead of DropDownChoice but
yet it shows a dropdown box instead of a list box for case no. 2. Is it a
bug or am I missing something? Btw, there are 2 items in my discipline list.
Thanks



Johan Compagner wrote:
 
 A ListChoice should always be a List instead of a DropDown (for a drop
 down
 we have the DropDownChoice)
 
 I don't know why you see a difference it shouldn't look at all to the
 model
 that holds the selection.
 It only looks at the choices:
 
 tag.put(size, Math.min(maxRows, getChoices().size()));
 
 so i guess if maxRows of size() == 1 then it becomes a dropdown?
 
 johan
 
 
 On 5/9/06, Nino Wael [EMAIL PROTECTED] wrote:

  Hi



 Im not sure if this is the intended functionality, but I belive I've
 discovered an oddity or featureJ.



 When I use the constructor which also takes a model
 (ListChoice(dropdown_job, new Model(),myList, new myRenderer)) my
 listchoice is no longer displayed as a dropdown but as a listbox.



 If I instead of using the constructor with the model property call the
 set
 model method (listChoice_job.setModel(new Model())) then it remains
 displayed as a dropdown



 Code snipplet:

 // this gives a listbox

 listChoice_job = new
 ListChoice(dropdown_job,new Model(),jobcenter.toArray().getList(), new
 DataItemRenderer())



 //this gives a dropdown

 listChoice_job = new
 ListChoice(dropdown_job, jobcenter.toArray().getList(), new
 DataItemRenderer())

 listChoice_job.setModel(new
 Model());

 Code snipplet end





 It's that latter I want displayed.





 -regards Nino

 
 

-- 
View this message in context: 
http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7714179
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-05-10 Thread Nino Wael








Hi Johan



Yeah it must be something
like that. But there are multiple rows for this case. I do also have a
properties files where the default text are in, im not sure if that has any
impact.



Somehow it must have
slipped my mind that there where the dropdownchoice I guess Ill just use
that instead since its the correct one to use.



-regards Nino









From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: 9. maj 2006 12:50
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
ListChoice changes appearance from dropdown to listbox





A ListChoice should
always be a List instead of a DropDown (for a drop down we have the
DropDownChoice)

I don't know why you see a difference it shouldn't look at all to the model
that holds the selection.
It only looks at the choices: 

tag.put(size, Math.min(maxRows, getChoices().size()));

so i guess if maxRows of size() == 1 then it becomes a dropdown?

johan





On 5/9/06, Nino Wael
[EMAIL PROTECTED] wrote:





Hi



Im not sure if this is the intended functionality, but I belive I've
discovered an oddity or featureJ
. 



When I use the constructor which also takes a model
(ListChoice(dropdown_job, new Model(),myList, new myRenderer)) my
listchoice is no longer displayed as a dropdown but as a listbox. 



If I instead of using the constructor with the model property call the
set model method (listChoice_job.setModel(new Model())) then it remains
displayed as a dropdown 



Code snipplet:

// this gives a listbox


listChoice_job = new ListChoice(dropdown_job,new
Model(),jobcenter.toArray().getList(), new DataItemRenderer())



//this gives a dropdown


listChoice_job = new ListChoice(dropdown_job,
jobcenter.toArray().getList(), new DataItemRenderer())


listChoice_job.setModel(new Model());

Code snipplet end





It's that latter I want displayed.





-regards Nino
















Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-05-09 Thread Johan Compagner
A ListChoice should always be a List instead of a DropDown (for a drop down we have the DropDownChoice)I don't know why you see a difference it shouldn't look at all to the model that holds the selection.It only looks at the choices:
tag.put(size, Math.min(maxRows, getChoices().size()));so i guess if maxRows of size() == 1 then it becomes a dropdown?johanOn 5/9/06, 
Nino Wael [EMAIL PROTECTED] wrote:













Hi



Im not sure if this is the intended functionality,
but I belive I've discovered an oddity or featureJ
. 



When I use the constructor which also takes a model (ListChoice(dropdown_job,
new Model(),myList, new myRenderer)) my listchoice is no longer displayed as a
dropdown but as a listbox. 



If I instead of using the constructor with the model property
call the set model method (listChoice_job.setModel(new Model())) then it
remains displayed as a dropdown 



Code snipplet:

// this gives a listbox

 listChoice_job
= new ListChoice(dropdown_job,new Model(),jobcenter.toArray().getList(),
new DataItemRenderer())



//this gives a dropdown

 listChoice_job
= new ListChoice(dropdown_job, jobcenter.toArray().getList(), new
DataItemRenderer())

 listChoice_job.setModel(new
Model());

Code snipplet end





It's that latter I want displayed.





-regards Nino