[jboss-user] [JBoss Seam] - datatable + binding + conversation problem

mail.micke@gmail.com do-not-reply at jboss.com
Mon Feb 11 05:25:14 EST 2008


Hi

I've never really using binding much, and just ran into a problem which I hope you guys might help me with (even if it isn't a seam issue).

I have a table which is backed by a bean in a long running conversation, when I use a datatable defined by XHTML it works fine. 
But when I switch to using binding for the datatable I have some problems.

When using the datascroller for moving to a new page of the data table I get this error (this works when not using binding with the same backing bean):

  | SEVERE: JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: /jsf/sdb/binding.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl at 14d948b]
  | 2008/02/11 09:57:13,194 ===========  RESTORE_VIEW 1 Time spent = 0 seconds
  | 2008/02/11 09:57:13,210 Servlet.service() for servlet Faces Servlet threw exception
  | javax.el.PropertyNotFoundException: /jsf/sdb/binding.xhtml @17,45 binding="#{sdb.bindingDataTable}": Target Unreachable, identifier 'sdb' resolved to null
  | 	at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:95)
  | 	at com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:240)
  | 

Why is it that my backing "sdb" bean resolves to null when I use binding?

Backing bean:

  | @Name("sdb")
  | @Scope(ScopeType.CONVERSATION)
  | public class SingleDealBrowser implements Serializable{
  | 
  |     // cut
  |     private List<PositionDisplayWrapper> allPositionWrappers;
  | 
  |     private HtmlDataTable bindingDataTable = null;
  | 
  |     @Create
  |     public void init(){
  |         System.out.println("SDB init()");
  |         if(!conversation.isLongRunning()){
  |             conversation.setDescription("SDB " +cpty +"," +cptyGroup +"," +expType);
  |             //Lets promote it into a long running one
  |             boolean status = conversation.begin();
  |             System.out.println("Tried to begin a long running conversation, status=" +status);
  |         }
  | 
  |         runSearch();
  | 
  |     }
  | 

XHTML snippet :

  |     <ui:define name="posListing">
  |         <rich:dataTable id="posListingTable"
  |                         binding="#{sdb.bindingDataTable}"
  |                         value="#{sdb.allPositionWrappers}"
  |                         style="width:100%;">
  |         </rich:dataTable>
  |     </ui:define>
  | 

Cheers,
 Micke

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

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



More information about the jboss-user mailing list