-
1. Re: Horrible default JSF many items selection
mcantrell Sep 6, 2007 3:52 PM (in response to trouby)I'd really love to see something in regards to select lists in general, not just select many.
-
2. Re: Horrible default JSF many items selection
sergeysmirnov Sep 6, 2007 5:56 PM (in response to trouby)can you show any example how this component looks like? Does not matter, it is JSF, Java or what ever. I am asking about example of GUI part.
-
3. Re: Horrible default JSF many items selection
trouby Sep 6, 2007 6:00 PM (in response to trouby)Sure,
Here's an example of the basic JSF component that comes with the 1.1/1.2 JSF impl,
http://horstmann.com/corejsf/jsf-tags.html#Table4_20
h:selectManyMenu
With a list of items more than 20, is looks horrible,
If no item is selected, people do not even find out what it means, intuitively, they are right,
Myfaces sandbox has an 'ok' implementation here, they call it 'pick list', here's an example:
http://myfaces.apache.org/sandbox/selectManyPicklist.html
Woodstock has some nice component about it,
Does it answer your question?
Asaf. -
4. Re: Horrible default JSF many items selection
sergeysmirnov Sep 6, 2007 6:05 PM (in response to trouby)Are you OK with Myfaces 'pick list' or "more than 20, is looks horrible" still an issue?
-
5. Re: Horrible default JSF many items selection
trouby Sep 6, 2007 6:21 PM (in response to trouby)Myfaces picklist is ok I think,
- Of course it could be extended, for example more two arrows which move all items from side to side,
- double click on an item move it to the other side
- drag and drop support
- maybe use the scrollable data-grid for many items on each side
but yes, I think that this is the most convenient way for handling many-to-many connections,
Unless someone else think differently? :)
Asaf. -
6. Re: Horrible default JSF many items selection
demetrio812 Sep 6, 2007 7:45 PM (in response to trouby)this is another example:
http://www.teamdev.com/quipukit/demo/twolistselection/TwoListSelection.jsf
also I would like to see also a JavaScript selectOneMenu like this:
http://www.teamdev.com/quipukit/demo/dropdown/dropDownDefault.jsf
(don't know why it's not working in my firefox right now, it works fine with IE, btw that is an example :) )
because for example in firefox the standard one is impossible to style and also in the js one you can put rich content...
Demetrio -
7. Re: Horrible default JSF many items selection
sergeysmirnov Sep 6, 2007 8:36 PM (in response to trouby)We have a "Pick List" (TwoListSelection) in our pipe line of future components.
re-inventing the drop down list used not to be yet. -
8. Re: Horrible default JSF many items selection
ilya_shaikovsky Sep 7, 2007 5:00 AM (in response to trouby)And for now you can simply implement this using custom facelets including to them our ajax controls and standard lists.
-
9. Re: Horrible default JSF many items selection
mcantrell Sep 7, 2007 10:19 AM (in response to trouby)I think my main problem with the default implementation is selectItems. It's datasource is pretty weak (only takes a hashmap or a collection of SelectItem objects). It makes more sense to be able to use you domain model directly. Something like:
<f:selectItems value="#{myBean.categories}" var="category" itemLabel="#{category.description}" itemValue="#{category.id}"/>
As far as richness goes, the following features would be useful:
sorting
searching
filtering
editable
It may help to use some CSS with a HTML List element instead of the standard HTML select element. HTML select has real performance problems in IE when dealing with large sets of data (particularly with javascript).