You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by saty <sa...@gmail.com> on 2013/02/01 17:08:46 UTC

ReferenceError: wicketGet is not defined

trying to use this example from
org.apache.wicket.extensions.ajax.markup.html.autocomplete
Class AbstractAutoCompleteRenderer<T>

example 1:

 protected CharSequence getOnSelectJavascript(Address address)
 {
    final StringBuilder js = new StringBuilder();
    js.append("wicketGet('street').value ='" + address.getStreet() + "';");
    js.append("wicketGet('zipcode').value ='" + address.getZipCode() +
"';");
    js.append("wicketGet('city').value ='" + address.getCity() + "';");
    js.append("input"); // <-- do not use return statement here!
    return js.toString();
 }

Am i missing any necessary java script imports?

Thanks
 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ReferenceError-wicketGet-is-not-defined-tp4655998.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ReferenceError: wicketGet is not defined

Posted by saty <sa...@gmail.com>.
thanks, much appreciated



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ReferenceError-wicketGet-is-not-defined-tp4655998p4656002.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ReferenceError: wicketGet is not defined

Posted by Martin Grigorov <mg...@apache.org>.
More examples at http://martin-g.github.com/wicket-reference-guide/ajax.html
 soonish.


On Fri, Feb 1, 2013 at 5:28 PM, Nick Pratt <nb...@gmail.com> wrote:

> Some examples here for 6.0:
> https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html
>
> On Fri, Feb 1, 2013 at 11:27 AM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
>
> > wicketGet -> Wicket.get() (or Wicket.$())
> >
> > For Wicket 6 all such small methods were moved into Wicket.** namespace.
> > There is a table with the old -> new names in the migration guide for
> Ajax.
> >
> >
> > On Fri, Feb 1, 2013 at 5:08 PM, saty <sa...@gmail.com> wrote:
> >
> > > trying to use this example from
> > > org.apache.wicket.extensions.ajax.markup.html.autocomplete
> > > Class AbstractAutoCompleteRenderer<T>
> > >
> > > example 1:
> > >
> > >  protected CharSequence getOnSelectJavascript(Address address)
> > >  {
> > >     final StringBuilder js = new StringBuilder();
> > >     js.append("wicketGet('street').value ='" + address.getStreet() +
> > "';");
> > >     js.append("wicketGet('zipcode').value ='" + address.getZipCode() +
> > > "';");
> > >     js.append("wicketGet('city').value ='" + address.getCity() + "';");
> > >     js.append("input"); // <-- do not use return statement here!
> > >     return js.toString();
> > >  }
> > >
> > > Am i missing any necessary java script imports?
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/ReferenceError-wicketGet-is-not-defined-tp4655998.html
> > > Sent from the Users forum mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
> >
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: ReferenceError: wicketGet is not defined

Posted by Nick Pratt <nb...@gmail.com>.
Some examples here for 6.0:
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

On Fri, Feb 1, 2013 at 11:27 AM, Martin Grigorov <mg...@apache.org>wrote:

> wicketGet -> Wicket.get() (or Wicket.$())
>
> For Wicket 6 all such small methods were moved into Wicket.** namespace.
> There is a table with the old -> new names in the migration guide for Ajax.
>
>
> On Fri, Feb 1, 2013 at 5:08 PM, saty <sa...@gmail.com> wrote:
>
> > trying to use this example from
> > org.apache.wicket.extensions.ajax.markup.html.autocomplete
> > Class AbstractAutoCompleteRenderer<T>
> >
> > example 1:
> >
> >  protected CharSequence getOnSelectJavascript(Address address)
> >  {
> >     final StringBuilder js = new StringBuilder();
> >     js.append("wicketGet('street').value ='" + address.getStreet() +
> "';");
> >     js.append("wicketGet('zipcode').value ='" + address.getZipCode() +
> > "';");
> >     js.append("wicketGet('city').value ='" + address.getCity() + "';");
> >     js.append("input"); // <-- do not use return statement here!
> >     return js.toString();
> >  }
> >
> > Am i missing any necessary java script imports?
> >
> > Thanks
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/ReferenceError-wicketGet-is-not-defined-tp4655998.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>

Re: ReferenceError: wicketGet is not defined

Posted by Martin Grigorov <mg...@apache.org>.
wicketGet -> Wicket.get() (or Wicket.$())

For Wicket 6 all such small methods were moved into Wicket.** namespace.
There is a table with the old -> new names in the migration guide for Ajax.


On Fri, Feb 1, 2013 at 5:08 PM, saty <sa...@gmail.com> wrote:

> trying to use this example from
> org.apache.wicket.extensions.ajax.markup.html.autocomplete
> Class AbstractAutoCompleteRenderer<T>
>
> example 1:
>
>  protected CharSequence getOnSelectJavascript(Address address)
>  {
>     final StringBuilder js = new StringBuilder();
>     js.append("wicketGet('street').value ='" + address.getStreet() + "';");
>     js.append("wicketGet('zipcode').value ='" + address.getZipCode() +
> "';");
>     js.append("wicketGet('city').value ='" + address.getCity() + "';");
>     js.append("input"); // <-- do not use return statement here!
>     return js.toString();
>  }
>
> Am i missing any necessary java script imports?
>
> Thanks
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ReferenceError-wicketGet-is-not-defined-tp4655998.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>