Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds proxy binding for AjaxProxy component #769

Merged
merged 1 commit into from
Jun 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AjaxProxy : AjaxProxy {
name = ajaxProxyName;
proxyName = "wopage";
proxy = proxy;
}

SelectFileButtonWrapper : WOGenericContainer {
Expand Down
41 changes: 40 additions & 1 deletion Frameworks/Ajax/Ajax/Sources/er/ajax/AjaxFlexibleFileUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,46 @@ public static interface Keys {
public static final String clearUploadProgressOnSuccess = "clearUploadProgressOnSuccess";
public static final String onClickBefore = "onClickBefore";
}


/**
* Wrapper class to expose only the methods we need to {@link AjaxProxy}.
*
* @author paulh
* @see <a href="https://github.com/wocommunity/wonder/issues/768">#768</a>
*/
public final class Proxy {
/**
* Wrapper for {@link AjaxFlexibleFileUpload#uploadState()}.
*
* @return see {@link AjaxFlexibleFileUpload#uploadState()}
*/
public NSDictionary<String, ?> uploadState() {
return AjaxFlexibleFileUpload.this.uploadState();
}

/**
* Wrapper for {@link AjaxFlexibleFileUpload#cancelUpload()}.
*/
public void cancelUpload() {
AjaxFlexibleFileUpload.this.cancelUpload();
return;
}

/**
* Wrapper for {@link AjaxFlexibleFileUpload#uploadState()}.
*
* @return see {@link AjaxFlexibleFileUpload#uploadState()}
*/
public WOActionResults clearFileResults() {
return AjaxFlexibleFileUpload.this.clearFileResults();
}
}

/**
* Proxy used for method access by {@link AjaxProxy}
*/
public final Proxy proxy = new Proxy();

private String _refreshTime;
private String _clearLabel;
private String _cancelLabel;
Expand Down