Announcement Announcement Module
No announcement yet.
Binding Singleton List object to ShuttleList ? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Binding Singleton List object to ShuttleList ?

    Hi All,

    I wanted to ask whether it is possible to bind ShuttleList to singleton object.

    My singleton is composed of list of selectedItems.
    I wanted to use it across my application so it would keep certian essential information about filtering selection (which affects all views).

    The code looks as follows:

    public ShuttleListForm() { super(FormModelHelper.createFormModel(ListHolder.g etPortfolioHolder()));

    protected JComponent createFormControl() {
    SwingBindingFactory bindingFactory = new SwingBindingFactory(getFormModel());
    TableFormBuilder builder = new TableFormBuilder(bindingFactory);

    builder.setLabelAttributes("colGrId=label colSpec=leftref rowSpec=topref");
    ShuttleListBinding shuttleListBinding =
    (ShuttleListBinding) bindingFactory.createBoundShuttleList("selectedLis t", selectableList);

    shuttleListBinding.getControl().setPreferredSize(n ew Dimension(500, 300));

    return builder.getForm();

    The problem is that the list is not getting populated after i select some values and confirm selection on the form.

    Could you please advice how to solve that problem?

    I look forward to your reply.

    Best regards