1 Reply Latest reply on Sep 16, 2008 6:16 AM by Andrei Markavtsov

    fileUpload to spring webflow action

    Mark Diskin Newbie

      webflow has started to support richfaces, but I'm (plus others) are having problems getting these to work seamlessly together.

      Here's some of the work so far -
      http://forum.springframework.org/showthread.php?t=59717&highlight=rich%3AfileUpload
      http://forum.springframework.org/showthread.php?t=59485&highlight=rich%3AfileUpload

      Is it possible to have the actionListener call into the webflow event cycle? It looks like this is outside the flow.

      Also is there a way to get more info on the transfer error to see what's going missing.

      Here's the log output if it helps:

      debug[15:18:17,763]: NEW AJAX REQUEST !!! with form :confirm
      debug[15:18:17,764]: Append hidden control confirm with value [confirm] and value attribute [confirm]
      debug[15:18:17,765]: Append file control confirm:upload1:file with value [databasedef.bmp] and value attribute [null]
      debug[15:18:17,765]: Append file control confirm:upload1:file with value [] and value attribute [null]
      debug[15:18:17,765]: parameter _richfaces_upload_uid with value 0.45151191310452865
      debug[15:18:17,766]: parameter action with value progress
      debug[15:18:17,766]: parameter ajaxSingle with value confirm:upload1
      debug[15:18:17,767]: parameter confirm:upload1 with value confirm:upload1
      debug[15:18:17,767]: Start XmlHttpRequest
      debug[15:18:17,768]: Reqest state : 1
      debug[15:18:17,768]: QueryString: AJAXREQUEST=_viewRoot&confirm=confirm&confirm%3Aupload1%3Afile=databasedef.bmp&confirm%3Aupload1%3Afile=&_richfaces_upload_uid=0.45151191310452865&action=progress&ajaxSingle=confirm%3Aupload1&confirm%3Aupload1=confirm%3Aupload1&
      debug[15:18:17,777]: Reqest state : 1
      debug[15:18:18,667]: NEW AJAX REQUEST !!! with form :confirm
      debug[15:18:18,668]: Append hidden control confirm with value [confirm] and value attribute [confirm]
      debug[15:18:18,668]: Append file control confirm:upload1:file with value [databasedef.bmp] and value attribute [null]
      debug[15:18:18,668]: Append file control confirm:upload1:file with value [] and value attribute [null]
      debug[15:18:18,669]: parameter confirm:j_id37 with value confirm:j_id37
      debug[15:18:18,669]: parameter ajaxSingle with value confirm:j_id37
      debug[15:18:18,669]: parameter percent with value percent
      debug[15:18:18,670]: Start XmlHttpRequest
      debug[15:18:18,670]: Reqest state : 1
      debug[15:18:18,671]: QueryString: AJAXREQUEST=_viewRoot&confirm=confirm&confirm%3Aupload1%3Afile=databasedef.bmp&confirm%3Aupload1%3Afile=&confirm%3Aj_id37=confirm%3Aj_id37&ajaxSingle=confirm%3Aj_id37&percent=percent&
      debug[15:18:18,677]: Reqest state : 1
      debug[15:18:19,320]: Reqest state : 2
      debug[15:18:19,321]: Reqest state : 3
      debug[15:18:19,322]: Reqest state : 4
      debug[15:18:19,322]: Reqest end with state 4
      debug[15:18:19,322]: Response with content-type: text/xml;charset=UTF-8
      debug[15:18:19,323]: Full response content: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><link href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link media="rich-extended-skinning" href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg.ajax4jsf.javascript.AjaxScript"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg.ajax4jsf.javascript.PrototypeScript"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/utils.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/json/json-dom.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/js/FileUpload.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/js/swfobject.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/js/progressBar.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/ajax4jsf/javascript/scripts/form.js"> </script><link href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/fileUpload.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/progressBar.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAcss/panel.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAcss/table.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAMETA-INF/skins/laguna.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/skinning.js"> </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" /><span id="_ajax:data"><![CDATA[ 713664 ]]></span></body></html>
      debug[15:18:19,324]: Header Ajax-Expired not found, search in <meta>
      debug[15:18:19,325]: search for elements by name 'meta' in element #document
      debug[15:18:19,559]: Find <meta name='Ajax-Update-Ids' content=''>
      debug[15:18:19,560]: Find <meta name='Ajax-Response' content='true'>
      debug[15:18:19,560]: Call request onbeforedomupdate function before replacing elemements
      debug[15:18:19,560]: call getElementById for id= _ajax:data
      debug[15:18:19,611]: Header Ajax-Update-Ids not found, search in <meta>
      debug[15:18:19,612]: search for elements by name 'meta' in element #document
      debug[15:18:19,816]: Find <meta name='Ajax-Update-Ids' content=''>
      warn[15:18:19,816]: No information in response about elements to replace
      debug[15:18:19,816]: call getElementById for id= org.ajax4jsf.oncomplete
      debug[15:18:19,817]: call getElementById for id= ajax-view-state
      debug[15:18:19,817]: Hidden JSF state fields: [object HTMLSpanElement]
      debug[15:18:19,817]: Namespace for hidden view-state input fields is undefined
      debug[15:18:19,817]: search for elements by name 'input' in element span
      debug[15:18:19,961]: Replace value for inputs: 4 by new values: 0
      debug[15:18:19,961]: search for elements by name 'INPUT' in element span
      debug[15:18:20,105]: Replace value for inputs: 4 by new values: 0
      debug[15:18:20,106]: call getElementById for id= _A4J.AJAX.focus
      debug[15:18:20,106]: No focus information in response
      debug[15:18:21,505]: Reqest state : 2
      debug[15:18:21,507]: Reqest state : 3
      debug[15:18:21,507]: Reqest state : 4
      debug[15:18:21,508]: Reqest end with state 4
      debug[15:18:21,508]: Response with content-type: text/xml;charset=UTF-8
      debug[15:18:21,508]: Full response content: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><link href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link media="rich-extended-skinning" href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg.ajax4jsf.javascript.AjaxScript"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg.ajax4jsf.javascript.PrototypeScript"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/utils.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/json/json-dom.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/js/FileUpload.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/js/swfobject.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/js/progressBar.js"> </script><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/ajax4jsf/javascript/scripts/form.js"> </script><link href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/fileUpload.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/progressBar.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAcss/panel.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAcss/table.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><link href="/raweb/a4j/s/3_2_2.GAMETA-INF/skins/laguna.xcss/DATB/eAFb-IhhU-jyGdIAE0wD5Q__" type="text/css" rel="stylesheet" class="component" /><script type="text/javascript" src="/raweb/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/skinning.js"> </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" /><span id="_ajax:data"><![CDATA[ {'value':0,'enabled':'false','interval':1000} ]]></span></body></html>
      debug[15:18:21,509]: Header Ajax-Expired not found, search in <meta>
      debug[15:18:21,509]: search for elements by name 'meta' in element #document
      debug[15:18:21,746]: Find <meta name='Ajax-Update-Ids' content=''>
      debug[15:18:21,747]: Find <meta name='Ajax-Response' content='true'>
      debug[15:18:21,747]: Call request onbeforedomupdate function before replacing elemements
      debug[15:18:21,747]: call getElementById for id= _ajax:data
      debug[15:18:21,811]: Header Ajax-Update-Ids not found, search in <meta>
      debug[15:18:21,812]: search for elements by name 'meta' in element #document
      debug[15:18:22,001]: Find <meta name='Ajax-Update-Ids' content=''>
      warn[15:18:22,002]: No information in response about elements to replace
      debug[15:18:22,002]: call getElementById for id= org.ajax4jsf.oncomplete
      debug[15:18:22,002]: call getElementById for id= ajax-view-state
      debug[15:18:22,003]: Hidden JSF state fields: [object HTMLSpanElement]
      debug[15:18:22,003]: Namespace for hidden view-state input fields is undefined
      debug[15:18:22,003]: search for elements by name 'input' in element span
      debug[15:18:22,145]: Replace value for inputs: 4 by new values: 0
      debug[15:18:22,145]: search for elements by name 'INPUT' in element span
      debug[15:18:22,290]: Replace value for inputs: 4 by new values: 0
      debug[15:18:22,291]: call getElementById for id= _A4J.AJAX.focus
      debug[15:18:22,291]: No focus information in response
      


      It would be great to be able to use richfaces more extensively with webflow, so any help would be greatly appeciated,

      Thanks
      Mark