You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Ageeb <mi...@acm.org> on 2006/05/18 17:26:17 UTC

inputSuggestAjax inside AjaxAnyWhere zone does not work

Hello,
   I wonder if any body faced this problem before
I'm using AjaxAnyWhere 1.2-RC1 with sandbox-1.1.3 snabshot. when i put the
inputSuggestAjax component inside the AA zone it became a usual/normal input
box after the zone reloading.

<aa:zoneJSF id="CountryZone">
                        <s:inputSuggestAjax id="Country"
suggestedItemsMethod="#{CustomerBranchSelection.getCountriesSuggest}"
                        value="#{CustomerBranchSelection.country}"
valueChangeListener="#{CustomerBranchSelection.countryValueChangeListener
}"/>
</aa:zoneJSF>

when reloading the CountryZone the input ajax component became a regular
text box.
when i referesh the page in the browser the component recovers its ajax
ability.

-- 
http://mageeb.net
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.gnu.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature

Re: inputSuggestAjax inside AjaxAnyWhere zone does not work

Posted by Andrew Robinson <an...@gmail.com>.
actually AjaxAnywhere does support it, but it needs help. Check out
the JavaScript docs at:

http://ajaxanywhere.sourceforge.net/js_docs_out/index.html

You will see a function:
Object getGlobalScriptsDeclarationsList(script)

      If the HTML received in responce to AJAX request contains
JavaScript that defines new functions/variables, they must be
propagated to the proper context. Override this method to return the
Array of function/variable names.

so you can implement it like:
var vars = new Array()
vars.push('someNewFunction')
return vars

The obvious problem is that you have to code it yourself.

-Andrew


On 5/18/06, Sanjiv Jivan <sa...@gmail.com> wrote:
>
> Also not that the current version of AjaxAnywhere does not support "new"
> content that introduces new javascript functions and global variables. For
> example if you have a zone that returns javascript like the one below, the
> someNewFunction() call will fail.
>
> <script type="text/javascript">
>   funtion someNewFunction() {
>    ...
>    ...
>   }
>
>   someNewFunction();
> </script>
>
> I've seen several Faces components that introduce such scriptlets. I've made
> this and it will be in the next version of AjaxAnywhere.
>
> Sanjiv
>
>
> On 5/18/06, Andrew Robinson <an...@gmail.com> wrote:
> > Check to see what JavaScript is being used by inputSuggestAjax,
> > chances are it is not AjaxAnywhere friendly. Remember that JavaScript
> > is run as an "eval" in AjaxAnywhere, not as in-line document
> > JavaScript.
> >
> > This also breaks some tomahawk components (they were not built for
> > being run after the page was built).
> >
> > -Andrew
> >
> > On 5/18/06, Michael Ageeb <mi...@acm.org> wrote:
> > > Hello,
> > >    I wonder if any body faced this problem before
> > > I'm using AjaxAnyWhere 1.2-RC1 with sandbox-1.1.3 snabshot. when i put
> the
> > > inputSuggestAjax component inside the AA zone it became a usual/normal
> input
> > > box after the zone reloading.
> > >
> > > <aa:zoneJSF id="CountryZone">
> > >                         <s:inputSuggestAjax id="Country"
> > >
> suggestedItemsMethod="#{CustomerBranchSelection.getCountriesSuggest}"
> > >                         value="#{ CustomerBranchSelection.country}"
> > >
> valueChangeListener="#{CustomerBranchSelection.countryValueChangeListener
> }"/>
> > > </aa:zoneJSF>
> > >
> > > when reloading the CountryZone the input ajax component became a regular
> > > text box.
> > > when i referesh the page in the browser the component recovers its ajax
> > > ability.
> > >
> > > --
> > > http://mageeb.net
> > > Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
> > > Read
> http://www.gnu.org/philosophy/no-word-attachments.html
> > > Preferable attachments: .PDF, .HTML, .TXT
> > > Thanx for adding this text to Your signature
> >
>
>

Re: inputSuggestAjax inside AjaxAnyWhere zone does not work

Posted by Sanjiv Jivan <sa...@gmail.com>.
Also not that the current version of AjaxAnywhere does not support "new"
content that introduces new javascript functions and global variables. For
example if you have a zone that returns javascript like the one below, the
someNewFunction() call will fail.

<script type="text/javascript">
  funtion someNewFunction() {
   ...
   ...
  }

  someNewFunction();
</script>

I've seen several Faces components that introduce such scriptlets. I've made
this and it will be in the next version of AjaxAnywhere.

Sanjiv

On 5/18/06, Andrew Robinson <an...@gmail.com> wrote:
>
> Check to see what JavaScript is being used by inputSuggestAjax,
> chances are it is not AjaxAnywhere friendly. Remember that JavaScript
> is run as an "eval" in AjaxAnywhere, not as in-line document
> JavaScript.
>
> This also breaks some tomahawk components (they were not built for
> being run after the page was built).
>
> -Andrew
>
> On 5/18/06, Michael Ageeb <mi...@acm.org> wrote:
> > Hello,
> >    I wonder if any body faced this problem before
> > I'm using AjaxAnyWhere 1.2-RC1 with sandbox-1.1.3 snabshot. when i put
> the
> > inputSuggestAjax component inside the AA zone it became a usual/normal
> input
> > box after the zone reloading.
> >
> > <aa:zoneJSF id="CountryZone">
> >                         <s:inputSuggestAjax id="Country"
> > suggestedItemsMethod="#{CustomerBranchSelection.getCountriesSuggest}"
> >                         value="#{ CustomerBranchSelection.country}"
> > valueChangeListener="#{
> CustomerBranchSelection.countryValueChangeListener}"/>
> > </aa:zoneJSF>
> >
> > when reloading the CountryZone the input ajax component became a regular
> > text box.
> > when i referesh the page in the browser the component recovers its ajax
> > ability.
> >
> > --
> > http://mageeb.net
> > Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
> > Read http://www.gnu.org/philosophy/no-word-attachments.html
> > Preferable attachments: .PDF, .HTML, .TXT
> > Thanx for adding this text to Your signature
>

Re: inputSuggestAjax inside AjaxAnyWhere zone does not work

Posted by Andrew Robinson <an...@gmail.com>.
Check to see what JavaScript is being used by inputSuggestAjax,
chances are it is not AjaxAnywhere friendly. Remember that JavaScript
is run as an "eval" in AjaxAnywhere, not as in-line document
JavaScript.

This also breaks some tomahawk components (they were not built for
being run after the page was built).

-Andrew

On 5/18/06, Michael Ageeb <mi...@acm.org> wrote:
> Hello,
>    I wonder if any body faced this problem before
> I'm using AjaxAnyWhere 1.2-RC1 with sandbox-1.1.3 snabshot. when i put the
> inputSuggestAjax component inside the AA zone it became a usual/normal input
> box after the zone reloading.
>
> <aa:zoneJSF id="CountryZone">
>                         <s:inputSuggestAjax id="Country"
> suggestedItemsMethod="#{CustomerBranchSelection.getCountriesSuggest}"
>                         value="#{ CustomerBranchSelection.country}"
> valueChangeListener="#{CustomerBranchSelection.countryValueChangeListener}"/>
> </aa:zoneJSF>
>
> when reloading the CountryZone the input ajax component became a regular
> text box.
> when i referesh the page in the browser the component recovers its ajax
> ability.
>
> --
> http://mageeb.net
> Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
> Read http://www.gnu.org/philosophy/no-word-attachments.html
> Preferable attachments: .PDF, .HTML, .TXT
> Thanx for adding this text to Your signature