You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michel Goldstein <mi...@gmail.com> on 2006/01/21 23:08:06 UTC
Receiving duplicate suggestions in InputSuggestAjax component
Hi,
This silly problem has been bugging me for a while. I try to use the
InputSuggestAjax component and it is working fine except that it shows the
results of the call twice! I've even deployed the sandbox-example war and it
had the same problem, even in the input that has a limit on the maximum
number of suggested items (for example, if I enter "a" on the limited input
box it displays "a 1", "a 2", "a 1", "a 2" even though the
maxSuggestedItems="2"). Is this a (known) bug? Or, just for a change, do I
have something misconfigured? I search in JIRA and couldn't find anything.
It was so obvious that the fact that I couldn't find anything in JIRA is
pointing me to the second hypothesis.
Just one other, perhaps related thing about the same component: When I look
in my logs of calls, I see that for every input that I type a letter on the
component, it calls the function that does the search twice (I've attached
the logs below). This search is a fairly expensive operation in my system
right now. Is this double call expected in the lifecycle or is there
something else going on?
Thank you,
Michel
-------------------------------
Here are the logs:
2006-01-21 13:40:47,321 67481 DEBUG [TP-Processor8] webapp.FacesServlet -
service begin
2006-01-21 13:40:47,321 67481 DEBUG [TP-Processor8]
servlet.ServletExternalContextImpl - Incoming request has Content-Type
header without character encoding: application/x-www-form-urlencoded
2006-01-21 13:40:47,321 67481 DEBUG [TP-Processor8]
lifecycle.LifecycleImpl- entering restoreView in
org.apache.myfaces.lifecycle.LifecycleImpl
2006-01-21 13:40:47,369 67529 DEBUG [TP-Processor8]
jsp.JspStateManagerImpl- Tree structure restored from server session
2006-01-21 13:40:47,371 67531 DEBUG [TP-Processor8]
lifecycle.LifecycleImpl- exiting restoreView in
org.apache.myfaces.lifecycle.LifecycleImpl
2006-01-21 13:40:47,371 67531 DEBUG [TP-Processor8]
lifecycle.LifecycleImpl- entering applyRequestValues in
org.apache.myfaces.lifecycle.LifecycleImpl
2006-01-21 13:40:47,371 67531 DEBUG [TP-Processor8]
api.AjaxDecodePhaseListener - In AjaxDecodePhaseListener beforePhase
2006-01-21 13:40:47,373 67533 DEBUG [TP-Processor8]
api.AjaxDecodePhaseListener - affectedAjaxComponent:
org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjax@a69ae7 -
_idJsp134
2006-01-21 13:40:47,374 67534 DEBUG [TP-Processor8]
beans.ComponentEditBean- Searching for attribute with prefix x
2006-01-21 13:40:47,432 67592 DEBUG [TP-Processor8]
api.AjaxDecodePhaseListener - In AjaxDecodePhaseListener beforePhase
2006-01-21 13:40:47,432 67592 DEBUG [TP-Processor8]
api.AjaxDecodePhaseListener - affectedAjaxComponent:
org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjax@a69ae7 -
_idJsp134
2006-01-21 13:40:47,436 67596 DEBUG [TP-Processor8]
beans.ComponentEditBean- Searching for attribute with prefix x
2006-01-21 13:40:47,478 67638 DEBUG [TP-Processor8]
lifecycle.LifecycleImpl- exiting from
lifecycle.execute in applyRequestValues because getResponseComplete is true
from one of the before listeners
2006-01-21 13:40:47,478 67638 DEBUG [TP-Processor8]
lifecycle.LifecycleImpl- exiting from
lifecycle.execute in render because getResponseComplete is true from one of
the before listeners
Re: Receiving duplicate suggestions in InputSuggestAjax component
Posted by Martin Marinschek <ma...@gmail.com>.
+1...
what a mess ;)
regards,
Martin
On 1/27/06, Volker Weber <us...@weber-oldenburg.de> wrote:
> Hi Michel,
>
> during investigating another problem with inputSuggestAjax involved i
> found the same behavior in sandbox example.
>
> The problem is the dublicated registration of the AjaxPhaseListener.
> It is registred in the examples WEB-INF/faces.config.xml, but is already
> in faces-config.xml of sandbox.jar.
>
> I'm going to remove the listener from the examples faces-config.xml, if
> i get no objections.
>
> Regards,
> Volker
>
> Michel Goldstein wrote:
> > Hi,
> >
> > This silly problem has been bugging me for a while. I try to use the
> > InputSuggestAjax component and it is working fine except that it shows
> > the results of the call twice! I've even deployed the sandbox-example
> > war and it had the same problem, even in the input that has a limit on
> > the maximum number of suggested items (for example, if I enter "a" on
> > the limited input box it displays "a 1", "a 2", "a 1", "a 2" even though
> > the maxSuggestedItems="2"). Is this a (known) bug? Or, just for a
> > change, do I have something misconfigured? I search in JIRA and couldn't
> > find anything. It was so obvious that the fact that I couldn't find
> > anything in JIRA is pointing me to the second hypothesis.
> >
> > Just one other, perhaps related thing about the same component: When I
> > look in my logs of calls, I see that for every input that I type a
> > letter on the component, it calls the function that does the search
> > twice (I've attached the logs below). This search is a fairly expensive
> > operation in my system right now. Is this double call expected in the
> > lifecycle or is there something else going on?
> >
> > Thank you,
> >
> > Michel
> >
>
>
> --
> 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.
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
Re: Receiving duplicate suggestions in InputSuggestAjax component
Posted by Volker Weber <us...@weber-oldenburg.de>.
Hi Michel,
during investigating another problem with inputSuggestAjax involved i
found the same behavior in sandbox example.
The problem is the dublicated registration of the AjaxPhaseListener.
It is registred in the examples WEB-INF/faces.config.xml, but is already
in faces-config.xml of sandbox.jar.
I'm going to remove the listener from the examples faces-config.xml, if
i get no objections.
Regards,
Volker
Michel Goldstein wrote:
> Hi,
>
> This silly problem has been bugging me for a while. I try to use the
> InputSuggestAjax component and it is working fine except that it shows
> the results of the call twice! I've even deployed the sandbox-example
> war and it had the same problem, even in the input that has a limit on
> the maximum number of suggested items (for example, if I enter "a" on
> the limited input box it displays "a 1", "a 2", "a 1", "a 2" even though
> the maxSuggestedItems="2"). Is this a (known) bug? Or, just for a
> change, do I have something misconfigured? I search in JIRA and couldn't
> find anything. It was so obvious that the fact that I couldn't find
> anything in JIRA is pointing me to the second hypothesis.
>
> Just one other, perhaps related thing about the same component: When I
> look in my logs of calls, I see that for every input that I type a
> letter on the component, it calls the function that does the search
> twice (I've attached the logs below). This search is a fairly expensive
> operation in my system right now. Is this double call expected in the
> lifecycle or is there something else going on?
>
> Thank you,
>
> Michel
>
--
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.