我JFreeChart用来绘制图表.代码是
package com.daya;
import java.awt.Color;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.XYPlot;
import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.ui.ApplicationFrame;
import org.jfree.ui.RefineryUtilities;
public class Two extends ApplicationFrame {
public Two(final String title) {
super(title);
final XYDataset dataset = createDataset();
final JFreeChart chart = createChart(dataset);
final ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(1200, 1100));
setContentPane(chartPanel);
}
private XYDataset createDataset() {
final XYSeries series1 = new XYSeries("SLMM");
final XYSeries …Run Code Online (Sandbox Code Playgroud) 我有选择框没有onChange属性.现在加载完整页后,根据一些条件我必须为javascript中的选择框添加'onChange'.我正在尝试使用以下代码.但它不起作用.
$("#depositForm").attr(("onChange", "selectedMainDepositType('this');" ));
Run Code Online (Sandbox Code Playgroud)
它没有添加onChange事件.
<select id="depositForm_depositSubType" class="depositSubType" style="width:160px;" name="depositSubType">
Run Code Online (Sandbox Code Playgroud)
必须改为
<select id="depositForm_depositSubType" onchange="selectedMainDepositType(this);" class="depositSubType" style="width:160px;" name="depositSubType">
Run Code Online (Sandbox Code Playgroud)
请建议如何添加onChange属性.
我有以下回应
T2269|175@@2a1d2d89aa96ddd6|45464047
Run Code Online (Sandbox Code Playgroud)
通过使用split("\\ |")我已经转换为字符串数组对象.每个字段的含义如下:
T2269 id
175@@2a1d2d89aa96ddd6 cid
45464047 refno
Run Code Online (Sandbox Code Playgroud)
不,我必须将其转换为HashMap对象.他们是上述的任何解决方案..
例如,给出了上述响应.实际上,字符串数组对象的长度为36.
我searchKey在动作类和模型驱动的bean对象中有变量.
public class PaymentGateWayAction extends ActionSupport implements ModelDriven<PaymentResponseDTO> {
private String searchKey;
private PaymentResponseDTO paymentResponseDTO = new PaymentResponseDTO();
// ...
}
Run Code Online (Sandbox Code Playgroud)
searchKey也是一个变量PaymentResponseDTO.
我需要searchKey根据某些条件从action类和modeldriven bean 访问.拥有相同名称的变量是不好的.但上面已经开发出来了.如果我在Java文件中进行任何修改,我需要做很多很难的修改.
现在我需要访问动作类变量.我尝试以下面的方式从action类访问变量:
<s:hidden id="searchKey" name="searchKey" value="%{searchKey}"/>
Run Code Online (Sandbox Code Playgroud)
但它返回空值.
我还有下面的代码:
this.setSearchKey("somevarible");
Run Code Online (Sandbox Code Playgroud)
请告知错误发生的地方
在struts.xml
<action name="atomResponse" class="com.PaymentGateWayAction" method="atomPaymentResponse">
<result name="success" type="tiles">paymentGateWayResponse</result>
<result name="failure" type="tiles">paymentGateWayResponseError</result>
</action>
Run Code Online (Sandbox Code Playgroud)
瓷砖xml
<definition name="paymentGateWayResponse" extends="b2cHome">
<put-attribute name="body" value="agent_b2c/b2c_paymentGateWayResponse.jsp" />
</definition>
Run Code Online (Sandbox Code Playgroud)
在b2c_paymentGatewayResponse.jsp隐藏字段中存在代码.
我们正在开发预订航班,公交车票等的旅行申请.对于机票,最初将生成PNR(乘客姓名记录),通过PNR确认票证.
问题是,如果在生成PNR后12小时内未确认票证,则必须取消PNR.如果没有,我们将面临Air GDS提供商的处罚.
到目前为止,我们已经编写了Cron Scheduler,它每15分钟执行一次这样的操作.我们这样做有问题,也面临惩罚.我不能每分钟都运行调度程序.
如果没有预订,如何在生成12小时后取消PNR.
java ×3
struts2 ×2
hashmap ×1
hibernate ×1
html ×1
javascript ×1
jfreechart ×1
jquery ×1
logic ×1
ognl ×1