我在Java中有一个方法将返回一个JSON对象,我试图让它加载到一些JavaScript。这是我的代码,但它不起作用:
爪哇:
public JSONObject ticketListener(TicketMessage message) {
JSONObject listener = new JSONObject();
try {
listener.put("Ticket Messenge", message.getText());
listener.put("Ticket Number", message.getTicketNumber());
listener.put("Operation", message.getOperation());
listener.put("UserID", message.getUserID());
listener.put("Operation Description", message.getOperationDescription());
} catch (JSONException e) {
e.printStackTrace();
}
}
JavaScript的:
$scope.ticketListener = function() {
var val = $entry(@com.cmcflex.flex.gui.programs.projectmanager.gui.messenger.ticketListener::getValue())();
};
请帮忙。