refactored package form in view

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@90245 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-01-20 11:48:21 +00:00
parent 729ce52282
commit 24b693bf81
10 changed files with 23 additions and 23 deletions

View File

@ -1,6 +1,6 @@
package org.gcube.portlets.user.shareupdates.client; package org.gcube.portlets.user.shareupdates.client;
import org.gcube.portlets.user.shareupdates.client.form.ShareUpdateForm; import org.gcube.portlets.user.shareupdates.client.view.ShareUpdateForm;
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.RootPanel;

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.shareupdates.client.form; package org.gcube.portlets.user.shareupdates.client.view;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.shareupdates.client.form; package org.gcube.portlets.user.shareupdates.client.view;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiBinder;

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.shareupdates.client.form; package org.gcube.portlets.user.shareupdates.client.view;
import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.SimplePanel;
/** /**

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.shareupdates.client.form; package org.gcube.portlets.user.shareupdates.client.view;
import org.gcube.portlets.user.shareupdates.shared.LinkPreview; import org.gcube.portlets.user.shareupdates.shared.LinkPreview;

View File

@ -1,6 +1,6 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:m="urn:import:org.gcube.portlets.user.shareupdates.client.form"> xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:m="urn:import:org.gcube.portlets.user.shareupdates.client.view">
<ui:style> <ui:style>
.important { .important {
font-weight: bold; font-weight: bold;

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.shareupdates.client.form; package org.gcube.portlets.user.shareupdates.client.view;
import java.util.ArrayList; import java.util.ArrayList;
@ -99,6 +99,20 @@ public class ShareUpdateForm extends Composite {
UserInfo myUserInfo; UserInfo myUserInfo;
private void bind() {
/**
* get the uploaded file result
*/
eventBus.addHandler(FileUploadCompleteEvent.TYPE, new FileUploadCompleteEventHandler() {
@Override
public void onUploadComplete(FileUploadCompleteEvent event) {
String absolutePathOnServer = event.getUploadedFileInfo().getAbsolutePath();
GWT.log("uploaded on Server here: " + absolutePathOnServer);
checkFile(event.getUploadedFileInfo().getFilename(), absolutePathOnServer);
}
});
}
public ShareUpdateForm() { public ShareUpdateForm() {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
singleton = this; singleton = this;
@ -155,20 +169,6 @@ public class ShareUpdateForm extends Composite {
return uploadProgress; return uploadProgress;
} }
private void bind() {
/**
* get the uploaded file result
*/
eventBus.addHandler(FileUploadCompleteEvent.TYPE, new FileUploadCompleteEventHandler() {
@Override
public void onUploadComplete(FileUploadCompleteEvent event) {
String absolutePathOnServer = event.getUploadedFileInfo().getAbsolutePath();
GWT.log("uploaded on Server here: " + absolutePathOnServer);
checkFile(event.getUploadedFileInfo().getFilename(), absolutePathOnServer);
}
});
}
@UiHandler("shareTextArea") @UiHandler("shareTextArea")
void onShareUpdateClick(ClickEvent e) { void onShareUpdateClick(ClickEvent e) {
shareTextArea.removeSampleText(); shareTextArea.removeSampleText();

View File

@ -1,6 +1,6 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:m="urn:import:org.gcube.portlets.user.shareupdates.client.form" xmlns:j="urn:import:org.gcube.portlets.widgets.fileupload.client.view"> xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:m="urn:import:org.gcube.portlets.user.shareupdates.client.view" xmlns:j="urn:import:org.gcube.portlets.widgets.fileupload.client.view">
<g:HTMLPanel ui:field="mainPanel"> <g:HTMLPanel ui:field="mainPanel">
<table class="shareContainer"> <table class="shareContainer">
<tr> <tr>

View File

@ -1,7 +1,7 @@
/** /**
* *
*/ */
package org.gcube.portlets.user.shareupdates.client.form; package org.gcube.portlets.user.shareupdates.client.view;
import java.util.ArrayList; import java.util.ArrayList;