You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mxc <ma...@jumpingbean.co.za> on 2007/03/31 10:22:54 UTC

Autocompleter -- javascript syntax error

Hi all,

I am trying to get the autocompleter component to work. When I enter any
text in the autocompleter component the javascript debugger prints out the
following

"DEBUG: [SyntaxError: syntax error, file:
http://127.0.0.1:8080/app-1.0/app?service=asset&path=%2Fdojo%2Fdojo.js,
line: 15]"

Here is the relevant code:

html page
=========

		       <tr>
		       		<td>
			            <label displayName="Suburb" field="component:selectSuburb"
jwcid="@FieldLabel">Suburb</label>
			        </td>
			        <td>
			          	<select jwcid="selectSuburb@Autocompleter"
model="ognl:suburbAutoModel" value="ognl:suburb" />
					</td>
               </tr>

page.java
==========
	public abstract void setSuburb (Suburb suburb);
	public abstract Suburb getSuburb();

	public DefaultAutocompleteModel getSuburbAutoModel(){
		return new DefaultAutocompleteModel(getSuburbs(),"Id","Name");
	}


Any help appreciated. I am using Tapestry 4.1


Thanks
-- 
View this message in context: http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156.html#a9765187
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Autocompleter -- javascript syntax error

Posted by Daniel Jue <te...@gmail.com>.
Just to add some closure to this thread, I read in EWDT 2.1 that this is a
bug in the dojo library. (Page 315)
It can be disabled from printing on your page by using
<html jwcid="@Shell" title="Your title" debugEnabled="false">
in the parent page.

This is probably one of those things that are fixed in 4.1.2, or an updated
dojo.  I am using 4.1.1, because I am not using maven.  (Or rather, I am not
confident about integrating maven with my existing project.)

On 3/31/07, Yiannis Mavroukakis <yi...@jaguarfreight.com> wrote:
>
>
> No,you get the same message when there's a problem. I had similar issues
> which arose from lack of use of persistence..
>
> -----Original Message-----
> From:   mxc [mailto:mark@jumpingbean.co.za]
> Sent:   Sat 31/03/2007 17:40
> To:     users@tapestry.apache.org
> Cc:
> Subject:        RE: Autocompleter -- javascript syntax error
>
>
> ok -- I have other autocompleters working it is just this one that doesnt
> work. I have had a look at firebug console output and notice that the
> response to the servsie query says "loading..."
>
>
> Other serverside request show a response with data. Is it possible that
> the
> query takes to long to run and the ajax request times out or something
> like
> that? It should be an async call so cant see why this would be a problem.
>
>
> --
> View this message in context:
> http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156.html#a9768993
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all known viruses.
>
>
>
>
> Note:__________________________________________________________________
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission.
> If you receive this message in error, please immediately delete it and
> all copies of it from your system, destroy any hard copies of it and
> notify the sender. You must not, directly or indirectly, use, disclose,
> distribute, print, or copy any part of this message if you are not the
> intended recipient. Jaguar Freight Services and any of its subsidiaries
> each reserve the right to monitor all e-mail communications through its
> networks.
> Any views expressed in this message are those of the individual sender,
> except where the message states otherwise and the sender is authorized
> to state them to be the views of any such entity.
> ________________________________________________________________________
> This e-mail has been scanned for all known viruses.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

RE: Autocompleter -- javascript syntax error

Posted by Yiannis Mavroukakis <yi...@jaguarfreight.com>.
No,you get the same message when there's a problem. I had similar issues which arose from lack of use of persistence..

-----Original Message-----
From:	mxc [mailto:mark@jumpingbean.co.za]
Sent:	Sat 31/03/2007 17:40
To:	users@tapestry.apache.org
Cc:	
Subject:	RE: Autocompleter -- javascript syntax error


ok -- I have other autocompleters working it is just this one that doesnt
work. I have had a look at firebug console output and notice that the
response to the servsie query says "loading..."


Other serverside request show a response with data. Is it possible that the
query takes to long to run and the ajax request times out or something like
that? It should be an async call so cant see why this would be a problem.


-- 
View this message in context: http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156.html#a9768993
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


________________________________________________________________________
This e-mail has been scanned for all known viruses.




Note:__________________________________________________________________
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
________________________________________________________________________
This e-mail has been scanned for all known viruses.

RE: Autocompleter -- javascript syntax error

Posted by mxc <ma...@jumpingbean.co.za>.
ok -- I have other autocompleters working it is just this one that doesnt
work. I have had a look at firebug console output and notice that the
response to the servsie query says "loading..."


