I've found a way around this.

In my CONVERSATION scoped component I inject an EVENT scoped component, which 
handles the binding.

So my conversation component looks something like:
@Stateful
  | @Name("cart")
  | @Interceptors(SeamInterceptor.class)
  | public class ShoppingCartBean implements ShoppingCart, Serializable {
  | ...
  |     @In(value="cartTable", create=true)
  |     private transient TableBinding table;
  | ...
  | }
  | 

And my event component looks something like:
@Name("cartTable")
  | @Scope(ScopeType.EVENT)
  | public class ShoppingCartTableBinding extends TableBinding {
  | }
  | 

Just for completeness, my TableBinding class is used to bind to a ADF Faces 
Table component:
public abstract class TableBinding {
  | 
  |     private UIXTable table;
  | 
  |     public UIXTable getBinding() {
  |         return table;
  |     }
  | 
  |     public void setBinding(UIXTable table) {
  |         this.table = table;
  |     }
  | 
  |     public List getSelectedRows() {
  |         List selectedRows = new ArrayList();
  | 
  |         Object oldKey = table.getRowKey();
  |         Set<String> selectedKeys = table.getSelectionState().getKeySet();
  | 
  |         for (String rowKey : selectedKeys) {
  |             table.setRowKey(rowKey);
  |             selectedRows.add(table.getRowData());
  |         }
  | 
  |         table.setRowKey(oldKey);
  |         
  |         return selectedRows;
  |     }
  |     
  |     public void clearSelection() {
  |         table.getSelectionState().clear();
  |     }
  | }
  | 
And my JSF page looks something like:
...
  |             <af:table binding="#{cartTable.binding}" ...>
  | ...
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3931886#3931886

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3931886


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to