Hi dear all,

 

I am using portlet and want to insert a tag <s:inputSuggestAjax> into one of my .jsp page. However, it doesn’t work due to a _javascript_ error “element.getClassName has no properties” in firefox.

 

I have read the generated html file, even jumped deeply into the source codes of myfaces and found following problem:

 

Within the generated html page, myfaces generates following _javascript_ codes for inputSuggestAjax:

 

                  <SCRIPT type=text/_javascript_><!--

new Ajax.MyFacesAutocompleter('Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2','Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2_auto_complete','/pluto/portal/ProcessOverviewPortlet/_ac_ProcessOverviewPortlet_r1_c1_p1/AC/_pid/ProcessOverviewPortlet_r1_c1_p1?org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=%2Fview.jsp?affectedAjaxComponent=Pluto_ProcessOverviewPortlet_r1_c1_p1__id0:Pluto_ProcessOverviewPortlet_r1_c1_p1__id2', {

      method:       'post',

      asynchronous: true,

      parameters: '',

      callback: function(element,entry) {return entry+'&jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'&jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'&jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)}    })

//--></SCRIPT>

 

Note that the third parameter of the js function, which should be an encodeURL, contains TWO “?”, the first is generated by the portlet, the second by the myfaces! Therefore it is no more a valid encodeURL to parse by myfaces!

 

So it seems that inputSuggestAjax does not support any call by a page whose URL already contains parameters. Any tips or suggestions how to resolve this problem?

 

Mit freundlichen Grüßen / Kindest regards

 

Haihua Luo

 

Entwicklung BIS / Development BIS

---
SEEBURGER AG, Edisonstrasse 1, D-75015 Bretten, Germany
Fon:+49(0)7252 96-1614

mail.to: [EMAIL PROTECTED] 

http://www.seeburger.de/
We integrate B2B Solutions

 

Reply via email to