Hiu, Luo. Haihua wrote: > Hihi, > > it seems sth. Interesting: the alert function returns the whole html page > text instead of the inner ul text!
this is the case when the request is not handled by the AjaxDecodePhaseListener, or the listener did not find a requestParameter "affectedAjaxComponent". you can set log level to debug to see if the listener is invoked. Regards, Volker > > So is that the problem when generating response text with MyFaces? Or portlet? > > Regards, > > Haihua > > -----Ursprüngliche Nachricht----- > Von: Volker Weber [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 10. Februar 2006 17:09 > An: MyFaces Discussion > Betreff: Re: AW: AW: AW: integration problem with <s:inputSuggestAjax> and > portlet > > Hi, > > you can add a "alert(request.responseText)" on top of onComplete > function in myFaces.js to see what the server respond. This breaks the > function, because of focus lost in input, but you see what you get from > server. > > if this is not "<UL><LI>..." there is somthing wrong, and will not > displayed, this is just what i observed when testing, i haven't looked > deeper to see why. > > Regards, > Volker > > Luo. Haihua wrote: > >>Hihi Volker, >> >>I have checked out all the sources from the myfaces-current in svn and >>finally found out all the necessary js... >> >>With your files all javascript errors were gone! (Really a right way further! >>:)) But then it does not list the suggestions at all without any error report >>both in front end and back end, although the suggestion method defined in my >>bean has already been called. >> >>After somehow source code debug, I have found that the buffer defined in >>InputSuggestAjaxRenderer.class (Line 263) has already got what I wish to list >>until here: >>------------ >>buf.append("</ul>"); >> >>context.getResponseWriter().write(buf.toString()); >>------------ >> >>Then where will it be sent? How can I access the generated buffer? Really >>stuck...:( >> >>Cheers, >> >>Haihua >> >> >> >> >>-----Ursprüngliche Nachricht----- >>Von: Volker Weber [mailto:[EMAIL PROTECTED] >>Gesendet: Freitag, 10. Februar 2006 12:27 >>An: MyFaces Discussion >>Betreff: Re: AW: AW: integration problem with <s:inputSuggestAjax> and portlet >> >>Hi Haihua, >> >>no i haven't modified other files. >> >>in svn is version 1.5 of script.aculo.us files, from whre controls.js came. >> >>in version 1.4 (which was in myfaces until 22-dec-2005) the function was >>called "base_initialize", since 1.5 it is renamed to "baseInitialize". >> >>seems your sources are outdated, please update to svn head for testing >>this patch. >> >>I you haven't updated since maven-reorg you may need to do a clean >>checkout, see: >>http://wiki.apache.org/myfaces/Building_With_Maven >> >>Regards, >> Volker >> >>Luo. Haihua wrote: >> >> >>>Hi Volker, >>> >>>have you also modified the other js files? It says here that the js function >>>"baseInitialize" cannot be found. >>> >>>I have checked your js file: In your file there is a function called >>>"baseInitialize", while in my control.js it is called "base_initialize". >>> >>>So maybe there is a new update of control.js? However, I could not find it >>>in svn...:( >>> >>>Kindest regards, >>> >>>Haihua >>> >>>-----Ursprüngliche Nachricht----- >>>Von: Volker Weber [mailto:[EMAIL PROTECTED] >>>Gesendet: Donnerstag, 9. Februar 2006 19:54 >>>An: MyFaces Discussion >>>Betreff: Re: AW: integration problem with <s:inputSuggestAjax> and portlet >>> >>>Hi, >>> >>>yes this and related changes in myFaces.js was my first idea, but this >>>did not work right. >>>I added a additional field to the options. >>> >>>Seems you have the sources? please try the attached files, it works on >>>my tomcat, but i can't test on a portlet. >>> >>>If this works i can commit this into svn. >>> >>>Regards, >>> Volker >>> >>>PS: please rename myFaces.js-xxx as myFaces.js, js files are blocked >> >>>from my firewall. >> >>>Luo. Haihua wrote: >>> >>> >>> >>>>Hi Volker, >>>> >>>>thanks for ur always warm-hearted reply!:) >>>> >>>>Do you mean sth. like this in InputSuggestAjaxRenderer.java? >>>> >>>> out.writeText("', {\n" + >>>> " method: 'post',\n" + >>>>... >>>> " parameters: 'affectedAjaxComponent=" + clientId + >>>> "',\n" + >>>>... >>>> >>>>It seems that it still not work... >>>> >>>>Cheers, >>>> >>>>Haihua >>>> >>>> >>>> >>>>-----Ursprüngliche Nachricht----- >>>>Von: Volker Weber [mailto:[EMAIL PROTECTED] >>>>Gesendet: Donnerstag, 9. Februar 2006 11:50 >>>>An: MyFaces Discussion >>>>Betreff: Re: integration problem with <s:inputSuggestAjax> and portlet >>>> >>>>Hi, >>>> >>>>i think this can be solved by adding the parameters as post parameter to >>>>the options, instead of empty. >>>> >>>>I will give it a try this afternoon (german time). >>>> >>>>Regards, >>>>Volker >>>> >>>>Luo. Haihua wrote: >>>> >>>> >>>> >>>> >>>>>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 >>>>> >>>>> >>>> >>>> > -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.

