Deleted method used to adapt callbacks for older versions on Timelinez
* This method was added due to a bug on Timeline, see: http://sourceforge.net/mailarchive/message.php?msg_id=25935247 * Since newer versions of Timeplot (2.3.X) this is not happening anymore. * This method was causing weird behaviours with the URL used by timeline to retrieve the data. As a result of deleting the first "/" the final URL used by timeline was relative to the page where the chart was shown, i.e. if the callback-url submited by the application was "navalplanner-webapp/callback/XXXXXXX" and the page that contained the chart was "http://localhost:8080/navalplanner-webapp/planner/index.zul", the resulting callback was "http://localhost:8080/navalplanner-webapp/planner/navalplanner-webapp/callback/XXXXXXX". As a result, several mappings were needed at web.xml (now deleted) FEA: ItEr02S03MigracionZK5
This commit is contained in:
parent
eaacb7c977
commit
1f071acb82
2 changed files with 3 additions and 16 deletions
|
|
@ -578,13 +578,13 @@ public abstract class ChartFiller implements IChartFiller {
|
|||
HttpServletRequest request = (HttpServletRequest) Executions
|
||||
.getCurrent().getNativeRequest();
|
||||
String uri = CallbackServlet.registerAndCreateURLFor(request,
|
||||
graphicSpecificationCreator);
|
||||
graphicSpecificationCreator, false);
|
||||
return uri;
|
||||
}
|
||||
|
||||
private Plotinfo createPlotInfoFrom(String dataSourceUri) {
|
||||
PlotDataSource pds = new PlotDataSource();
|
||||
pds.setDataSourceUri(adaptCallbackForTimePlot(dataSourceUri));
|
||||
pds.setDataSourceUri(dataSourceUri);
|
||||
pds.setSeparator(" ");
|
||||
|
||||
Plotinfo plotinfo = new Plotinfo();
|
||||
|
|
@ -592,19 +592,6 @@ public abstract class ChartFiller implements IChartFiller {
|
|||
return plotinfo;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get rid of the initial-slash of the callback uri:
|
||||
*
|
||||
* before: /callback/<callbackid>
|
||||
* after: callback/<callbackid>
|
||||
*
|
||||
*This is needed because how the Javascript component of Timeplot handles
|
||||
*the application webpath
|
||||
* */
|
||||
private String adaptCallbackForTimePlot(String uri){
|
||||
return ! uri.equals("") ? uri.substring(1) : uri;
|
||||
}
|
||||
|
||||
protected void appendPlotinfo(Timeplot chart, Plotinfo plotinfo,
|
||||
ValueGeometry valueGeometry, TimeGeometry timeGeometry) {
|
||||
plotinfo.setValueGeometry(valueGeometry);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>callbackServlet</servlet-name>
|
||||
<url-pattern>/callback/*</url-pattern>
|
||||
<url-pattern>callback/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>dspLoader</servlet-name>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue