3 Replies Latest reply on Sep 28, 2007 1:06 AM by Andreas Franke

    Action in datatable not called

    Andreas Franke Apprentice

      Hi,

      have used similar working cases few times before.

      Project is created with Seam CR1 with included richfaces libraries.

      I have a bean that extends EntityQuery(Seam component) and a method to set a specific entity

      @Name("recipientsList")
      public class RecipientsList extends EntityQuery {
       private Recipients selectedRecipient;
       public void setSelectedRecipient(Recipients selectedRecipient) {
       this.selectedRecipient = selectedRecipient;
       }
      }
      


      and a datatable with the corresponding action method inside.

      <a:form id="resultFrom">
       <rich:dataTable id="searchresults"
       onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       var="addrlist"
       value="#{addresslist}">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column>
       <h:outputText value="Surname"></h:outputText>
       </rich:column>
       </rich:columnGroup>
       </f:facet>
       <rich:column>
       <h:outputText value="#{addrlist.surname}"></h:outputText>
       </rich:column>
       <a:support id="support1" event="onRowClick" action="#{recipientsList.setSelectedRecipient(addrlist)}"/>
       </rich:dataTable>
       <a:log popup="true" level="ALL" hotkey="M" style="width: 800px; height: 300px;"></a:log>
       </a:form>
      


      No problems times before, but now the backing-bean method is never called.
      If I put a commandlink after the datatable and invoke this the mehtod is called, but the same commandlink inside the datatable never is invoked.

      also played with outputpanel around the form etc but no satisfaction :(

      Here the ajax-log of the working one:

      debug[12:46:29,724]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
      debug[12:46:29,724]: NEW AJAX REQUEST !!! with form :upperform
      debug[12:46:29,724]: Append hidden control upperform with value [upperform] and value attribute [upperform]
      debug[12:46:29,739]: Append hidden control autoScroll with value [] and value attribute []
      debug[12:46:29,739]: Append hidden control upperform:_idcl with value [] and value attribute []
      debug[12:46:29,739]: Append hidden control upperform:_link_hidden_ with value [] and value attribute []
      debug[12:46:29,739]: Append hidden control jsf_sequence with value [1] and value attribute [1]
      debug[12:46:29,755]: Append hidden control javax.faces.ViewState with value [j_id18:j_id21] and value attribute [j_id18:j_id21]
      debug[12:46:29,755]: parameter upperform:j_id40:2:support1 with value upperform:j_id40:2:support1
      debug[12:46:29,755]: Start XmlHttpRequest
      debug[12:46:29,770]: Reqest state : 1
      debug[12:46:29,770]: QueryString: AJAXREQUEST=_viewRoot&upperform=upperform&autoScroll=&upperform%3A_idcl=&upperform%3A_link_hidden_=&jsf_sequence=1&javax.faces.ViewState=j_id18%3Aj_id21&upperform%3Aj_id40%3A2%3Asupport1=upperform%3Aj_id40%3A2%3Asupport1&
      debug[12:46:29,770]: Reqest state : 1
      debug[12:46:29,849]: Reqest state : 2
      debug[12:46:29,864]: Reqest state : 3
      debug[12:46:29,864]: Reqest state : 4
      debug[12:46:29,880]: Reqest end with state 4
      debug[12:46:29,880]: Response with content-type: text/xml;charset=UTF-8
      debug[12:46:29,880]: Full response content: <?xml version="1.0"?>
      <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><link type="text/css" rel="stylesheet" href="/sonderfreigabe/a4j.res/css/panelbar.xcss/DATA/eAGbf-TcKwAHUgMc" /><link type="text/css" rel="stylesheet" href="/sonderfreigabe/a4j.res/css/table.xcss/DATA/eAGbf-TcKwAHUgMc" /><link type="text/css" rel="stylesheet" href="/sonderfreigabe/a4j.res/css/tabPanel.xcss/DATA/eAGbf-TcKwAHUgMc" /><script type="text/javascript" src="/sonderfreigabe/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j.res/org.ajax4jsf.framework.resource.PrototypeScript">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j.res/org.ajax4jsf.framework.ajax.ImageCacheScript">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j.res/org/richfaces/renderkit/html/scripts/browser_info.js">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j.res/scripts/panelbar.js">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j.res/org/ajax4jsf/renderkit/html/scripts/form.js">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j.res/scripts/tabPanel.js">
      </script></head><body><form id="lowerform" name="lowerform" method="post" action="/sonderfreigabe/main.seam" enctype="application/x-www-form-urlencoded"><input type="hidden" name="lowerform" value="lowerform" /> <table border="0" cellpadding="0" cellspacing="0" class="rich-tabpanel" id="lowerform:j_id65" style="width:100%;height:85%"><tbody><tr><td align="left"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><img border="0" height="1" src="/sonderfreigabe/a4j.res/images/spacer.gif" width="2" /></td><td id="lowerform:j_id66_cell" style="height: 100%; vertical-align: bottom;" class="dr-tbpnl-tbcell-act rich-tabhdr-cell-active"><table border="0" cellpadding="0" cellspacing="0" onclick="if (RichFaces.isTabActive('lowerform:j_id66_lbl')) return false;A4J.AJAX.Submit('_viewRoot','lowerform',event,{'parameters':{'lowerform:j_id66':'lowerform:j_id66'} ,'actionUrl':'/sonderfreigabe/main.seam'} ); return false; this.onclick = null;" style="null;height : 100%; position : relative; z-index : 2;"><tbody><tr><td class="dr-tbpnl-tbbrdr rich-tabhdr-side-border"><img border="0" height="1" src="/sonderfreigabe/a4j.res/images/spacer.gif" width="1" /></td><td class="dr-tbpnl-tbtopbrdr rich-tabhdr-side-cell"><table border="0" cellpadding="0" cellspacing="0" style="height: 100%; width: 100%;"><tbody><tr><td id="lowerform:j_id66_lbl" onmouseover="RichFaces.overTab(this);" onmouseout="RichFaces.outTab(this);" class="dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-act rich-tab-active">Daten</td></tr></tbody></table></td><td class="dr-tbpnl-tbbrdr rich-tabhdr-side-border"><img border="0" height="1" src="/sonderfreigabe/a4j.res/images/spacer.gif" width="1" /></td></tr></tbody></table></td><td><img border="0" height="1" src="/sonderfreigabe/a4j.res/images/spacer.gif" style="width: 1px" /></td><td><img border="0" height="1" src="/sonderfreigabe/a4j.res/images/spacer.gif" width="1" /></td></tr></tbody></table></td></tr><tr><td height="100%" id="lowerform:j_id66" style="position: relative;"><table border="0" cellpadding="10" cellspacing="0" class="dr-tbpnl-cntnt-pstn rich-tabpanel-content-position" style="position : relative; z-index: 1;" width="100%"><tbody><tr><td class="dr-tbpnl-cntnt rich-tabpanel-content" style=";"><table><tbody><tr><td><label for="lowerform:surname">Nachname</label></td><td><input id="lowerform:surname" type="text" name="lowerform:surname" value="Franke" class="greyedfield" title="Nachname" readonly="readonly" /></td></tr><tr><td><label for="lowerform:forename">Vorname</label></td><td><input id="lowerform:forename" type="text" name="lowerform:forename" value="Andreas" class="greyedfield" title="Vorname" readonly="readonly" /></td></tr><tr><td><label for="lowerform:username">Benutzername</label></td><td><input id="lowerform:username" type="text" name="lowerform:username" value="FA78BH" class="greyedfield" title="Benutzername" readonly="readonly" /></td></tr><tr><td><label for="lowerform:email">E-Mail</label></td><td><input id="lowerform:email" type="text" name="lowerform:email" value="external.Andreas.Franke@de.bosch.com" class="greyedfield" title="E-Mail" readonly="readonly" /></td></tr></tbody></table><a href="#" id="lowerform:savePerson" name="lowerform:savePerson" onclick="A4J.AJAX.Submit('_viewRoot','lowerform',event,{'parameters':{'conversationId':'23','lowerform:savePerson':'lowerform:savePerson'} ,'actionUrl':'/sonderfreigabe/main.seam'} );return false;">Im lokalen Adressbuch speichern</a></td></tr></tbody></table></td></tr></tbody></table><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id18:j_id22" /></form><meta name="Ajax-Update-Ids" content="lowerform" /><span id="ajax-update-ids"><input type="hidden" name="jsf_sequence" value="1" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id18:j_id22" /></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
      debug[12:46:29,880]: Update page by list of rendered areas from response lowerform
      debug[12:46:29,895]: search for elements by name 'script' in element #document
      debug[12:46:29,911]: selectNodes found 7
      debug[12:46:29,911]: <script> in response with src=/sonderfreigabe/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript
      debug[12:46:29,911]: Such element exist in document
      debug[12:46:29,927]: <script> in response with src=/sonderfreigabe/a4j.res/org.ajax4jsf.framework.resource.PrototypeScript
      debug[12:46:29,927]: Such element exist in document
      debug[12:46:29,927]: <script> in response with src=/sonderfreigabe/a4j.res/org.ajax4jsf.framework.ajax.ImageCacheScript
      debug[12:46:29,927]: Such element exist in document
      debug[12:46:29,942]: <script> in response with src=/sonderfreigabe/a4j.res/org/richfaces/renderkit/html/scripts/browser_info.js
      debug[12:46:29,942]: Such element exist in document
      debug[12:46:29,942]: <script> in response with src=/sonderfreigabe/a4j.res/scripts/panelbar.js
      debug[12:46:29,958]: Such element exist in document
      debug[12:46:29,958]: <script> in response with src=/sonderfreigabe/a4j.res/org/ajax4jsf/renderkit/html/scripts/form.js
      debug[12:46:29,958]: Such element exist in document
      debug[12:46:29,958]: <script> in response with src=/sonderfreigabe/a4j.res/scripts/tabPanel.js
      debug[12:46:29,974]: Such element exist in document
      debug[12:46:29,974]: search for elements by name 'link' in element #document
      debug[12:46:29,974]: selectNodes found 3
      debug[12:46:29,974]: <link> in response with src=/sonderfreigabe/a4j.res/css/panelbar.xcss/DATA/eAGbf-TcKwAHUgMc
      debug[12:46:29,989]: Such element exist in document
      debug[12:46:29,989]: <link> in response with src=/sonderfreigabe/a4j.res/css/table.xcss/DATA/eAGbf-TcKwAHUgMc
      debug[12:46:29,989]: Such element exist in document
      debug[12:46:30,005]: <link> in response with src=/sonderfreigabe/a4j.res/css/tabPanel.xcss/DATA/eAGbf-TcKwAHUgMc
      debug[12:46:30,005]: Such element exist in document
      debug[12:46:30,005]: Attempt to update part of page for Id: lowerform
      debug[12:46:30,005]: call selectSingleNode for id= lowerform
      debug[12:46:30,020]: Replace content of node by outerHTML()
      debug[12:46:30,020]: search for elements by name 'script' in element form
      debug[12:46:30,036]: selectNodes found 0
      debug[12:46:30,036]: Scripts in updated part count : 0
      debug[12:46:30,036]: Update part of page for Id: lowerform successful
      debug[12:46:30,036]: call selectSingleNode for id= ajax-update-ids
      debug[12:46:30,052]: Hidden JSF state fields:
      debug[12:46:30,052]: Namespace for hidden view-state input fields is undefined
      debug[12:46:30,052]: search for elements by name 'input' in element span
      debug[12:46:30,052]: selectNodes found 2
      debug[12:46:30,067]: Replace value for inputs: 18 by new values: 2
      debug[12:46:30,067]: Input in response: jsf_sequence
      debug[12:46:30,067]: Found same input on page with type: hidden
      debug[12:46:30,083]: Input in response: javax.faces.ViewState
      debug[12:46:30,083]: Found same input on page with type: hidden
      debug[12:46:30,083]: Found same input on page with type: hidden
      debug[12:46:30,099]: Found same input on page with type: hidden
      debug[12:46:30,099]: Found same input on page with type: hidden
      debug[12:46:30,099]: search for elements by name 'INPUT' in element span
      debug[12:46:30,099]: selectNodes found 0
      debug[12:46:30,114]: Replace value for inputs: 18 by new values: 0
      debug[12:46:30,114]: call selectSingleNode for id= _A4J.AJAX.focus
      debug[12:46:30,114]: No focus information in response
      


      and the not working ajax-log

      debug[13:53:02,492]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
      debug[13:53:02,492]: NEW AJAX REQUEST !!! with form :resultFrom
      debug[13:53:02,492]: Append hidden control resultFrom with value [resultFrom] and value attribute [resultFrom]
      debug[13:53:02,492]: Append hidden control autoScroll with value [] and value attribute []
      debug[13:53:02,507]: Append hidden control resultFrom:_idcl with value [] and value attribute []
      debug[13:53:02,507]: Append hidden control resultFrom:_link_hidden_ with value [] and value attribute []
      debug[13:53:02,507]: Append hidden control javax.faces.ViewState with value [_id15] and value attribute [_id15]
      debug[13:53:02,523]: parameter resultFrom:searchresults:2:support1 with value resultFrom:searchresults:2:support1
      debug[13:53:02,523]: Start XmlHttpRequest
      debug[13:53:02,523]: Reqest state : 1
      debug[13:53:02,539]: QueryString: AJAXREQUEST=j_id34&resultFrom=resultFrom&autoScroll=&resultFrom%3A_idcl=&resultFrom%3A_link_hidden_=&javax.faces.ViewState=_id15&resultFrom%3Asearchresults%3A2%3Asupport1=resultFrom%3Asearchresults%3A2%3Asupport1&
      debug[13:53:02,539]: Reqest state : 1
      debug[13:53:02,664]: Reqest state : 2
      debug[13:53:02,679]: Reqest state : 3
      debug[13:53:02,679]: Reqest state : 4
      debug[13:53:02,679]: Reqest end with state 4
      debug[13:53:02,679]: Response with content-type: text/xml;charset=UTF-8
      debug[13:53:02,695]: Full response content: <?xml version="1.0"?>
      <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/sonderfreigabe/a4j_3_1_0-SNAPSHOTcss/panelbar.xcss/DATB/eAGTWzQ.BgAD.AG8" /><link type="text/css" rel="stylesheet" href="/sonderfreigabe/a4j_3_1_0-SNAPSHOTcss/panel.xcss/DATB/eAGTWzQ.BgAD.AG8" /><link type="text/css" rel="stylesheet" href="/sonderfreigabe/a4j_3_1_0-SNAPSHOTcss/table.xcss/DATB/eAGTWzQ.BgAD.AG8" /><script type="text/javascript" src="/sonderfreigabe/a4j_3_1_0-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j_3_1_0-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j_3_1_0-SNAPSHOTorg.ajax4jsf.javascript.ImageCacheScript">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j_3_1_0-SNAPSHOTorg/richfaces/renderkit/html/scripts/browser_info.js">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j_3_1_0-SNAPSHOTscripts/panelbar.js">
      </script><script type="text/javascript" src="/sonderfreigabe/a4j_3_1_0-SNAPSHOTorg/ajax4jsf/javascript/scripts/form.js">
      </script><meta name="Ajax-Update-Ids" content="" /><title></title></head><body><span id="ajax-view-state"><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id15" /></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
      debug[13:53:02,695]: Header Ajax-Expired not found, search in <meta>
      debug[13:53:02,711]: search for elements by name 'meta' in element #document
      debug[13:53:02,711]: selectNodes found 2
      debug[13:53:02,711]: Find <meta name='Ajax-Update-Ids' content=''>
      debug[13:53:02,711]: Find <meta name='Ajax-Response' content='true'>
      debug[13:53:02,711]: Header Ajax-Update-Ids not found, search in <meta>
      debug[13:53:02,726]: search for elements by name 'meta' in element #document
      debug[13:53:02,726]: selectNodes found 2
      debug[13:53:02,742]: Find <meta name='Ajax-Update-Ids' content=''>
      warn[13:53:02,742]: No information in response about elements to replace
      debug[13:53:02,742]: call selectSingleNode for id= ajax-view-state
      debug[13:53:02,742]: Hidden JSF state fields:
      debug[13:53:02,742]: Namespace for hidden view-state input fields is undefined
      debug[13:53:02,757]: search for elements by name 'input' in element span
      debug[13:53:02,757]: selectNodes found 1
      debug[13:53:02,773]: Replace value for inputs: 12 by new values: 1
      debug[13:53:02,773]: Input in response: javax.faces.ViewState
      debug[13:53:02,773]: Found same input on page with type: hidden
      debug[13:53:02,773]: Found same input on page with type: hidden
      debug[13:53:02,789]: Found same input on page with type: hidden
      debug[13:53:02,789]: search for elements by name 'INPUT' in element span
      debug[13:53:02,789]: selectNodes found 0
      debug[13:53:02,804]: Replace value for inputs: 12 by new values: 0
      debug[13:53:02,804]: call selectSingleNode for id= _A4J.AJAX.focus
      debug[13:53:02,804]: No focus information in response
      debug[13:53:02,820]: call selectSingleNode for id= org.ajax4jsf.oncomplete
      


      sorry for the poor format, I think ajax-log is to long.