Other serverside request show a response with data. Is it possible that the
query takes to long to run and the ajax request times out or something like
that? It should be an async call so cant see why this would be a problem.


-- 
View this message in context: http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156.html#a9768993
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: Autocompleter -- javascript syntax error

Posted by mxc <ma...@jumpingbean.co.za>.
Yes -- I checked that already.



Yiannis Mavroukakis-2 wrote:
> 
> Are you sure getSuburbs() returns something?
> 
> -----Original Message-----
> From: mxc [mailto:mark@jumpingbean.co.za] 
> Sent: 31 March 2007 09:23
> To: users@tapestry.apache.org
> Subject: Autocompleter -- javascript syntax error
> 
> 
> Hi all,
> 
> I am trying to get the autocompleter component to work. When I enter any
> text in the autocompleter component the javascript debugger prints out
> the
> following
> 
> "DEBUG: [SyntaxError: syntax error, file:
> http://127.0.0.1:8080/app-1.0/app?service=asset&path=%2Fdojo%2Fdojo.js,
> line: 15]"
> 
> Here is the relevant code:
> 
> html page
> =========
> 
> 		       <tr>
> 		       		<td>
> 			            <label displayName="Suburb"
> field="component:selectSuburb"
> jwcid="@FieldLabel">Suburb</label>
> 			        </td>
> 			        <td>
> 			          	<select
> jwcid="selectSuburb@Autocompleter"
> model="ognl:suburbAutoModel" value="ognl:suburb" />
> 					</td>
>                </tr>
> 
> page.java
> ==========
> 	public abstract void setSuburb (Suburb suburb);
> 	public abstract Suburb getSuburb();
> 
> 	public DefaultAutocompleteModel getSuburbAutoModel(){
> 		return new
> DefaultAutocompleteModel(getSuburbs(),"Id","Name");
> 	}
> 
> 
> Any help appreciated. I am using Tapestry 4.1
> 
> 
> Thanks
> -- 
> View this message in context:
> http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156
> .html#a9765187
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all known viruses.
> 
> 
> 
> Note:__________________________________________________________________
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission.
> If you receive this message in error, please immediately delete it and
> all copies of it from your system, destroy any hard copies of it and
> notify the sender. You must not, directly or indirectly, use, disclose,
> distribute, print, or copy any part of this message if you are not the
> intended recipient. Jaguar Freight Services and any of its subsidiaries
> each reserve the right to monitor all e-mail communications through its
> networks.
> Any views expressed in this message are those of the individual sender,
> except where the message states otherwise and the sender is authorized
> to state them to be the views of any such entity.
> ________________________________________________________________________
> This e-mail has been scanned for all known viruses.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156.html#a9767261
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: Autocompleter -- javascript syntax error

Posted by Yiannis Mavroukakis <yi...@jaguarfreight.com>.
Are you sure getSuburbs() returns something?

-----Original Message-----
From: mxc [mailto:mark@jumpingbean.co.za] 
Sent: 31 March 2007 09:23
To: users@tapestry.apache.org
Subject: Autocompleter -- javascript syntax error


Hi all,

I am trying to get the autocompleter component to work. When I enter any
text in the autocompleter component the javascript debugger prints out
the
following

"DEBUG: [SyntaxError: syntax error, file:
http://127.0.0.1:8080/app-1.0/app?service=asset&path=%2Fdojo%2Fdojo.js,
line: 15]"

Here is the relevant code:

html page
=========

		       <tr>
		       		<td>
			            <label displayName="Suburb"
field="component:selectSuburb"
jwcid="@FieldLabel">Suburb</label>
			        </td>
			        <td>
			          	<select
jwcid="selectSuburb@Autocompleter"
model="ognl:suburbAutoModel" value="ognl:suburb" />
					</td>
               </tr>

page.java
==========
	public abstract void setSuburb (Suburb suburb);
	public abstract Suburb getSuburb();

	public DefaultAutocompleteModel getSuburbAutoModel(){
		return new
DefaultAutocompleteModel(getSuburbs(),"Id","Name");
	}


Any help appreciated. I am using Tapestry 4.1


Thanks
-- 
View this message in context:
http://www.nabble.com/Autocompleter----javascript-syntax-error-tf3496156
.html#a9765187
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


________________________________________________________________________
This e-mail has been scanned for all known viruses.



Note:__________________________________________________________________
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
________________________________________________________________________
This e-mail has been scanned for all known viruses.

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