broken examples

View: New views
3 Messages — Rating Filter:   Alert me  

broken examples

by Leonardo-31 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://directwebremoting.org/dwr/examples/index.html
all example links returned rerror, :(

2009/6/3 Lance Java <lance.java@...>
I've been doing a fair bit of work on out of the box dwr support for file upload progress and cancel but wanted to run the new API past the user's list to get some feedback.

The basic approach is this:

<javascript>
dwr.engine.setUploadProgressPollInterval(...);
Remote.uploadFile(
   dwr.util.byId("myFile"),
   callback: ...,
   progressCallback: function(percentageComplete) {
      updateSomeWidget(percentageComplete);
   },
   id: "myUpload" // this allows a developer to provide a handle for the upload, dwr generates it's own invocationId to use internally
);

dwr.engine.cancelUpload("myUpload");
</javascript>

engine.js generates an invocationId which is passed to the server which can be used to cancel an upload or poll it's current progress.

On the serverside there is a (pluggable) UploadManager with the following interface:

public interface UploadManager {
    public void updateProgress(String invocationId, long bytesRead, long contentLength, int currentItemIndex);
    public double getPercentageComplete(String invocationId);
    public void cancelUpload(String invocationId);
}

I have implemented 2 upload managers. 1 stores on the session (similar to the current approach). Another (default) stores to a local map.

There is also a (pluggable) FileUpload (default CommonsFileUpload) that is capable of parsing a multipart request and informing the UploadManager of the current progress for the invocationId.

So... my main questions to the group are:

1. How many people use the current file upload progress implementation (storing on session)
2. Does anyone currently support cancel of a file upload
3. Do we agree on the UploadManager approach (you'll need a good argument here!)
4. Does anyone have arguments for better naming conventions
  a) dwr.engine.setUploadProgressPollInterval(...)
  b) progressCallback: function(percentageComplete) { ... }
  c) id: "myUpload"
  d) dwr.engine.cancelUpload("myUpload");
  e) invocationId
5. Any other suggestions / improvements?

Cheers,
Lance.





Re: broken examples

by davidmarginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for letting us know.  I believe these were working last week.  Perhaps the server is having issues (Joe?).  In the meantime you can download the dwr.war and deploy to your own container if you want to see the examples.

On Mon, Jun 15, 2009 at 10:18 AM, Leonardo <sombriks@...> wrote:
http://directwebremoting.org/dwr/examples/index.html
all example links returned rerror, :(

2009/6/3 Lance Java <lance.java@...>
I've been doing a fair bit of work on out of the box dwr support for file upload progress and cancel but wanted to run the new API past the user's list to get some feedback.

The basic approach is this:

<javascript>
dwr.engine.setUploadProgressPollInterval(...);
Remote.uploadFile(
   dwr.util.byId("myFile"),
   callback: ...,
   progressCallback: function(percentageComplete) {
      updateSomeWidget(percentageComplete);
   },
   id: "myUpload" // this allows a developer to provide a handle for the upload, dwr generates it's own invocationId to use internally
);

dwr.engine.cancelUpload("myUpload");
</javascript>

engine.js generates an invocationId which is passed to the server which can be used to cancel an upload or poll it's current progress.

On the serverside there is a (pluggable) UploadManager with the following interface:

public interface UploadManager {
    public void updateProgress(String invocationId, long bytesRead, long contentLength, int currentItemIndex);
    public double getPercentageComplete(String invocationId);
    public void cancelUpload(String invocationId);
}

I have implemented 2 upload managers. 1 stores on the session (similar to the current approach). Another (default) stores to a local map.

There is also a (pluggable) FileUpload (default CommonsFileUpload) that is capable of parsing a multipart request and informing the UploadManager of the current progress for the invocationId.

So... my main questions to the group are:

1. How many people use the current file upload progress implementation (storing on session)
2. Does anyone currently support cancel of a file upload
3. Do we agree on the UploadManager approach (you'll need a good argument here!)
4. Does anyone have arguments for better naming conventions
  a) dwr.engine.setUploadProgressPollInterval(...)
  b) progressCallback: function(percentageComplete) { ... }
  c) id: "myUpload"
  d) dwr.engine.cancelUpload("myUpload");
  e) invocationId
5. Any other suggestions / improvements?

Cheers,
Lance.






Re: broken examples

by Joe Walker-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


It is down.
I think we should do as we have done for the bug database, and move it to it's own subdomain so we can host it separately. The list would then be:
- directwebremoting.org (main website)
- bugs.directwebremoting.org
- svn.directwebremoting.org
- demo.directwebremoting.org

We're working on it.

Joe.


On Mon, Jun 15, 2009 at 5:22 PM, David Marginian <david@...> wrote:
Thanks for letting us know.  I believe these were working last week.  Perhaps the server is having issues (Joe?).  In the meantime you can download the dwr.war and deploy to your own container if you want to see the examples.


On Mon, Jun 15, 2009 at 10:18 AM, Leonardo <sombriks@...> wrote:
http://directwebremoting.org/dwr/examples/index.html
all example links returned rerror, :(

2009/6/3 Lance Java <lance.java@...>
I've been doing a fair bit of work on out of the box dwr support for file upload progress and cancel but wanted to run the new API past the user's list to get some feedback.

The basic approach is this:

<javascript>
dwr.engine.setUploadProgressPollInterval(...);
Remote.uploadFile(
   dwr.util.byId("myFile"),
   callback: ...,
   progressCallback: function(percentageComplete) {
      updateSomeWidget(percentageComplete);
   },
   id: "myUpload" // this allows a developer to provide a handle for the upload, dwr generates it's own invocationId to use internally
);

dwr.engine.cancelUpload("myUpload");
</javascript>

engine.js generates an invocationId which is passed to the server which can be used to cancel an upload or poll it's current progress.

On the serverside there is a (pluggable) UploadManager with the following interface:

public interface UploadManager {
    public void updateProgress(String invocationId, long bytesRead, long contentLength, int currentItemIndex);
    public double getPercentageComplete(String invocationId);
    public void cancelUpload(String invocationId);
}

I have implemented 2 upload managers. 1 stores on the session (similar to the current approach). Another (default) stores to a local map.

There is also a (pluggable) FileUpload (default CommonsFileUpload) that is capable of parsing a multipart request and informing the UploadManager of the current progress for the invocationId.

So... my main questions to the group are:

1. How many people use the current file upload progress implementation (storing on session)
2. Does anyone currently support cancel of a file upload
3. Do we agree on the UploadManager approach (you'll need a good argument here!)
4. Does anyone have arguments for better naming conventions
  a) dwr.engine.setUploadProgressPollInterval(...)
  b) progressCallback: function(percentageComplete) { ... }
  c) id: "myUpload"
  d) dwr.engine.cancelUpload("myUpload");
  e) invocationId
5. Any other suggestions / improvements?

Cheers,
Lance.