This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers; | |
public class Application extends Controller { | |
// in cache during 1800 seconds (30 min) | |
@Cached(key = "pagingList", duration = 1800) | |
public static Result index(Integer page) { | |
String uuid = session("uuid"); | |
if (uuid == null) { | |
uuid = java.util.UUID.randomUUID().toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.dirtyFlag = ko.dirtyFlag(this); | |
ko.dirtyFlag = function(root) { | |
var _isDirty = ko.observable(false); | |
var result = ko.computed(function() { | |
if (!_isDirty()) { | |
ko.toJS(root); //just for subscriptions | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Whole url: | |
window.location.href | |
Path: | |
window.location.pathname | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<script language="Javascript"> | |
function fileUpload(form, action_url, div_id) { | |
// Create the iframe... | |
var iframe = document.createElement("iframe"); | |
iframe.setAttribute("id", "upload_iframe"); | |
iframe.setAttribute("name", "upload_iframe"); | |
iframe.setAttribute("width", "0"); | |
iframe.setAttribute("height", "0"); |