Renzo,
I'm not too sure about how the filter works (I haven't
used it), but it appears that the two footer facets
are there for layout. You are correct that you could
place buttons below the shuttle and wire them to the
proxy, but the layout of the buttons would not
correspond directly to the two shuttle lists. As a
guess, I figure the filter facet allows you a space to
alter the list contents from the client side--I.e.,
its scripting will run before the shuttle is rendered.
Still, this is just a guess, so I'm not sure how
helpful it is.
--David
--- Renzo Tomaselli <[EMAIL PROTECTED]>
wrote:
---------------------------------
Thanks Mr. D. (whatever it means :-) ), great
explanation, now it looks simple to use.
It would have been hard to derive it from provided
docs.
Now the missing parts are the usage of filter and
footer facets. Theformer "places a filter above the
list in the leading container",whatever this means
(sounds a bit recursive).
The latter - well I don't understand why that
component should provideme with space for a button
"below each of the lists". Doing what ? Ican place
anything below those lists (as trailing component),
and stillwire it to the ShuttleProxy js methods for
cross-operations.
-- Renzo
D. Cardon wrote:
Renzo,Sorry about that last post--I accidentally sent
itbefore I was done...Anyway, let me send the real
message:In order to populate the list of selectable
items fromyour backing bean, you can
use:<f:selectItems value="#{backingBean.shuttleItems}
/>The backingBean object should have a
'getShuttleItems'accessor, which returns a:
SelectItem[]. Each selectitem may be an object-label
pair, so there's where youstore your object reference.
The value of the shuttlecomponent is an array of the
objects (those whichappear in the object label pairs)
that are currentlyselected (on the right side of the
shuttle).For example, suppose the component on the
page lookslike this:<tr:selectManyShuttle
value="#{backingBean.selectedShuttleItems}">
<f:selectItems value="#{backingBean.shuttleItems}"
/></tr:selectManyShuttle>...and our backing bean looks
like this:(BackingBean.java)...//// The list of
selected items that should appear in// the shuttle
component.//Gizmo [] itemList = null;//// Returns the
current selected objects.//Gizmo []
getSelectedShuttleItems(){}//////...public
SelectItem[] getShuttleItems(){ SelectItem[]
shuttleItems = new SelectItem[ 3 ]; shuttleItems[ 0
] = new SelectItem( }If you bind the shuttle component
to a variable in thebacking bean, that component's
value will be an arrayof objects. For example, if
getShuttleItems returnsan array of SelectItems, each
Renzo,It's possible to achieve all of the behavior
that youdescribe without resorting to JavaScript.
In order to populate the list of selectable items
from
your backing bean, you can use:
<f:selectItems value="#{backingBean.shuttleItems} />
The backingBean object should have a
'getShuttleItems'
accessor, which returns a: SelectItem[]. Each
select
item may be an object-label pair, so there's where
you
store your object reference. For
example:(BackingBean.java)...//////Gizmo...public
SelectItem[] getShuttleItems(){ SelectItem[]
shuttleItems = new SelectItem[ 3 ]; shuttleItems[ 0
] = new SelectItem( }If you bind the shuttle component
to a variable in
the
backing bean, that component's value will be an
array
of objects. For example, if getShuttleItems returnsan
array of SelectItems, each
Hi, I'm about to use these components, and I'm a
bit
confused about their documentation.Included demos
provide list contents throughtr:selectItem children.
At the same time, I noticed that contents can be
get/set
through the "value" attribute.Can anybody enlight such
usage ? Is there any
other
public demo/example around ?I also noticed that
provided documentation refers
to
the chance of using generic objects as list elements.
This would be >
very
useful to append further properties to list elements,
to be managed
by
footer widgets using provided js hooks on current
selection. But
the
overall subject is somewhat obscure.Furthermore, I
noticed that lists are always
provided
on the left container only, where used has to move
elementsrightwards. But I think that common usage
would start having some elementsalready on the right
list (update mode). Is there any way to achive
this
initial setup - or do I need to preprocess by means of
js and a
hidden
"init" list?Thanks -- Renzo
__________________________________________________Do
You Yahoo!?Tired of spam? Yahoo! Mail has the best
spam protection around http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com