0 Replies Latest reply on Jan 26, 2012 6:40 AM by Sergey Morenets

    SerializableDataModel doesn't work with a4j:actionparam

    Sergey Morenets Novice

      Hi

       

      I have encountered the following issue. My rich:dataTable uses SerializableDataModel as data source.

      Everything went OK except the following case. When I had a4j:commandLink with a4j:actionparam involved

      the a4j:actionparam was never assigned. If I switched back to the list of entities as data source the actionparam

      worked perfectly.

       

      My JSF:

       

      {code:xml}

      <rich:dataTable value="#{paginatedModel}" id="accounts" rows="10"
      var="accountBean" width="100%" status="ajaxStatus"
      rendered="#{paginatedModel.rowCount != 0}" reRender="ds">
      <rich:column sortBy="#{accountBean.name}" width="30%">
      <f:facet name="header">
      <h:outputText value="#{msg['user.fullname']}" />
      </f:facet>
      <h:outputLink value="profile">
      <f:param name="id" value="#{accountBean.personId}" />
      <h:outputText value="#{accountBean.name}" />
      </h:outputLink>
      </rich:column>
      <rich:column width="60">
      <a4j:commandLink
      oncomplete="Richfaces.showModalPanel('confirmation');"
      reRender="confirmation">
      <a4j:actionparam name="action" value="#{msg['action.delete']}"
      assignTo="#{confirmationBean.action}" />
      <a4j:actionparam name="subject" value="#{accountBean.name}"
      assignTo="#{confirmationBean.subject}" />
      <a4j:actionparam name="data" value="#{accountBean.id}"
      assignTo="#{confirmationBean.data}" />
      <a4j:actionparam name="functionName" value="deleteAccount"
      assignTo="#{confirmationBean.functionName}" />
      <h:graphicImage url="/resources/images/delete.gif"
      alt="#{msg['action.delete']}" />
      </a4j:commandLink>
      </rich:column>
      </rich:dataTable>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {code}

       

      Contents of the a4j:log

       

      debug[13:17:21,430]: Have Event [object Object] with properties: target: [object HTMLImageElement], srcElement: undefined, type: click

      debug[13:17:21,430]: Query preparation for form 'usersForm' requested

      debug[13:17:21,430]: Append hidden control usersForm with value [usersForm] and value attribute [usersForm]

      debug[13:17:21,430]: Append hidden control usersForm:confirmationOpenedState with value [] and value attribute [null]

      debug[13:17:21,430]: Append text control usersForm:j_id279 with value [] and value attribute [null]

      debug[13:17:21,431]: parameter action with value удалить

      debug[13:17:21,431]: parameter data with value 10

      debug[13:17:21,431]: parameter usersForm:accounts:10:j_id307 with value usersForm:accounts:10:j_id307

      debug[13:17:21,431]: parameter subject with value Oleg G.

      debug[13:17:21,431]: parameter functionName with value deleteAccount

      debug[13:17:21,431]: Look up queue with default name

      debug[13:17:21,431]: NEW AJAX REQUEST !!! with form: usersForm

      debug[13:17:21,431]: Start XmlHttpRequest

      debug[13:17:21,431]: Reqest state : 1

      debug[13:17:21,432]: QueryString: AJAXREQUEST=_viewRoot&usersForm=usersForm&usersForm%3AconfirmationOpenedState=&usersForm%3Aj_id279=&action=%D1%83%D0%B4%D0%B0%D0%BB%D0%B8%D1%82%D1%8C&data=10&usersForm%3Aaccounts%3A10%3Aj_id307=usersForm%3Aaccounts%3A10%3Aj_id307&subject=Oleg%20G.&functionName=deleteAccount&

      debug[13:17:21,434]: Reqest state : 1

      debug[13:17:21,681]: Reqest state : 2

      debug[13:17:21,682]: Reqest state : 3

      debug[13:17:21,682]: Reqest state : 4

      debug[13:17:21,682]: Reqest end with state 4

      debug[13:17:21,683]: Response with content-type: text/xml;charset=UTF-8

      debug[13:17:21,683]: Full response content: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" media="rich-extended-skinning" rel="stylesheet" type="text/css" /><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg.ajax4jsf.javascript.AjaxScript" type="text/javascript"> </script><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAcss/toolBar.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg.ajax4jsf.javascript.PrototypeScript" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/utils.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/ajax4jsf/javascript/scripts/form.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/form.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/panelMenu.js" type="text/javascript"> </script><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAorg/richfaces/renderkit/html/css/panelMenu.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAcss/panel.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/browser_info.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/modalPanel.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/modalPanelBorders.js" type="text/javascript"> </script><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/jquery/jquery.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/jquery.hotkeys.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/hotKey.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/available.js" type="text/javascript"> </script><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/script/controlUtils.js" type="text/javascript"> </script><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAcss/table.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/datascroller.js" type="text/javascript"> </script><link class="component" href="/tourclub-web-2.1.0-RELEASE/site/a4j/s/3_3_1.GAcss/datascroller.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css" /><script src="/tourclub-web-2.1.0-RELEASE/site/a4j/g/3_3_1.GAorg/richfaces/renderkit/html/scripts/skinning.js" type="text/javascript"> </script><meta name="Ajax-Update-Ids" content="" /><title></title></head><body><span id="ajax-view-state"></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>

      debug[13:17:21,683]: Header Ajax-Expired not found, search in <meta>

      debug[13:17:21,683]: search for elements by name 'meta' in element #document

      debug[13:17:21,684]: Find <meta name='Ajax-Update-Ids' content=''>

      debug[13:17:21,685]: Find <meta name='Ajax-Response' content='true'>

      debug[13:17:21,685]: Header Ajax-Update-Ids not found, search in <meta>

      debug[13:17:21,685]: search for elements by name 'meta' in element #document

      debug[13:17:21,686]: Find <meta name='Ajax-Update-Ids' content=''>

      warn[13:17:21,686]: No information in response about elements to replace