You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by CrocodileShoes <ma...@logica.com> on 2009/07/10 18:58:12 UTC

Re: linking to a text ResourceReference

Hello,

I'm trying to get SWFObject and Open Flash Charts running in my web app.

I'm receiving the following error where the chart should be:

Open Flash Chart

JSON Parse Error [Syntax Error]
Error at character 0, line 1:

-2: undefined-1: undefined0: <!DOCTYP


I'm sure this is generated by the ofc.swf but i can't figure out why!  I'm
ruling out each component one at a time so my question is could this be
related to SWFObject or the OpenFlashChart classes?
-- 
View this message in context: http://www.nabble.com/linking-to-a-text-ResourceReference-tp19753402p24431195.html
Sent from the Wicket - User 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: linking to a text ResourceReference

Posted by CrocodileShoes <ma...@logica.com>.
I found the problem.  It seems the url must be encoded otherwise the OFC
cannot find the data file.  I don't have an account on apache yet so I can't
update the wiki.

private String getUrlForJson() {

		CharSequence dataPath = RequestCycle.get().urlFor(OpenFlashChart.this,
IResourceListener.INTERFACE);

                //######### ADDED THIS ###############################
		try {
			dataPath = URLEncoder.encode(dataPath.toString(), "UTF-8");
		}
		catch (UnsupportedEncodingException e) {
			LOGGER.error("Error encoding dataPath for Chart Json data file.  Details:
" + e);
		}
                //################################################

		return RequestUtils.toAbsolutePath(dataPath.toString());
	}
-- 
View this message in context: http://www.nabble.com/linking-to-a-text-ResourceReference-tp19753402p24458873.html
Sent from the Wicket - User 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