Re: WebResource in Wicket 1.5
you can give different names (constructor parameter) for the ResourceReference's On Fri, Mar 23, 2012 at 5:12 PM, Decebal Suiu wrote: > Works but I have a question: > The json data path is wicket/resource/org.apache.wicket.Application/jsonRes > and I think that if I have many charts on the same page (my case), each > chart with another json data, on your solution I am in treble. Right? > > Best regards, > Decebal > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4499129.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
Works but I have a question: The json data path is wicket/resource/org.apache.wicket.Application/jsonRes and I think that if I have many charts on the same page (my case), each chart with another json data, on your solution I am in treble. Right? Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4499129.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
Right. This will work only for static resources. Sorry. ResourceReference ref = new ResourceReference("jsonRes") { public IResource getResource() {return resource;} } urlFor(new ResourceReferenceHandler(reference)) On Fri, Mar 23, 2012 at 4:29 PM, Decebal Suiu wrote: > Thanks Martin for the your prompt response. > > In constructor of OpenFlashChart I have these lines: > > jsonResource = new ByteArrayResource("text/plain", > getJsonData().getBytes()); > CharSequence dataPath = urlFor(new ResourceRequestHandler(jsonResource, > null)); > System.out.println("*** " + dataPath); > > dataPath is null > > the wicket version is 1.5.4 > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4499017.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
Thanks Martin for the your prompt response. In constructor of OpenFlashChart I have these lines: jsonResource = new ByteArrayResource("text/plain", getJsonData().getBytes()); CharSequence dataPath = urlFor(new ResourceRequestHandler(jsonResource, null)); System.out.println("*** " + dataPath); dataPath is null the wicket version is 1.5.4 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4499017.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
ByteArrayResource resource = ... path = urlFor(new ResourceRequestHandler(resource)) On Fri, Mar 23, 2012 at 3:45 PM, Decebal Suiu wrote: > Hi > > I have the same problem. I changed WebResource to ByteArrayResource but I > don't know how I can migrate the following lines: > > public void onResourceRequested() { > createJsonResource(); > // TODO wicket 1.5 > // jsonResource.onResourceRequested(); > } > No method onResourceRequested() in ByteArrayResource. > > > // CharSequence dataPath = RequestCycle.get().urlFor(OpenFlashChart.this, > IResourceListener.INTERFACE); > CharSequence dataPath = RequestCycle.get().urlFor(new > ComponentRenderingRequestHandler(this)); > System.out.println("*** " + dataPath); > > datePath is null after migration to wicket 1.5 > > > Best regards, > Decebal > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4498851.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
Hi I have the same problem. I changed WebResource to ByteArrayResource but I don't know how I can migrate the following lines: public void onResourceRequested() { createJsonResource(); // TODO wicket 1.5 // jsonResource.onResourceRequested(); } No method onResourceRequested() in ByteArrayResource. // CharSequence dataPath = RequestCycle.get().urlFor(OpenFlashChart.this, IResourceListener.INTERFACE); CharSequence dataPath = RequestCycle.get().urlFor(new ComponentRenderingRequestHandler(this)); System.out.println("*** " + dataPath); datePath is null after migration to wicket 1.5 Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4498851.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
Yes, I am not yet thru with my wicket 1.5 migration. so was changing my 1.4 version and testing the same. I think its some thing to do with apache proxy. If i directly access the :8080/erp it works but when i access thru the apache /erp i face this problem. my apache config - ProxyPass /erp http://127.0.0.1:8080/erp ProxyPassReverse /erp http://127.0.0.1:8080/erp -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4123031.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
On Wed, Nov 30, 2011 at 2:31 PM, nazeem wrote: > Thanks Vineet, I managed to change WebResource to ByteArrayResource. > > But I am stuck with a problem in the url for json constructed. > > CharSequence dataPath = RequestCycle.get().urlFor(OpenFlashChart.this, > IResourceListener.INTERFACE); > String url = RequestUtils.toAbsolutePath(dataPath.toString()); > > When i deploy to my server and access it using the ip address, the json data > url was still referring to > http://127.0.0.1:8080/erp/app/home/wicket:interface. wicket:interface is only in Wicket 1.4 Wicket 1.5 wont construct url with this parameter. > > so the js to embed did not work > swfobject.embedSWF('resources/com.company.charts.ForceChartResource/ofc/resr/open-flash-chart.swf','chart8', > '100%', '200', '9.0.0', 'expressInstall.swf', > {'data-file':'http://127.0.0.1:8080/erp/app/home/wicket:interface/:3:dashboard:layout:lcontent-list:3:lcss-cntr:lcontent:dsb-content:chart::IResourceListener::'}, > {} ); > > > RequestUtils.toAbsolutePath is not working as expected ? Any clue ? > > > DEBUG MESSAGES FROM LOG > --- > data path >> > home/wicket:interface/:3:dashboard:layout:lcontent-list:3:lcss-cntr:lcontent:dsb-content:chart::IResourceListener:: > req.getRequestURI /erp/app/home > req.getRequestURL http://127.0.0.1:8080/erp/app/home > req.getContextPath /erp > req.getPathInfo /home > req.getPathTranslated > /home/ec2-user/server/apache-tomcat-7.0.8/webapps/erp/home > req.getServletPath /app > req.getRemoteHost 127.0.0.1 > req.getRemotePort 33230 > req.getLocalName() localhost > > > > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4122979.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
Thanks Vineet, I managed to change WebResource to ByteArrayResource. But I am stuck with a problem in the url for json constructed. CharSequence dataPath = RequestCycle.get().urlFor(OpenFlashChart.this, IResourceListener.INTERFACE); String url = RequestUtils.toAbsolutePath(dataPath.toString()); When i deploy to my server and access it using the ip address, the json data url was still referring to http://127.0.0.1:8080/erp/app/home/wicket:interface. so the js to embed did not work swfobject.embedSWF('resources/com.company.charts.ForceChartResource/ofc/resr/open-flash-chart.swf','chart8', '100%', '200', '9.0.0', 'expressInstall.swf', {'data-file':'http://127.0.0.1:8080/erp/app/home/wicket:interface/:3:dashboard:layout:lcontent-list:3:lcss-cntr:lcontent:dsb-content:chart::IResourceListener::'}, {} ); RequestUtils.toAbsolutePath is not working as expected ? Any clue ? DEBUG MESSAGES FROM LOG --- data path >> home/wicket:interface/:3:dashboard:layout:lcontent-list:3:lcss-cntr:lcontent:dsb-content:chart::IResourceListener:: req.getRequestURI /erp/app/home req.getRequestURL http://127.0.0.1:8080/erp/app/home req.getContextPath /erp req.getPathInfo /home req.getPathTranslated /home/ec2-user/server/apache-tomcat-7.0.8/webapps/erp/home req.getServletPath /app req.getRemoteHost 127.0.0.1 req.getRemotePort 33230 req.getLocalName() localhost -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4122979.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebResource in Wicket 1.5
hi use bytearrayresource On Fri, Nov 25, 2011 at 7:49 AM, nazeem wrote: > I have a open flash chart implementation following the link below. > > https://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html > > But when i upgrade to wicket 1.5 im stuck at this.. > > In class OpenFlashChart, > > WebResource jsonResource = new WebResource() { > @Override > public IResourceStream getResourceStream() { > return json; > } > }; > jsonResource.setCacheable(false); > > ... > > public void onResourceRequested() { > jsonResource.onResourceRequested(); > } > > > > > What is the replacement for this in wicket 1.5 ? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4106181.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WebResource in Wicket 1.5
I have a open flash chart implementation following the link below. https://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html But when i upgrade to wicket 1.5 im stuck at this.. In class OpenFlashChart, WebResource jsonResource = new WebResource() { @Override public IResourceStream getResourceStream() { return json; } }; jsonResource.setCacheable(false); ... public void onResourceRequested() { jsonResource.onResourceRequested(); } What is the replacement for this in wicket 1.5 ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4106181.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org