Announcement Announcement Module
Collapse
No announcement yet.
Binding Singleton List object to ShuttleList ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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()));
    }

    @Override
    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));

    builder.add(shuttleListBinding);
    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
    Michal
Working...
X